我尝试使用Apache Tika jar 1.6从文档中提取内容,并使用CDH4.6运行MapReduce作业。我使用了以下链接的代码
https://groups.google.com/forum/#!topic/chennaihug/waobSlV0-AE
但是当我运行代码时会抛出错误
14/11/12 17:14:55 INFO mapred.JobClient: Task Id : attempt_201411121354_0007_m_000000_1, Status : FAILED
Error: java.lang.ClassNotFoundException: org.apache.tika.exception.TikaException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at TikaFileInputFormat.createRecordReader(TikaFileInputFormat.java:15)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:644)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:330)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1438)
at org.apache.hadoop.mapred.Child.main(Child.java:262)
有人可以建议如何解决这个问题吗?