hadoop错误日志

来源:互联网 发布:比价软件淘宝小密 编辑:程序博客网 时间:2024/06/06 01:40

现象:3个节点,启动之后namenode报错,且存活节点( Live Nodes )只显示1个

2013-05-14 20:01:09,839 INFO org.apache.hadoop.ipc.Server: IPC Server handler 9 on 9000: starting

2013-05-14 20:01:13,659 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:hadoop cause:java.io.IOException: File /home/hadoop/bigdata/hadoop-1.0.4/hadoopdata/mapreduce/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
2013-05-14 20:01:13,660 INFO org.apache.hadoop.ipc.Server: IPC Server handler 0 on 9000, call addBlock(/home/hadoop/bigdata/hadoop-1.0.4/hadoopdata/mapreduce/system/jobtracker.info, DFSClient_1548490558, null) from 172.16.201.170:60801: error: java.io.IOException: File /home/hadoop/bigdata/hadoop-1.0.4/hadoopdata/mapreduce/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
java.io.IOException: File /home/hadoop/bigdata/hadoop-1.0.4/hadoopdata/mapreduce/system/jobtracker.info could only be replicated to 0 nodes, instead of 1
        at org.apache.hadoop.hdfs.server.namenode.FSNamesystem.getAdditionalBlock(FSNamesystem.java:1558)
        at org.apache.hadoop.hdfs.server.namenode.NameNode.addBlock(NameNode.java:696)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:563)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1388)
        at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:1384)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)

        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:1382)

解决方案:

关闭防火墙:sudo ufw disable

2,hadoop1.0.4编译出错

compile:
     [echo] contrib: gridmix
    [javac] /home/hadoop/hadoopsrc/hadoop1.0.4/src/contrib/build-contrib.xml:185: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 31 source files to /home/hadoop/hadoopsrc/hadoop1.0.4/build/contrib/gridmix/classes
    [javac] /home/hadoop/hadoopsrc/hadoop1.0.4/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/Gridmix.java:396: error: type argument ? extends T is not within bounds of type-variable E
    [javac]   private <T> String getEnumValues(Enum<? extends T>[] e) {
    [javac]                                         ^
    [javac]   where T,E are type-variables:
    [javac]     T extends Object declared in method <T>getEnumValues(Enum<? extends T>[])
    [javac]     E extends Enum<E> declared in class Enum
    [javac] /home/hadoop/hadoopsrc/hadoop1.0.4/src/contrib/gridmix/src/java/org/apache/hadoop/mapred/gridmix/Gridmix.java:399: error: type argument ? extends T is not within bounds of type-variable E
    [javac]     for (Enum<? extends T> v : e) {
    [javac]               ^
    [javac]   where T,E are type-variables:
    [javac]     T extends Object declared in method <T>getEnumValues(Enum<? extends T>[])
    [javac]     E extends Enum<E> declared in class Enum
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors

解决方案:

将 private <T> String getEnumValues(Enum<? extends T>[] e) {

改为private String getEnumValues(Enum<?>[] e) { 

 StringBuilder sb = new StringBuilder(); 

String sep = "";

将 for (Enum<? extends T> v : e) {

改为 for (Enum<?> v : e) { 

sb.append(sep);       sb.append(v.name());       sep = "|";


原创粉丝点击