This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 8bb366573c3072149444c4524fc32a1245629548 Author: Austin Nobis <ano...@cloudera.com> AuthorDate: Mon Apr 8 11:15:01 2019 -0700 IMPALA-8393: Skip ranger setup for unsupported environments Previously, the setup-ranger step in create-load-data.sh was hard coded with localhost as the host for Ranger. This patch makes it possible to skip the setup for Ranger by using the flag -skip_ranger. The script was also updated to set the SKIP_RANGER variable when the REMOTE_LOAD environment variable is set. Testing: - Testing was performed by calling the script with and without the setup-ranger flag set as well as calling the script with and without the REMOTE_LOAD environment variable set. Change-Id: Ie81dda992cf29792468580b182e570132d5ce0a1 Reviewed-on: http://gerrit.cloudera.org:8080/12957 Reviewed-by: Fredy Wijaya <fwij...@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com> --- testdata/bin/create-load-data.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/testdata/bin/create-load-data.sh b/testdata/bin/create-load-data.sh index 4aa1ebd..1d3d28f 100755 --- a/testdata/bin/create-load-data.sh +++ b/testdata/bin/create-load-data.sh @@ -46,6 +46,7 @@ setup_report_build_error SKIP_METADATA_LOAD=0 SKIP_SNAPSHOT_LOAD=0 +SKIP_RANGER=0 SNAPSHOT_FILE="" LOAD_DATA_ARGS="" EXPLORATION_STRATEGY="exhaustive" @@ -85,18 +86,26 @@ do CM_HOST=${2-} shift; ;; + -skip_ranger) + SKIP_RANGER=1 + ;; -help|-h|*) echo "create-load-data.sh : Creates data and loads from scratch" echo "[-skip_metadata_load] : Skips loading of metadata" echo "[-skip_snapshot_load] : Assumes that the snapshot is already loaded" echo "[-snapshot_file] : Loads the test warehouse snapshot into hdfs" echo "[-cm_host] : Address of the Cloudera Manager host if loading to a remote cluster" + echo "[-skip_ranger] : Skip the set-up for Ranger." exit 1; ;; esac shift; done +if [[ -n $REMOTE_LOAD ]]; then + SKIP_RANGER=1 +fi + if [[ $SKIP_METADATA_LOAD -eq 0 && "$SNAPSHOT_FILE" = "" ]]; then run-step "Generating HBase data" create-hbase.log \ ${IMPALA_HOME}/testdata/bin/create-hbase.sh @@ -663,4 +672,6 @@ run-step "Computing table stats" compute-table-stats.log \ run-step "Creating tpcds testcase data" create-tpcds-testcase-data.log \ ${IMPALA_HOME}/testdata/bin/create-tpcds-testcase-files.sh -run-step "Setting up Ranger" setup-ranger.log setup-ranger +if [[ $SKIP_RANGER -eq 0 ]]; then + run-step "Setting up Ranger" setup-ranger.log setup-ranger +fi