我正在浏览hadoop的权威书籍。在这里,作者描述了如何通过定义 hadoop.job.ugi
. 好吧,我不会有任何进展的。。。
我在用hduser@ubuntu (我的盒子名)。
我创建了localhost.conf来覆盖默认conf:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!-- Put site-specific property overrides in this file. -->
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
<description>Default block replication.
The actual number of replications can be specified when the file is created.
The default is used if replication is not specified in create time.
</description>
</property>
<property>
<name>mapred.job.tracker</name>
<value>localhost:54311</value>
<description>The host and port that the MapReduce job tracker runs
at. If "local", then jobs are run in-process as a single map
and reduce task.
</description>
</property>
<property>
<name>hadoop.job.ugi</name>
<value>user, supergroup</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://localhost:54310</value>
<description>The name of the default file system. A URI whose
scheme and authority determine the FileSystem implementation. The
uri's scheme determines the config property (fs.SCHEME.impl) naming
the FileSystem implementation class. The uri's authority is used to
determine the host, port, etc. for a filesystem.</description>
</property>
</configuration>
但当我跑的时候 hadoop fs -conf localhost.conf -mkdir newDir
然后 hadoop fs -conf localhost.conf -ls .
我看到newdir目录是由hduser而不是user创建的
我一定错过了一个场景。。。。
提前谢谢。
暂无答案!
目前还没有任何答案,快来回答吧!