hddong commented on a change in pull request #1042: [HUDI-359] Add hudi-env for
hudi-cli module
URL: https://github.com/apache/incubator-hudi/pull/1042#discussion_r349975772
##########
File path: hudi-cli/hudi-cli.sh
##########
@@ -20,15 +20,12 @@
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
HOODIE_JAR=`ls $DIR/target/hudi-cli-*.jar | grep -v source | grep -v javadoc`
-if [ -z "$HADOOP_CONF_DIR" ]; then
- echo "setting hadoop conf dir"
- HADOOP_CONF_DIR="/etc/hadoop/conf"
-fi
-if [ -z "$SPARK_CONF_DIR" ]; then
- echo "setting spark conf dir"
- SPARK_CONF_DIR="/etc/spark/conf"
-fi
+
+. "${DIR}"/conf/hudi-env.sh
+
if [ -z "$CLIENT_JAR" ]; then
- echo "client jar location not set"
+ echo "Client jar location not set, please set it in conf/hudi-env.sh"
+ exit
fi
Review comment:
> hi, may add code snippet is better, WDYT ?
>
> ```
> if [ -z "$HADOOP_CONF_DIR" ]; then
> echo "hadoop conf dir not set"
> fi
> if [ -z "$SPARK_CONF_DIR" ]; then
> echo "spark conf dir not set"
> fi
> ```
All of they are export with a default path when run hudi-env.sh, so they
almost impossible to be null.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services