mirror of
https://github.com/apache/impala.git
synced 2026-02-02 06:00:36 -05:00
Various build and test machines have multiple versions of java installed and relying on the default "java" command being compatible isn't practical (a machine may also build an older version of Impala that might require a different java version). Since JAVA_HOME is already required that can/should be used to determine which java binary to use. This also includes a minor change to replace a block of code that was using 4-space indent. Instead of using 2-space indent, that block was replaced with one line. Change-Id: I4b8698b2aa5411b5fa6c5bc06291625999478955 Reviewed-on: http://gerrit.cloudera.org:8080/310 Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Internal Jenkins
38 lines
1.2 KiB
Bash
Executable File
38 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
|
|
|
|
. ${IMPALA_HOME}/bin/impala-config.sh
|
|
if ${CLUSTER_DIR}/admin is_kerberized; then
|
|
KERB_ARGS="--use_kerberos"
|
|
fi
|
|
|
|
# Split hbasealltypesagg and hbasealltypessmall and assign their splits
|
|
cd $IMPALA_HOME/testdata
|
|
mvn clean package
|
|
mvn dependency:copy-dependencies
|
|
|
|
. ${IMPALA_HOME}/bin/set-classpath.sh
|
|
export CLASSPATH=$IMPALA_HOME/testdata/target/impala-testdata-0.1-SNAPSHOT.jar:$CLASSPATH
|
|
|
|
RESULT=1
|
|
RETRY_COUNT=0
|
|
while [ $RESULT -ne 0 ] && [ $RETRY_COUNT -le 10 ]; do
|
|
"$JAVA" ${JAVA_KERBEROS_MAGIC} \
|
|
com.cloudera.impala.datagenerator.HBaseTestDataRegionAssigment \
|
|
functional_hbase.alltypesagg functional_hbase.alltypessmall
|
|
RESULT=$?
|
|
|
|
if [ $RESULT -ne 0 ]; then
|
|
((RETRY_COUNT++))
|
|
# If the split failed, force reload the hbase tables before trying the next split
|
|
$IMPALA_HOME/bin/start-impala-cluster.py
|
|
$IMPALA_HOME/bin/load-data.py -w functional-query \
|
|
--table_names=alltypesagg,alltypessmall --table_formats=hbase/none --force \
|
|
${KERB_ARGS} --principal=${MINIKDC_PRINC_HIVE}
|
|
$IMPALA_HOME/tests/util/compute_table_stats.py --db_names=functional_hbase \
|
|
--table_names=alltypesagg,alltypessmall ${KERB_ARGS}
|
|
fi
|
|
done
|
|
|
|
exit $RESULT
|