mirror of
https://github.com/apache/impala.git
synced 2026-01-03 06:00:52 -05:00
Adds the ability to start/stop the Sentry Service to our local test environment and load the sentry-site.xml configs. Since the existing Sentry startup scripts don't work I wrote a simple wrapper to handle service startup. Change-Id: I1b77a2e50e51e6e6eae58cfed4d5d7c403dbc0b4 Reviewed-on: http://gerrit.ent.cloudera.com:8080/2540 Tested-by: jenkins Reviewed-by: Lenni Kuff <lskuff@cloudera.com>
55 lines
1.8 KiB
Bash
Executable File
55 lines
1.8 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.
|
|
|
|
if [ "$1" == "-format" ]; then
|
|
echo "Formatting cluster"
|
|
HDFS_FORMAT_CLUSTER="-format"
|
|
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
|
|
|
|
echo " --> Starting the Sentry Policy Server"
|
|
$IMPALA_HOME/testdata/bin/run-sentry-service.sh\
|
|
&>${IMPALA_TEST_CLUSTER_LOG_DIR}/run-sentry-service.log
|