8、编辑配置文件并推送
备注:创建配置文件时,只写文件名称即可。不用写绝对路径,否则会报错
图1、“配置管理”| “Hadoop配置管理”
图2、“全局配置”| “添加全局配置”
图3、配置core-site.xml文件
图4、附core-site.xml文件内容
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <!-- global properties --> <property> <name>hadoop.tmp.dir</name> <value>/usr/hadoop/tmp</value> </property> <!-- file system properties --> <property> <name>fs.default.name</name> <value>hdfs://easy-master:9000</value> </property>
</configuration> |
图5、创建hdfs-site.xml
图6、附hdfs-site.xml文件内容
<?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> </property>
</configuration> |
备注:参数值表示集群中的数据的冗余次数,必须不小于datanode的节点个数。
图7、创建mapred-site.xml文件
图8、附mapred-site.xml文件内容
<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <!-- Put site-specific property overrides in this file. --> <configuration> <property> <name>mapred.job.tracker</name> <value>easy-master:9001</value> </property>
</configuration> |
图9、“全局配置” | “推送通用配置”
图10、“提交”
图11、推送配置文件完成 | “关闭”