到此为止配置完毕 如果不行的化可能需要点右键运行一遍 5.window+r打开 cmd窗口输入 hadoop测试

时间:2022-02-16 04:08:11

到此为止配置完毕 如果不行的化可能需要点右键运行一遍 5.window+r打开 cmd窗口输入 hadoop测试

2.改削etc\hadoop下的文件(注意以下配置文件下所有的地点都是从Linux集群中的hadoop  jar粘贴复制过来的)

4个配置文件

core-site.xml

到此为止配置完毕 如果不行的化可能需要点右键运行一遍 5.window+r打开 cmd窗口输入 hadoop测试

<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="http://www.mamicode.com/configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property>    <name>fs.defaultFS</name>    <value>hdfs://master:9000</value> </property>   <property>      <name>hadoop.tmp.dir</name>      <value>/usr/local/hadoop-2.8.0/tmp</value> //linux集群中的地点 </property> </configuration>

mapred-site.xml

<?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="http://www.mamicode.com/configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration>  <property>     <name>mapreduce.framework.name</name>     <value>yarn</value>   </property>   <property>     <name>mapreduce.jobhistory.address</name>     <value>master:10020</value>   </property>   <property>     <name>mapreduce.jobhistory.address</name>     <value>master:19888</value>   </property> </configuration>

hdfs-site.xml

<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="http://www.mamicode.com/configuration.xsl"?> <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. See accompanying LICENSE file. --> <!-- Put site-specific property overrides in this file. --> <configuration> <property>       <name>dfs.namenode.secondary.http-address</name>       <value>master:50090</value>     </property>     <property>       <name>dfs.replication</name>       <value>2</value>     </property>     <property>       <name>dfs.namenode.name.dir</name>       <value>file:/usr/local/hadoop-2.8.0/hdfs/name</value>     </property>     <property>       <name>dfs.datanode.data.dir</name>       <value>file:/usr/local/hadoop-2.8.0/hdfs/data</value>     </property> </configuration>

yarn-site.xml