hadoop上的“ls /”给出以下输出:
# hdfs dfs -ls /
Found 18 items
drwxrwxrwt - yarn hadoop 0 2019-05-20 09:22 /app-logs
drwxr-xr-x - hdfs hdfs 0 2019-05-15 10:07 /apps
drwxr-xr-x - yarn hadoop 0 2019-05-15 09:37 /ats
drwxr-xr-x - hdfs hdfs 0 2019-05-15 09:23 /atsv2
drwxr-xr-x - test hadoop 0 2019-05-16 16:56 /data
...
# hdfs dfs -rm -R /data
rm: `/data': No such file or directory
# hdfs dfs -ls /*data*
ls: `/data': No such file or directory
#cat createdata.sh
hdfs dfs -mkdir /data
hdfs dfs -chown -R test:hadoop /data
最佳答案
我自己使用以下方法将其删除:
# hdfs dfs -rm -R hdfs://cluster/dat*
' to trash at: hdfs://cluster/user/hdfs/.Trash/Current/datacluster/data
https://stackoverflow.com/questions/56217463/