
上QQ阅读APP看书,第一时间看更新
Hadoop configuration
Configuration files come with the Hadoop package and are configured by default to run as a Single Node, as a single Java Process. There is also an option to run each Hadoop daemon as a separate Java process, which is also known as a pseudo-distributed operation. To set up pseudo-distributed mode, the following configurations are required. You can use any text editor of your choice; we will be using gedit. All configuration files are located in etc/hadoop/ inside the extracted Hadoop package folder. In our case, the complete path is /home/hadoopadmin/hadoop-2.8.1/etc/hadoop/:
- Edit the core-site.xml configuration file and copy the following code in between the <configuration>..</configuration> tabs:
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost:9000</value>
</property>
- Edit the hdfs-site.xml file and copy the following in between the <configuration>..</configuration> tabs. You can change the value from 1 to any number; it depends how many copies of the data you want to replicate:
<property>
<name>dfs.replication</name>
<value>1</value>
</property>