【问题标题】:Error in generating Behemoth corpus生成 Behemoth 语料库时出错
【发布时间】:2013-03-18 05:07:03
【问题描述】:

我是 hadoop 和巨兽的新手,我按照https://github.com/DigitalPebble/behemoth/wiki/tutorial 上的教程使用以下命令为文本文档生成巨兽语料库:

sudo bin/hadoop jar /home/madhumita/behemoth/core/target/behemoth-core-*-job.jar com.digitalpebble.behemoth.util.CorpusGenerator -i /home/madhumita/Documents/testFile -o /主页/madhumita/behemoth/testGateOpCorpus

我收到错误:

错误 util.CorpusGenerator:输入不存在:/home/madhumita/Documents/testFile

每次我运行命令时,虽然我已经用 gedit 检查了路径是否正确。我在网上搜索了任何类似的问题,但我找不到任何类似的问题。 关于它为什么会发生的任何想法?如果 .txt 文件格式不可接受,需要的文件格式是什么?

【问题讨论】:

    标签: hadoop behemoth


    【解决方案1】:

    好的,我设法解决了这个问题。所需的输入路径是hadoop分布式文件系统上的文件路径,而不是本地机器上的路径。

    所以首先我将本地文件复制到 HDFS 上的 /data/test.txt 并将此路径作为输入参数。命令如下:

        sudo bin/hadoop fs -copyFromLocal /home/madhumita/Documents/testFile/test.txt /docs/test.txt
    
        sudo bin/hadoop jar /home/madhumita/behemoth/core/target/behemoth-core-*-job.jar com.digitalpebble.behemoth.util.CorpusGenerator -i /docs/test.txt -o /docs/behemoth/test
    

    这解决了这个问题。感谢所有尝试解决问题的人。

    【讨论】:

      【解决方案2】:

      要直接从本地文件系统生成 Behemoth 语料库,请使用文件协议引用它。 (file:///)

      hadoop jar core/target/behemoth-core-*-job.jar com.digitalpebble.behemoth.util.CorpusGenerator -i "file:///home/madhumita/Documents/testFile/test.txt" -o "/docs/behemoth/test"
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-06-29
        • 2016-10-15
        • 2023-03-22
        • 1970-01-01
        • 2022-01-18
        • 2018-11-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多