Make sure you give required persmissions to tmp folder Step 8: This step will show you how to configure hadoop related configuration files conf/core-site.xml, conf/hdfs-site.xml, conf/mapred-site.xml. Add following lines to conf/core-site.xml:
<property>
<name>hadoop.tmp.dir</name>
<value>/app/hadoop/tmp</value>
<description>A base for other temporary directories.</description>
</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>
Add following lines to conf/hdfs-site.xml
<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>
Add following lines to conf/mapred-site.xml
<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>
Step 9: Before starting hadoop daemons we have to format namenode. This is required to initialize the directory dfs.name.dir. Execute below command:
/************************************************************STARTUP_MSG: Starting NameNodeSTARTUP_MSG: host = ubuntu/127.0.1.1STARTUP_MSG: args = [-format]STARTUP_MSG: version = 0.20.2STARTUP_MSG: build = https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707; compiled by 'chrisdo' on Wed Jan 28 13:40:20 UTC 2014************************************************************/14/01/28 13:40:21 INFO namenode.FSNamesystem: fsOwner=userhdp,hadoop14/01/28 13:40:21 INFO namenode.FSNamesystem: supergroup=supergroup14/01/28 13:40:21 INFO namenode.FSNamesystem: isPermissionEnabled=true14/01/28 13:40:21 INFO common.Storage: Image file of size 96 saved in 0 seconds.14/01/28 13:40:21 INFO common.Storage: Storage directory .../hadoop-userhdp/dfs/name has been successfully formatted.14/01/28 13:40:21 INFO namenode.NameNode:
SHUTDOWN_MSG:
/************************************************************SHUTDOWN_MSG: Shutting down NameNode at ubuntu/127.0.1.1
Comments
Post a Comment
Your Comments are more valuable to improve. Please go ahead