代碼是在這裏:github link如何利用Lucene ShingleFilter:找不到實現類org.apache.lucene.analysis.tokenattributes.OffsetAttribute
錯誤是:
仁:空在[]]: java.lang.IllegalArgumentException:在org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:338)
找不到org.apache.lucene.analysis.tokenattributes.OffsetAttribute的實現類at org.apache.pig.backend.hadoop.executionengine.physicalLayer.rel ationalOperators.POForEach.processPlan(POForEach.java:378)
在org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNextTuple(POForEach.java:298)
在有機apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.runPipeline(PigGenericMapBase.java:282)
在org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGenericMapBase.java:277 )
at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigGenericMapBase.map(PigGe nericMapBase.java:64)
在org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
在org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java: 764)
在org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
在org.apache.hadoop.mapred.LocalJobRunner $ Job.run(LocalJobRunner.java:212)
引起:java.lang.IllegalArgumentException:無法找到org.apache.lucene.analy的實現類sis.tokenattributes.OffsetAttribute
在org.apache.lucene.util.AttributeSource $ AttributeFactory $ DefaultAttributeFactory.getClassForInterface(AttributeSource.java:94)
在org.apache.lucene.util.AttributeSource $ AttributeFactory $ DefaultAttributeFactory .createAttributeInstance(AttributeSource.java:67)
在org.apache.lucene.util.AttributeSource.addAttribute(AttributeSource.java:276)
在org.apache.lucene.analysis.standard.StandardTokenizer。( StandardTokenizer.java:171)
在datafu.pig.text.lucene.NGramTokenize.exec(NGramTokenize.java:48)
在datafu.pig.text.lucene.NGramTokenize.exec(NGramTokenize.java:33)
在org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:330)
在org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNextDataBag (POUserFunc.java:374)
at org.apache.pig.backend.hadoop.executionengine。physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:309)
... 9個