- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在启用了文件系统权限的私有(private)集群上运行 Hadoop 2.6.2。集群有密码文件,只有像 hadoop 这样的系统用户,没有个人账户。我正在从具有像我这样的个人帐户('clott')的 linux 边缘节点访问 DFS。
问题是我无法写入模式为 775 和组 hadoop 的 DFS 目录(“共享”);边缘节点显示我是 hadoop 组的成员。我以为会使用边缘节点上的用户组成员资格,但是没有?这是我看到的:
clott@edge$ id
uid=1003(clott) gid=1003(clott) groups=1003(clott),27(sudo),1001(hadoop)
clott@edge$ hdfs dfs -ls /user/hadoop
Found 3 items
drwxr-xr-x - hadoop hadoop 0 2015-12-03 16:55 /user/hadoop/DistributedShell
drwxrwxr-x - hadoop hadoop 0 2015-12-22 09:25 /user/hadoop/shared
clott@edge$ hdfs dfs -mkdir /user/hadoop/shared/foo
mkdir: Permission denied: user=clott, access=WRITE, inode="/user/hadoop/shared":hadoop:hadoop:drwxrwxr-x
我检查了名称节点并在其日志中发现了这个警告:
2015-12-22 09:32:40,941 WARN org.apache.hadoop.security.UserGroupInformation: No groups available for user clott
这是有道理的 - 名称节点不授予我访问权限,因为它无法识别我的任何组。
那么名称节点是如何找到组成员的呢?一些谷歌搜索似乎建议我必须将我的用户名和各种组添加到集群,但这听起来不对。当然,如果我将 DFS 目录模式设置为 777,这会起作用,但这是不对的。
请帮助,在此先感谢。
最佳答案
hadoop.security.group.mapping
的定义(写成here)是:
Class for user to group mapping (get groups for a given user) for ACL. The default implementation, org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback, will determine if the Java Native Interface (JNI) is available. If JNI is available the implementation will use the API within hadoop to resolve a list of groups for a user. If JNI is not available then the shell implementation, ShellBasedUnixGroupsMapping, is used. This implementation shells out to the Linux/Unix environment with the bash -c groups command to resolve a list of groups for a user.
要实现您的目标,您需要在 NameNode 机器上添加您的用户帐户 (clott),并将其添加到那里的 hadoop 组。
如果您要与您的用户一起运行 MapReduce,您还需要在 NodeManager 主机上配置您的用户帐户。
关于linux - 无法写入 Hadoop DFS 目录模式 775 组权限 UserGroupInformation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34418647/
我正在尝试在HDInsights上学习Hadoop 1.1.0版。我按照分步说明在Hadoop命令行上运行命令。我首先编译Java代码,然后创建一个jar文件,然后执行map reduce命令。但是当
我在hadoop中运行了一个作业(jar文件),(我的jar文件还有一些其他jar文件,并且有一个zip文件。)但是我遇到了这个错误。如果有人可以帮助我,并说出此错误的原因,我将非常感谢。我认为此错误
我正在尝试在我的本地机器上运行以下 MapReduce 代码: https://github.com/Jeffyrao/warcbase/blob/extract-links/src/main/jav
每当我尝试执行 map reduce 作业以写入 Hbase 表时,我都会在控制台中收到以下错误。我正在从用户帐户运行 MR 作业。 错误 security.UserGroupInformation:
我在eclipse中将hadoop的WordCount代码编写为java应用程序来测试hadoop是否运行应用程序,但是当我尝试以hdfs用户身份运行它时,会出现此错误: ./hadoop jar /
我正在使用 Hadoop 2.2.0。 hadoop-mapreduce-examples-2.2.0.jar 在 hdfs 上运行良好。 我在 eclipse 中制作了一个 wordcount 程序
以下是非 hadoop 系统上的客户端代码,用于在安全的远程 HDFS 上执行操作。 Configuration conf = new Configuration(); conf.se
我在启用了文件系统权限的私有(private)集群上运行 Hadoop 2.6.2。集群有密码文件,只有像 hadoop 这样的系统用户,没有个人账户。我正在从具有像我这样的个人帐户('clott')
为什么要这样设计 UserGroupInformation 类?为什么 setConfiguration(Configuration conf) UserGroupInformation 类的方法是静
我试图在我的Ubuntu计算机(Hadoop的Cloudera安装)上启动Hive,但出现此错误: hdp@DevBox:/$ hive Hive history file=/tmp/hdp/hive
我正在运行一个简单的流式 map-reduce 作业,但似乎无法解决此错误。 hadoop jar $HADOOP_HOME/contrib/streaming/hadoop-streaming-1.
我是一名优秀的程序员,十分优秀!