# clean outputPath
hdfs dfs -test -e $outputPath
if [ $? -eq 0 ]; then
echo "rm outputPath: $outputPath"
hdfs dfs -rm -r $outputPath
fi
# not exist and exit 1
hdfs dfs -test -e $inputPath
if [ $? -ne 0 ]; then
exit 1
fi
# clean outputPath
hdfs dfs -test -e $outputPath
if [ $? -eq 0 ]; then
echo "rm outputPath: $outputPath"
hdfs dfs -rm -r $outputPath
fi
# not exist and exit 1
hdfs dfs -test -e $inputPath
if [ $? -ne 0 ]; then
exit 1
fi