【问题标题】:Hadoop configurations seem not to be readHadoop 配置似乎没有被读取
【发布时间】:2012-03-29 09:38:07
【问题描述】:

每次我尝试启动我的 mapreduce 应用程序(在独立 Hadoop 中)时,它都会尝试将内容放入 tmp 目录中,但它不能:

Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-username\mapred\staging\username-1524148556\.staging to 0700

它与使用无效路径相关(斜线应该是 cygwin 的另一种方式)。

我在 core-site.xml 中设置了 hadoop.tmp.dir(在 Hadoop 的 conf 文件夹中),但似乎从未读取过配置文件(如果我在文件中放入语法错误,则没有区别) .我补充说:

--config /home/username/hadoop-1.0.1/conf

到命令,但没有区别。我也试过了:

export HADOOP_CONF_DIR=/home/username/hadoop-1.0.1/conf

但似乎也没有效果....

关于为什么无法读取配置的任何指示,或者我在这里看不到什么?

谢谢!

【问题讨论】:

  • 您运行的是 Cygwin 版本的 Hadoop 还是 Windows 版本?
  • @AlG:我从apache.mirror.versatel.nl/hadoop/common/hadoop-1.0.1下载了linux版本,有单独的cygwin版本吗?但即便如此,应该可以告诉 linux 版本不应该使用 /tmp 对吧?
  • 我刚查了一下,没有 Cygwin 版本。那条奇怪的路径是关键,也许 Linux 版本的 Hadoop 正在接替 Windows 版本的 Java?
  • 是的,路径是问题,现在我正在使用完整的 linux,因为我找不到配置该路径的地方....

标签: permissions hadoop cygwin configuration-files tmp


【解决方案1】:

不是斜线倒置,而是 /tmp 是一个 cygwin 路径,它实际上映射到 /cygwin/tmp 或 c:\cygwin\tmp。由于 hadoop 是 java 并且不知道 cygwin 映射,因此 /tmp 表示 c:\tmp。

如果你想在 cygwin 上运行 1.0.1,有很多东西需要修补。

见:http://en.wikisource.org/wiki/User:Fkorning/Code/Hadoop-on-Cygwin

【讨论】:

    【解决方案2】:

    我发现以下链接很有用,似乎问题在于较新版本的 Hadoop。我正在使用 1.0.4 版本,但我仍然面临这个问题。

    http://comments.gmane.org/gmane.comp.jakarta.lucene.hadoop.user/25837

    更新:在 Mahout 0.7 中以及对于使用“Mahoot in Action”书籍示例的人,您应该将示例代码更改如下:

        File outFile = new File("output");
        if (!outFile.exists()) {
            outFile.mkdir();
        }
        Path output = new Path("output");
        HadoopUtil.delete(conf, output);
    
        KMeansDriver.run(conf, new Path("testdata/points"), new Path("testdata/clusters"),
                output, new EuclideanDistanceMeasure(), 0.001, 10,
                true, 0.1, true);
    

    【讨论】:

      猜你喜欢
      • 2021-11-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-03-27
      • 2022-01-19
      • 1970-01-01
      • 2019-08-05
      相关资源
      最近更新 更多