Repository: incubator-impala
Updated Branches:
  refs/heads/master 6a2b7a64f -> d1b92c8b5


Expose $IMPALA_MAVEN_OPTIONS for configuring Maven.

With this commit, $IMPALA_MAVEN_OPTIONS is used by bin/mvn-quiet.sh
to configure Maven slightly. The default is no extra options.

This is handy for giving Maven a settings file with the "-s" flag, to
control, for example, repositories and their mirrors. In fact, I
considered exposing IMPALA_MAVEN_SETTINGS_FILE explicitly, but decided
that the generic option would be as good.

It's useful to customize how Maven works, especially
to provide a settings file with repository mirrors.

Change-Id: I2c62185476fd2388c7cda8884276b79a77370127
Reviewed-on: http://gerrit.cloudera.org:8080/8496
Reviewed-by: Joe McDonnell <[email protected]>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/a0be00ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/a0be00ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/a0be00ad

Branch: refs/heads/master
Commit: a0be00ad6dab69bfd843aa89766b861932c5a0d7
Parents: 6a2b7a6
Author: Philip Zeyliger <[email protected]>
Authored: Mon Nov 6 16:45:49 2017 -0800
Committer: Impala Public Jenkins <[email protected]>
Committed: Tue Nov 14 01:29:56 2017 +0000

----------------------------------------------------------------------
 bin/impala-config.sh                 | 4 ++++
 bin/mvn-quiet.sh                     | 7 ++++---
 testdata/bin/generate-block-ids.sh   | 3 ++-
 testdata/bin/generate-load-nested.sh | 6 +++---
 testdata/bin/split-hbase.sh          | 2 +-
 5 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a0be00ad/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 0fd976b..116ab34 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -210,6 +210,9 @@ export USE_GOLD_LINKER=${USE_GOLD_LINKER-true}
 # IMPALA_BUILD_THREADS to increase parallelism.
 export IMPALA_CXX_COMPILER=${IMPALA_CXX_COMPILER-default}
 
+# Add options to 'mvn'; useful for configuring a settings file (-s).
+export IMPALA_MAVEN_OPTIONS=${IMPALA_MAVEN_OPTIONS-}
+
 # If enabled, debug symbols are added to cross-compiled IR.
 export ENABLE_IMPALA_IR_DEBUG_INFO=${ENABLE_IMPALA_IR_DEBUG_INFO-false}
 
@@ -547,6 +550,7 @@ echo "LD_PRELOAD              = $LD_PRELOAD"
 echo "POSTGRES_JDBC_DRIVER    = $POSTGRES_JDBC_DRIVER"
 echo "IMPALA_TOOLCHAIN        = $IMPALA_TOOLCHAIN"
 echo "DOWNLOAD_CDH_COMPONENTS = $DOWNLOAD_CDH_COMPONENTS"
+echo "IMPALA_MAVEN_OPTIONS    = $IMPALA_MAVEN_OPTIONS"
 
 # Kerberos things.  If the cluster exists and is kerberized, source
 # the required environment.  This is required for any hadoop tool to

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a0be00ad/bin/mvn-quiet.sh
----------------------------------------------------------------------
diff --git a/bin/mvn-quiet.sh b/bin/mvn-quiet.sh
index 41303ca..591133d 100755
--- a/bin/mvn-quiet.sh
+++ b/bin/mvn-quiet.sh
@@ -20,11 +20,12 @@
 # Utility script that invokes maven but filters out noisy info logging
 set -euo pipefail
 echo "========================================================================"
-echo "Running mvn $@"
+echo "Running mvn $IMPALA_MAVEN_OPTIONS $@"
 echo "Directory: $(pwd)"
 echo "========================================================================"
-if ! mvn "$@" | grep -E -e WARNING -e ERROR -e SUCCESS -e FAILURE -e Test; then
-  echo "mvn $@ exited with code $?"
+if ! mvn $IMPALA_MAVEN_OPTIONS "$@" | \
+    grep -E -e WARNING -e ERROR -e SUCCESS -e FAILURE -e Test; then
+  echo "mvn $IMPALA_MAVEN_OPTIONS $@ exited with code $?"
   exit 1
 fi
 echo "------------------------------------------------------------------------"

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a0be00ad/testdata/bin/generate-block-ids.sh
----------------------------------------------------------------------
diff --git a/testdata/bin/generate-block-ids.sh 
b/testdata/bin/generate-block-ids.sh
index 85d4403..1c550e3 100755
--- a/testdata/bin/generate-block-ids.sh
+++ b/testdata/bin/generate-block-ids.sh
@@ -18,5 +18,6 @@
 # under the License.
 
 cd $IMPALA_FE_DIR
-mvn -e exec:java -Dexec.mainClass=org.apache.impala.testutil.BlockIdGenerator \
+mvn $IMPALA_MAVEN_OPTIONS -e exec:java \
+              -Dexec.mainClass=org.apache.impala.testutil.BlockIdGenerator \
               -Dexec.classpathScope=test -Dexec.args="../testdata/block-ids"

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a0be00ad/testdata/bin/generate-load-nested.sh
----------------------------------------------------------------------
diff --git a/testdata/bin/generate-load-nested.sh 
b/testdata/bin/generate-load-nested.sh
index 5f00e35..4986418 100755
--- a/testdata/bin/generate-load-nested.sh
+++ b/testdata/bin/generate-load-nested.sh
@@ -54,7 +54,7 @@ while getopts ":n:e:i:f" OPTION; do
 done
 
 if $FLATTEN; then
-  mvn -f "${IMPALA_HOME}/testdata/TableFlattener/pom.xml" package;
+  mvn $IMPALA_MAVEN_OPTIONS -f 
"${IMPALA_HOME}/testdata/TableFlattener/pom.xml" package
 fi
 
 RANDOM_SCHEMA_GENERATOR=${IMPALA_HOME}/testdata/bin/random_avro_schema.py;
@@ -78,12 +78,12 @@ do
   do
     FILE_NAME=$(basename ${AVRO_SCHEMA_PATH})
     TABLE_NAME="${FILE_NAME%.*}"
-    mvn -f "${IMPALA_HOME}/testdata/pom.xml" exec:java \
+    mvn $IMPALA_MAVEN_OPTIONS -f "${IMPALA_HOME}/testdata/pom.xml" exec:java \
       
-Dexec.mainClass="org.apache.impala.datagenerator.RandomNestedDataGenerator" \
       -Dexec.args="${AVRO_SCHEMA_PATH} ${NUM_ELEMENTS} ${NUM_FIELDS} 
${DB_DIR}/${TABLE_NAME}/${TABLE_NAME}.parquet";
 
     if $FLATTEN; then
-      mvn -f "${IMPALA_HOME}/testdata/TableFlattener/pom.xml" \
+      mvn $IMPALA_MAVEN_OPTIONS -f 
"${IMPALA_HOME}/testdata/TableFlattener/pom.xml" \
         exec:java -Dexec.mainClass=org.apache.impala.infra.tableflattener.Main 
\
         
-Dexec.arguments="file://${DB_DIR}/${TABLE_NAME}/${TABLE_NAME}.parquet,file://${DB_DIR}/${TABLE_NAME}_flat,-sfile://${AVRO_SCHEMA_PATH}";
     fi

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/a0be00ad/testdata/bin/split-hbase.sh
----------------------------------------------------------------------
diff --git a/testdata/bin/split-hbase.sh b/testdata/bin/split-hbase.sh
index 909ef2a..2d95b25 100755
--- a/testdata/bin/split-hbase.sh
+++ b/testdata/bin/split-hbase.sh
@@ -32,7 +32,7 @@ fi
 cd $IMPALA_HOME/testdata
 ${IMPALA_HOME}/bin/mvn-quiet.sh clean
 ${IMPALA_HOME}/bin/mvn-quiet.sh package
-mvn -q dependency:copy-dependencies
+mvn $IMPALA_MAVEN_OPTIONS -q dependency:copy-dependencies
 
 . ${IMPALA_HOME}/bin/set-classpath.sh
 export 
CLASSPATH=$IMPALA_HOME/testdata/target/impala-testdata-0.1-SNAPSHOT.jar:$CLASSPATH

Reply via email to