上次修改了hostname,没有在/etc/hosts里面也把映射给改过来,结果就报错了,打不到Host. 编辑/etc/hosts,把映射"127.0.0.1 hadoop1 hadoop1"加上去就好了。
[hadoop@localhost hadoop-2.6.4]$ source /etc/profile
[hadoop@localhost hadoop-2.6.4]$ echo $JAVA_HOME
/devsoftware/jdk1.7.0_01
[hadoop@localhost hadoop-2.6.4]$ bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.4.jar grep input output 'dfs[a-z.]+'
16/08/21 23:41:02 INFO Configuration.deprecation: session.id is deprecated. Instead, use dfs.metrics.session-id
16/08/21 23:41:02 INFO jvm.JvmMetrics: Initializing JVM Metrics with processName=JobTracker, sessionId=
16/08/21 23:41:02 INFO metrics.MetricsUtil: Unable to obtain hostName
java.net.UnknownHostException: hadoop1: hadoop1
at java.net.InetAddress.getLocalHost(InetAddress.java:1438)
at org.apache.hadoop.metrics.MetricsUtil.getHostName(MetricsUtil.java:95)
at org.apache.hadoop.metrics.MetricsUtil.createRecord(MetricsUtil.java:84)
at org.apache.hadoop.metrics.jvm.JvmMetrics.<init>(JvmMetrics.java:87)
at org.apache.hadoop.metrics.jvm.JvmMetrics.init(JvmMetrics.java:78)
at org.apache.hadoop.metrics.jvm.JvmMetrics.init(JvmMetrics.java:65)
at org.apache.hadoop.mapred.LocalJobRunnerMetrics.<init>(LocalJobRunnerMetrics.java:40)
at org.apache.hadoop.mapred.LocalJobRunner.<init>(LocalJobRunner.java:714)
at org.apache.hadoop.mapred.LocalJobRunner.<init>(LocalJobRunner.java:707)
at org.apache.hadoop.mapred.LocalClientProtocolProvider.create(LocalClientProtocolProvider.java:42)
at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:95)
at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
at org.apache
"INFO metrics.MetricsUtil: Unable to obtain hostName"
最新推荐文章于 2022-04-21 02:13:11 发布