hdfs-site.xml
hadoop.tmp.dir
/home/muzi/hadoop/data/tmp
Abase for other temporary directories.
fs.defaultFS
hdfs://mycluster
ha.zookeeper.quorum
muzid1:2181,muzid2:2181,muzid3:2181
yarn-site.xml
dfs.nameservices
mycluster
dfs.ha.namenodes.mycluster
nn1,nn2
dfs.namenode.rpc-address.mycluster.nn1
muzid1:9000
dfs.namenode.rpc-address.mycluster.nn2
muzid2:9000
dfs.namenode.http-address.mycluster.nn1
muzid1:50070
dfs.namenode.http-address.mycluster.nn2
muzid2:50070
dfs.namenode.shared.edits.dir
qjournal://muzid1:8485;muzid2:8485;muzid3:8485/mycluster
dfs.ha.fencing.methods
sshfence
dfs.ha.fencing.ssh.private-key-files
/root/.ssh/id_rsa
dfs.journalnode.edits.dir
/usr/local/hadoop/data/jn
dfs.client.failover.proxy.provider.mycluster
org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider
dfs.permissions.enable
false
dfs.ha.automatic-failover.enabled
true
yarn.resourcemanager.ha.enabled
true
yarn.resourcemanager.cluster-id
mycluster-yarn
yarn.resourcemanager.ha.rm-ids
rm1,rm2
yarn.resourcemanager.hostname.rm1
muzid1
yarn.resourcemanager.hostname.rm2
muzid2
yarn.resourcemanager.zk-address
192.168.64.145:2181,192.168.64.146:2181,192.168.64.147:2181
yarn.resourcemanager.recovery.enabled
true
yarn.resourcemanager.store.class
org.apache.hadoop.yarn.server.resourcemanager.recovery.ZKRMStateStore
yarn.nodemanager.aux-services
mapreduce_shuffle
yarn.application.classpath
根据hadoop信息配置
# muzid1上
hadoop-daemon.sh start journalnode
hdfs namenode -format
hadoop-daemon.sh start namenode
# muzid2上
hdfs namenode -bootstrapStandby
hadoop-daemon.sh start namenode
# muzid1上
hadoop-daemons.sh start datanode
hdfs haadmin -transitionToActive nn1
hdfs haadmin -getServiceState nn1
hdfs zkfc -formatZK
start-dfs.sh
# hadoop-daemon.sh start zkfc
错误信息start-yarn.sh
yarn-daemon.sh start resourcemanager
yarn rmadmin -getServiceState rm1
ERROR namenode.NameNode: Failed to start namenode.
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.
at org.apache.hadoop.hdfs.server.namenode.NNStorage.getStorageDirectory(NNStorage.java:336)
at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournals(FSEditLog.java:286)
at org.apache.hadoop.hdfs.server.namenode.FSEditLog.initJournalsForWrite(FSEditLog.java:257)
at org.apache.hadoop.hdfs.server.namenode.NameNode.format(NameNode.java:1190)
at org.apache.hadoop.hdfs.server.namenode.NameNode.createNameNode(NameNode.java:1655)
at org.apache.hadoop.hdfs.server.namenode.NameNode.main(NameNode.java:1782)
查看 core-site.xml文件中hadoop.tmp.dir值是否配置正确:
Error: JAVA_HOME is not set and could not be found.
修改hadoop-env.sh
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)