Hadoop安装出错

时间:2012-10-31 11:10:50

标签: java python apache hadoop hadoop-streaming

我正在尝试通过查看here

在Fedora计算机上安装Hadoop
  1. 安装了java(并验证了java是否与java -version一起存在)并且它存在
  2. 我安装了ssh(因为它是linux)
  3. here
  4. 下载最新版本hadoop 1.0.4

    我已按照以下

    中的安装教程(上面给出的链接)中显示的过程进行操作
    $ mkdir input 
    $ cp conf/*.xml input 
    $ bin/hadoop jar hadoop-examples.1.0.4.jar grep input output 'dfs[a-z.]+' 
    

    然后我收到了以下错误,我无法理解

    sh-4.2$ bin/hadoop jar hadoop-examples-1.0.4.jar grep input output 'dfs[a-z.]+'
    12/10/31 16:14:35 INFO util.NativeCodeLoader: Loaded the native-hadoop library
    12/10/31 16:14:35 WARN snappy.LoadSnappy: Snappy native library not loaded
    12/10/31 16:14:35 INFO mapred.FileInputFormat: Total input paths to process : 8
    12/10/31 16:14:35 INFO mapred.JobClient: Cleaning up the staging area file:/tmp/hadoop-thomas/mapred/staging/shivakrishnab-857393825/.staging/job_local_0001
    12/10/31 16:14:35 ERROR security.UserGroupInformation: PriviledgedActionException as:thomas cause:java.io.IOException: Not a file: file:/home/local/thomas/Hadoop/hadoop-1.0.4/input/conf
    java.io.IOException: Not a file: file:/home/local/thomas/Hadoop/hadoop-1.0.4/input/conf
        at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:215)
        at org.apache.hadoop.mapred.JobClient.writeOldSplits(JobClient.java:989)
        at org.apache.hadoop.mapred.JobClient.writeSplits(JobClient.java:981)
        at org.apache.hadoop.mapred.JobClient.access$600(JobClient.java:174)
        at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:897)
        at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:416)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
        at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
        at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:824)
        at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:1261)
        at org.apache.hadoop.examples.Grep.run(Grep.java:69)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
        at org.apache.hadoop.examples.Grep.main(Grep.java:93)
        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:616)
        at org.apache.hadoop.util.ProgramDriver$ProgramDescription.invoke(ProgramDriver.java:68)
        at org.apache.hadoop.util.ProgramDriver.driver(ProgramDriver.java:139)
        at org.apache.hadoop.examples.ExampleDriver.main(ExampleDriver.java:64)
        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:616)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
    

    任何人都可以让我知道我的机器/代码有什么问题,怎么做才能避免这个错误?

2 个答案:

答案 0 :(得分:0)

这可能与JVM有关,并且Hadoop(某些版本)中存在关于文件权限的已知问题。 请查看此链接:

       https://issues.apache.org/jira/browse/HADOOP-7682

希望这有帮助

答案 1 :(得分:0)

首先,预先安装ssh并不意味着它已经配置好了。你需要ssh和sshd以及密钥对。它应该是无密码的,'最好'。请确保你能够ssh到主机没有任何错误。所以,确保所有hadoop守护进程运行正常。如果我们可以看看你的错误会更好日志。我已经编写了完整的程序来配置hadoop here,以防您需要任何帮助。