Repository: impala
Updated Branches:
  refs/heads/master 881e00a8b -> 623ace0e4


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/1b121c9f
Tree: http://git-wip-us.apache.org/repos/asf/impala/tree/1b121c9f
Diff: http://git-wip-us.apache.org/repos/asf/impala/diff/1b121c9f

Branch: refs/heads/master
Commit: 1b121c9f1bd6127bc167c5aba7ad0aa38014fad5
Parents: 881e00a
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 01:36:50 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/1b121c9f/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/1b121c9f/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