hadoop 1 常用命令

181 阅读1分钟
  1. 判断目录是否存在
#判断目录是否存在如果存在就删除
hadoop fs -test -e /apps/user/model-cd
if [ $? -eq 0 ] ;then  
     hadoop dfs -rm -r /apps/user/model-cd; 
fi