【问题标题】:Vectorizing a solr index with mahout using lucene.vector使用 lucene.vector 使用 mahout 对 solr 索引进行矢量化
【发布时间】:2012-06-09 08:36:13
【问题描述】:

我正在尝试使用 Mahout 在 Amazon EMR 上运行集群作业。 我有一个在 S3 上上传的 solr 索引,我想使用 mahouts lucene.vector 对其进行矢量化。(这是工作流程中的第一步)

该步骤的参数是:

  • 罐子:s3n://mahout-bucket/jars/mahout-core-0.6-job.jar
  • MainClass:org.apache.mahout.driver.MahoutDriver
  • Args: lucene.vector --dir s3n://mahout-input/solr_index/ --field name --dictOut /test/solr-dict-out/dict.txt --output /test/solr-vectors-输出/向量

日志中的错误是:

选择了未知程序“lucene.vector”。

我在本地使用 hadoop 和 Mahout 完成了相同的过程,并且效果很好。 如何在 EMR 上调用 lucene.vector 函数?

【问题讨论】:

    标签: mahout amazon-emr


    【解决方案1】:

    程序名,lucene.vector 应该紧跟在 bin/mahout 之后

    /homes/cuneyt/trunk/bin/mahout lucene.vector --dir /homes/cuneyt/lucene/index --field 0 --output lda/vector --dictOut /homes/cuneyt/lda/dict.txt

    【讨论】:

    • 由于我在 Amazons Elastic MapReduce 上将其作为自定义 jar 作业流运行,因此我只能使用来自 mahout 的 jar 文件。我已经找出问题并发布了答案
    【解决方案2】:

    我终于找到了答案。问题是我使用了错误的 MainClass 参数。而不是

    org.apache.mahout.driver.MahoutDriver
    

    我应该使用:

    org.apache.mahout.utils.vectors.lucene.Driver
    

    因此正确的论点应该是

    • Jar:s3n://mahout-bucket/jars/mahout-core-0.6-job.jar MainClass:
    • org.apache.mahout.utils.vectors.lucene.Driver
    • Args: --dir s3n://mahout-input/solr_index/ --field name --dictOut /test/solr-dict-out/dict.txt --output /test/solr-vectors-out/vectors

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-29
      • 2021-11-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多