You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Todd Lipcon (Code Review)" <ge...@cloudera.org> on 2019/04/25 06:05:24 UTC
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Hello Vihang Karajgaonkar,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/13113
to review the following change.
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Verify existence of HIVE_AUX_JARS before running HS2
I spent an hour today trying to debug the following issue:
- we pass $POSTGRES_JDBC_DRIVER as $HIVE_AUX_JARS_PATH when starting HS2
- the path to the JDBC driver is inside the fe/target/dependency/
directory
- if we haven't built the frontend yet, that jar won't exist yet
- at least on HS2 from Hive 3 (maybe on Hive 2 as well?) if you pass a
non-existent jar in this environment variable, it will fail with a
fairly uninintelligible error like:
tez.DagUtils: Localizing resource because it does not exist: file:/data/1/todd/impala/fe/target/dependency/postgresql-42.2.5.jar to dest:
hdfs://localhost:20500/tmp/hive/todd/_tez_session_dir/9de357d5-59bf-4faa-8973-5212a08bc41a-resources/postgresql-42.2.5.jar
tez.DagUtils: Looks like another thread or process is writing the same file
tez.DagUtils: Waiting for the file hdfs://localhost:20500/tmp/hive/todd/_tez_session_dir/9de357d5-59bf-4faa-8973-5212a08bc41a-resources/postgresql-42.2.5.jar (5 attempts, with 5000ms interval)
tez.DagUtils: Could not find the jar that was being uploaded
tez.TezTask: Failed to execute tez graph.```
I filed HIVE-21649 to improve this logging.
Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
---
M testdata/bin/run-hive-server.sh
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/13/13113/1
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/13113 )
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Patch Set 1:
Build Successful
https://jenkins.impala.io/job/gerrit-code-review-checks/2905/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Thu, 25 Apr 2019 06:59:49 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has posted comments on this change. ( http://gerrit.cloudera.org:8080/13113 )
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh
File testdata/bin/run-hive-server.sh:
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh@47
PS1, Line 47: IFS=: read -r -a aux_jars <<< "$HIVE_AUX_JARS_PATH"
: for jar in "${aux_jars[@]}"; do
: if [[ "$jar" == *.jar ]] && ! test -f $jar ; then
: echo "JAR $jar listed in \$HIVE_AUX_JARS_PATH does not exist."
: echo "You may need to build the fe or run mvn dependencies:copy-dependencies"
: exit 1
: fi
: done
This solution works but I was curious to see why the hive scripts don't do this check and I found this $HIVE_HOME/bin/hive
# add the auxillary jars such as serdes
if [ -d "${HIVE_AUX_JARS_PATH}" ]; then
hive_aux_jars_abspath=`cd ${HIVE_AUX_JARS_PATH} && pwd`
for f in $hive_aux_jars_abspath/*.jar; do
if [[ ! -f $f ]]; then
continue;
fi
if $cygwin; then
f=`cygpath -w "$f"`
fi
AUX_CLASSPATH=${AUX_CLASSPATH}:$f
if [ "${AUX_PARAM}" == "" ]; then
AUX_PARAM=file://$f
else
AUX_PARAM=${AUX_PARAM},file://$f;
fi
done
elif [ "${HIVE_AUX_JARS_PATH}" != "" ]; then
HIVE_AUX_JARS_PATH=`echo $HIVE_AUX_JARS_PATH | sed 's/,/:/g'`
if $cygwin; then
HIVE_AUX_JARS_PATH=`cygpath -p -w "$HIVE_AUX_JARS_PATH"`
HIVE_AUX_JARS_PATH=`echo $HIVE_AUX_JARS_PATH | sed 's/;/,/g'`
fi
AUX_CLASSPATH=${AUX_CLASSPATH}:${HIVE_AUX_JARS_PATH}
AUX_PARAM="file://$(echo ${HIVE_AUX_JARS_PATH} | sed 's/:/,file:\/\//g')"
fi
My understanding (confirmed with hive docs) the database driver jars which are essential for metastore should be soft linked to $HIVE_HOME/lib directory instead of adding it to aux_jar_path. Perhaps a easier way to fix this would to be do that instead of adding it in the aux_jar_path in impala-config.sh
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 30 Apr 2019 18:30:48 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Posted by "Todd Lipcon (Code Review)" <ge...@cloudera.org>.
Todd Lipcon has posted comments on this change. ( http://gerrit.cloudera.org:8080/13113 )
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh
File testdata/bin/run-hive-server.sh:
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh@47
PS1, Line 47: IFS=: read -r -a aux_jars <<< "$HIVE_AUX_JARS_PATH"
: for jar in "${aux_jars[@]}"; do
: if [[ "$jar" == *.jar ]] && ! test -f $jar ; then
: echo "JAR $jar listed in \$HIVE_AUX_JARS_PATH does not exist."
: echo "You may need to build the fe or run mvn dependencies:copy-dependencies"
: exit 1
: fi
: done
> This solution works but I was curious to see why the hive scripts don't do
I don't think we should be symlinking stuff into the hive bin dir, because we generally want to treat the thirdparty downloaded artifacts as "read only". Otherwise we may start to accumulate state in that directory which may need to be changed over as you switch build configs, etc.
I think it would be worth considering passing the postgres jar with some other method, though -- eg a HADOOP_CLASSPATH entry etc
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 30 Apr 2019 19:58:09 +0000
Gerrit-HasComments: Yes
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has posted comments on this change. ( http://gerrit.cloudera.org:8080/13113 )
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Patch Set 1: Code-Review+1
Thanks for providing this patch. Definitely, will save many hours of debug time for many developers.
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 30 Apr 2019 18:15:20 +0000
Gerrit-HasComments: No
[Impala-ASF-CR] Verify existence of HIVE AUX JARS before running HS2
Posted by "Vihang Karajgaonkar (Code Review)" <ge...@cloudera.org>.
Vihang Karajgaonkar has posted comments on this change. ( http://gerrit.cloudera.org:8080/13113 )
Change subject: Verify existence of HIVE_AUX_JARS before running HS2
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh
File testdata/bin/run-hive-server.sh:
http://gerrit.cloudera.org:8080/#/c/13113/1/testdata/bin/run-hive-server.sh@47
PS1, Line 47: IFS=: read -r -a aux_jars <<< "$HIVE_AUX_JARS_PATH"
: for jar in "${aux_jars[@]}"; do
: if [[ "$jar" == *.jar ]] && ! test -f $jar ; then
: echo "JAR $jar listed in \$HIVE_AUX_JARS_PATH does not exist."
: echo "You may need to build the fe or run mvn dependencies:copy-dependencies"
: exit 1
: fi
: done
> I don't think we should be symlinking stuff into the hive bin dir, because
Makes sense. HADOOP_CLASSPATH or HIVE_CLASSPATH should work too
--
To view, visit http://gerrit.cloudera.org:8080/13113
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a2458b9e92a9243fc00d1bd80791062c89496f7
Gerrit-Change-Number: 13113
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <to...@apache.org>
Gerrit-Reviewer: Vihang Karajgaonkar <vi...@cloudera.com>
Gerrit-Comment-Date: Tue, 30 Apr 2019 23:14:10 +0000
Gerrit-HasComments: Yes