<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="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 http://www.apache.org/licenses/LICENSE-2.0 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.name.dir</name> <value>/data/hadoop2.0_nn_fsimage</value> </property> <property> <name>dfs.namenode.edits.dir</name> <value>/data/hadoop2.0_nn_edits</value> </property> <property> <name>dfs.datanode.data.dir</name> <value>/data/hadoop2.0_dn</value> </property> <property> <name>dfs.nameservices</name> <value>goon</value> </property> <property> <name>dfs.ha.namenodes.goon</name> <value>primaryNN,standbyNN</value> </property> <property> <name>dfs.namenode.rpc-address.goon.primaryNN</name> <value>sdc2:9000</value> </property> <property> <name>dfs.namenode.rpc-address.goon.standbyNN</name> <value>sdc1:9000</value> </property> <property> <name>dfs.namenode.http-address.goon.primaryNN</name> <value>sdc2:50070</value> </property> <property> <name>dfs.namenode.http-address.goon.standbyNN</name> <value>sdc1:50070</value> </property> <property> <name>dfs.namenode.shared.edits.dir</name> <value>/data/hadoop2.0_shared</value> </property> <property> <name>dfs.client.failover.proxy.provider.goon</name> <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value> </property> <property> <name>dfs.ha.fencing.methods</name> <value>sshfence</value> </property> <property> <name>dfs.ha.fencing.ssh.private-key-files</name> <value>/home/hadoop/.ssh/id_rsa</value> </property> <property> <name>dfs.ha.automatic-failover.enabled</name> <value>true</value> </property> <property> <name>ha.zookeeper.quorum</name> <value>10.28.169.225:2181</value> </property></configuration>4.3 修改core-site.xml[html]view plaincopyprint?
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://goon</value>
</property>
</configuration>
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="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 http://www.apache.org/licenses/LICENSE-2.0 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://goon</value> </property></configuration> 4.4 修改mapred-site.xml文件[html]view plaincopyprint?