gpt4 book ai didi

java - 通过Scala/Java的Hadoop setfacl

转载 作者:行者123 更新时间:2023-12-02 19:52:55 25 4
gpt4 key购买 nike

有没有办法通过Scala / Java做hdfs dfs -setfacl?通过hdfs shell这样做很慢。
例如我想重写一下:
Seq(“hdfs”,“dfs”,“-setfacl”,“-R”,“-m”,“group:hive:rwx”,s“$ targetTableFolderPath / $ targetPartitionValue”)。
到Scala代码中。在fs上有可以调用的方法:FileSystem吗?怎么样?

最佳答案

您可能要使用hadoop API。这是HdfsAdmin类的(java)docs:
https://hadoop.apache.org/docs/current/api/

关于java - 通过Scala/Java的Hadoop setfacl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64168515/

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