0

我正在阅读权威的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而不是由用户创建的

我一定是错过了一个设置....

提前致谢。

4

0 回答 0