Test [HADOOP_HNATIVE1]
Test [HADOOP_YNATIVE1]
Fixing the test when appropriate env variables are not set explicitly.
@@ -321,7 +321,8 @@ specs {
name = 'HADOOP_HNATIVE1'
type = 'shell'
arguments {
- command = 'test -e $HADOOP_COMMON_HOME/lib/native/libhdfs.a'
+ command = '[ ! -n ${HADOOP_COMMON_HOME} ] || HADOOP_COMMON_HOME=`hadoop envvars | grep HADOOP_COMMON_HOME | sed "s/.*=\'\\(.*\\)\'/\\1/"`; '+
+ 'test -e $HADOOP_COMMON_HOME/lib/native/libhdfs.a'
message = 'hadoop-hdfs-project must be build with -Pnative or -Pnative-win'
}
}
@@ -329,7 +330,8 @@ specs {
name = 'HADOOP_YNATIVE1'
type = 'shell'
arguments {
- command = 'test -e $HADOOP_YARN_HOME/bin/container-executor'
+ command = '[ ! -n ${HADOOP_YARN_HOME} ] || HADOOP_YARN_HOME=`yarn envvars | grep HADOOP_YARN_HOME | sed "s/.*=\'\\(.*\\)\'/\\1/"`; '+
+ 'echo $HADOOP_YARN_HOME; test -e $HADOOP_YARN_HOME/bin/container-executor'
message = 'hadoop-yarn-project must be build with -Pnative or -Pnative-win'
}
}
