BIGTOP-3041: Failed to init hadoop hdfs using init-hdfs.sh
authorJun He <jun.he@linaro.org>
Tue, 5 Jun 2018 07:09:48 +0000 (15:09 +0800)
committerJun He <junhe@apache.org>
Wed, 6 Jun 2018 08:03:16 +0000 (08:03 +0000)
Failed to initialize hdfs using init-hdfs.sh script with 2.8.1.
The root cause is some jars are missed in CLASS_PATH

This closes #365

Change-Id: I6e3e1f42d437097ee122150aa94b41780346fb4f
Signed-off-by: Jun He <junhe@apache.org>
bigtop-packages/src/common/hadoop/init-hdfs.sh

index fff52d5..0a94c77 100755 (executable)
@@ -35,9 +35,9 @@ fi
 HADOOP_LIB_DIR=/usr/lib/hadoop/lib
 HDFS_LIB_DIR=/usr/lib/hadoop-hdfs/lib
 HADOOP_DEPENDENCIES="commons-logging*.jar commons-io*.jar guava*.jar commons-configuration*.jar commons-collections*.jar slf4j-api*.jar protobuf-java*.jar commons-lang*.jar servlet-api-2.5.jar"
-HDFS_DEPENDENCIES="htrace-core*.jar"
+HDFS_DEPENDENCIES="htrace-core*.jar jackson-*.jar"
 for i in /usr/lib/hadoop/*.jar; do CLASSPATH=$CLASSPATH:$i; done
-CLASSPATH=/etc/hadoop/conf:$CLASSPATH:/usr/lib/hadoop-hdfs/hadoop-hdfs.jar
+CLASSPATH=/etc/hadoop/conf:$CLASSPATH:/usr/lib/hadoop-hdfs/hadoop-hdfs.jar:/usr/lib/hadoop-hdfs/hadoop-hdfs-client.jar
 pushd .
 cd $HADOOP_LIB_DIR
 for d in $HADOOP_DEPENDENCIES; do CLASSPATH=$CLASSPATH:$HADOOP_LIB_DIR/$d; done