mirror of
https://github.com/apache/impala.git
synced 2026-01-04 09:00:56 -05:00
This should allow individual service components, such as a single nodemanager, to be shutdown for failure testing. The mini-cluster bundled with hadoop is a single process that does not expose the ability to control individual roles. Now each role can be controlled and configured independently of the others. Change-Id: Ic1d42e024226c6867e79916464d184fce886d783 Reviewed-on: http://gerrit.ent.cloudera.com:8080/1432 Tested-by: Casey Ching <casey@cloudera.com> Reviewed-by: Casey Ching <casey@cloudera.com> Reviewed-on: http://gerrit.ent.cloudera.com:8080/2297 Reviewed-by: Ishaan Joshi <ishaan@cloudera.com> Tested-by: Ishaan Joshi <ishaan@cloudera.com>
54 lines
1.7 KiB
Bash
Executable File
54 lines
1.7 KiB
Bash
Executable File
#!/bin/bash
|
|
# Copyright 2012 Cloudera Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
# Starts up a mini-dfs test cluster and related services
|
|
|
|
# If -format is passed, format the mini-dfs cluster.
|
|
|
|
HDFS_FORMAT_CLUSTER="--hdfsnoformat"
|
|
if [ "$1" == "-format" ]; then
|
|
echo "Formatting cluster"
|
|
HDFS_FORMAT_CLUSTER=""
|
|
elif [[ $1 ]]; then
|
|
echo "Usage: run-all.sh [-format]"
|
|
echo "[-format] : Format the mini-dfs cluster before starting"
|
|
exit 1
|
|
fi
|
|
|
|
set -u
|
|
|
|
# Kill and clean data for a clean start.
|
|
echo "Killing running services..."
|
|
$IMPALA_HOME/testdata/bin/kill-all.sh &>${IMPALA_TEST_CLUSTER_LOG_DIR}/kill-all.log
|
|
|
|
set -e
|
|
|
|
# Starts up a mini-cluster which includes:
|
|
# - HDFS with 3 DNs
|
|
# - One Yarn ResourceManager
|
|
# - Multiple Yarn NodeManagers, exactly one per HDFS DN
|
|
echo "Starting all cluster services..."
|
|
echo " --> Starting mini-DFS cluster"
|
|
$IMPALA_HOME/testdata/bin/run-mini-dfs.sh ${HDFS_FORMAT_CLUSTER}
|
|
|
|
echo " --> Starting HBase"
|
|
$IMPALA_HOME/testdata/bin/run-hbase.sh &>${IMPALA_TEST_CLUSTER_LOG_DIR}/run-hbase.log
|
|
|
|
echo " --> Starting Hive Server and Metastore Service"
|
|
$IMPALA_HOME/testdata/bin/run-hive-server.sh\
|
|
&>${IMPALA_TEST_CLUSTER_LOG_DIR}/run-hive-server.log
|
|
|
|
|