You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2019/11/22 19:03:07 UTC

[GitHub] [incubator-hudi] lamber-ken commented on a change in pull request #1042: [HUDI-359] Add hudi-env for hudi-cli module

lamber-ken 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_r349747771
 
 

 ##########
 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
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services