You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jo...@apache.org on 2021/07/07 18:30:52 UTC

[impala] 02/04: IMPALA-10774: Collect the output when starting Hive Metastore or HiveServer2

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 b77f48efc5da9da040e67d98b90f9ed0dcb4d7fa
Author: Fang-Yu Rao <fa...@cloudera.com>
AuthorDate: Tue Jun 29 15:59:30 2021 -0700

    IMPALA-10774: Collect the output when starting Hive Metastore or HiveServer2
    
    Before this patch, when we started the Hive Metastore or the HiveServer2
    via run-hive-server.sh, hive-metastore.out and hive-server2.out would be
    generated, respectively. The output of executing the hive command was
    redirected to the corresponding files mentioned above. However, since
    ">" was used to redirect the output, the previously generated files
    would be overwritten every time during the restart and thus some
    important error message may be lost.
    
    To collect more information regarding the restart, this patch appends
    the newly produced output to hive-metastore.out and hive-server2.out
    during the restart, which makes it easier for developers to troubleshoot
    issues related to the restart.
    
    Change-Id: I2efdbcf886e2d32ccf8c7eef038360884e44f216
    Reviewed-on: http://gerrit.cloudera.org:8080/17642
    Reviewed-by: Quanlong Huang <hu...@gmail.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 testdata/bin/run-hive-server.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testdata/bin/run-hive-server.sh b/testdata/bin/run-hive-server.sh
index f8c3ce5..9580bd6 100755
--- a/testdata/bin/run-hive-server.sh
+++ b/testdata/bin/run-hive-server.sh
@@ -132,7 +132,7 @@ export KUDU_SKIP_HMS_PLUGIN_VALIDATION=${KUDU_SKIP_HMS_PLUGIN_VALIDATION:-1}
 #   -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=TRACE
 if [ ${START_METASTORE} -eq 1 ]; then
   HADOOP_CLIENT_OPTS="-Xmx2024m -Dhive.log.file=hive-metastore.log" hive \
-      --service metastore -p $HIVE_METASTORE_PORT > ${LOGDIR}/hive-metastore.out 2>&1 &
+      --service metastore -p $HIVE_METASTORE_PORT >> ${LOGDIR}/hive-metastore.out 2>&1 &
 
   # Wait for the Metastore to come up because HiveServer2 relies on it being live.
   ${CLUSTER_BIN}/wait-for-metastore.py --transport=${METASTORE_TRANSPORT}
@@ -148,7 +148,7 @@ if [ ${START_HIVESERVER} -eq 1 ]; then
   # environment variable. HADOOP_HEAPSIZE should be set to at least 2048 to avoid OOM
   # when loading ORC tables like widerow.
   HADOOP_CLIENT_OPTS="-Xmx2048m -Dhive.log.file=hive-server2.log" hive \
-      --service hiveserver2 > ${LOGDIR}/hive-server2.out 2>&1 &
+      --service hiveserver2 >> ${LOGDIR}/hive-server2.out 2>&1 &
 
   # Wait for the HiveServer2 service to come up because callers of this script
   # may rely on it being available.