Repository: impala
Updated Branches:
  refs/heads/2.x 9d7b2103f -> d89db5b0d


IMPALA-5139: Update mvn-quiet.sh to print execution content to log file

Verified the changes to mvn-quiet.sh by trigerring an impala build by
running bootstrap_development.sh which invokes mvn-quiet at multiple
places. Verified the creation of mvn log file with the relevant content
in the $IMPALA_HOME/logs/mvn folder

Change-Id: I475b17a4dccfa624dda61402491b461c53473f8b
Reviewed-on: http://gerrit.cloudera.org:8080/9273
Reviewed-by: Michael Brown <mi...@cloudera.com>
Tested-by: Impala Public Jenkins


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

Branch: refs/heads/2.x
Commit: 11e0bede387fa713ef9b2cda16454f7db6ea2594
Parents: 3846177
Author: njanarthanancldr <njanartha...@cloudera.com>
Authored: Fri Feb 9 16:08:07 2018 -0800
Committer: Impala Public Jenkins <impala-public-jenk...@gerrit.cloudera.org>
Committed: Thu Feb 22 02:52:03 2018 +0000

----------------------------------------------------------------------
 bin/impala-config.sh |  3 ++-
 bin/mvn-quiet.sh     | 20 +++++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/impala/blob/11e0bede/bin/impala-config.sh
----------------------------------------------------------------------
diff --git a/bin/impala-config.sh b/bin/impala-config.sh
index 15b9116..09476c3 100755
--- a/bin/impala-config.sh
+++ b/bin/impala-config.sh
@@ -414,12 +414,13 @@ export 
IMPALA_FE_TEST_COVERAGE_DIR="${IMPALA_FE_TEST_LOGS_DIR}/coverage"
 export IMPALA_BE_TEST_LOGS_DIR="${IMPALA_LOGS_DIR}/be_tests"
 export IMPALA_EE_TEST_LOGS_DIR="${IMPALA_LOGS_DIR}/ee_tests"
 export 
IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR="${IMPALA_LOGS_DIR}/custom_cluster_tests"
+export IMPALA_MVN_LOGS_DIR="${IMPALA_LOGS_DIR}/mvn"
 # List of all Impala log dirs so they can be created by buildall.sh
 export IMPALA_ALL_LOGS_DIRS="${IMPALA_CLUSTER_LOGS_DIR}
   ${IMPALA_DATA_LOADING_LOGS_DIR} ${IMPALA_DATA_LOADING_SQL_DIR}
   ${IMPALA_FE_TEST_LOGS_DIR} ${IMPALA_FE_TEST_COVERAGE_DIR}
   ${IMPALA_BE_TEST_LOGS_DIR} ${IMPALA_EE_TEST_LOGS_DIR}
-  ${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR}"
+  ${IMPALA_CUSTOM_CLUSTER_TEST_LOGS_DIR} ${IMPALA_MVN_LOGS_DIR}"
 
 # Reduce the concurrency for local tests to half the number of cores in the 
system.
 CORES=$(($(getconf _NPROCESSORS_ONLN) / 2))

http://git-wip-us.apache.org/repos/asf/impala/blob/11e0bede/bin/mvn-quiet.sh
----------------------------------------------------------------------
diff --git a/bin/mvn-quiet.sh b/bin/mvn-quiet.sh
index 591133d..beeaeb9 100755
--- a/bin/mvn-quiet.sh
+++ b/bin/mvn-quiet.sh
@@ -19,14 +19,20 @@
 
 # Utility script that invokes maven but filters out noisy info logging
 set -euo pipefail
-echo "========================================================================"
-echo "Running mvn $IMPALA_MAVEN_OPTIONS $@"
-echo "Directory: $(pwd)"
-echo "========================================================================"
+
+LOG_FILE="${IMPALA_MVN_LOGS_DIR}/mvn.log"
+
+mkdir -p "$IMPALA_MVN_LOGS_DIR"
+
+cat << EOF | tee -a "$LOG_FILE"
+========================================================================
+Running mvn $IMPALA_MAVEN_OPTIONS $@
+Directory $(pwd)
+========================================================================
+EOF
+
 if ! mvn $IMPALA_MAVEN_OPTIONS "$@" | \
-    grep -E -e WARNING -e ERROR -e SUCCESS -e FAILURE -e Test; then
+  tee -a "$LOG_FILE" | 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 "------------------------------------------------------------------------"
-echo

Reply via email to