我正在使用mahout-exmaples jar中存在的XMLInputFormat.class解析xml文件。但是在运行 map 的jar文件时减少我得到以下错误
错误:java.lang.RuntimeException:java.lang.ClassNotFoundException:类org.apache.mahout.classifier.bayes.XmlInputFormat未找到
请让我知道在多节点hadoop集群上运行时如何使这些jar可用。
最佳答案
在hadoop jar ...命令的“-libjars”命令行选项中包含所有mahout-examples JAR。该jar将放置在分布式缓存中,并且可用于所有作业的任务尝试。更具体地说,您将在本地节点上的${mapred.local.dir}/taskTracker/archive/${user.name}/distcache/… subdirectories
之一中找到JAR。
有关更多详细信息,请引用此link。
关于hadoop - 如何将xml mahout分类器jar添加到hadoop集群中,因为我不想将该库添加到hadoop classpath中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36053616/