gpt4 book ai didi

hadoop - hadoop无法清除: “-expunge: Illegal option -immediate”吗?

转载 作者:行者123 更新时间:2023-12-02 20:21:45 24 4
gpt4 key购买 nike

我正在尝试使用.Trash option清除HDFS用户的-immediate文件夹

[airflow@airflowetl root]$ hadoop version
Hadoop 3.1.1.3.1.0.0-78
Source code repository git@github.com:hortonworks/hadoop.git -r e4f82af51faec922b4804d0232a637422ec29e64
Compiled by jenkins on 2018-12-06T12:26Z
Compiled with protoc 2.5.0
From source with checksum eab9fa2a6aa38c6362c66d8df75774
This command was run using /usr/hdp/3.1.0.0-78/hadoop/hadoop-common-3.1.1.3.1.0.0-78.jar

[airflow@airflowetl root]$ hadoop fs -expunge -immediate
-expunge: Illegal option -immediate
...
...
...

没有 -immediate选项,我仍然看到错误

[airflow@airflowetl root]$ hadoop fs -expunge
20/01/31 11:35:08 WARN hdfs.DFSClient: Cannot get all encrypted trash roots
org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Access denied for user airflow. Superuser privilege is required

有谁知道这里会发生什么?还有其他调试建议吗?

最佳答案

您不能以非Hadoop管理员用户帐户运行命令。

您需要通过sudo su - hdfs切换到hdfs用户

您也可以尝试hdfs dfs -rm -R -skipTrash .Trash/*

关于hadoop - hadoop无法清除: “-expunge: Illegal option -immediate”吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60011563/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com