Description
The following error is thrown when an own implementation of PrefixAdditionFilter is specified with parameter -filter for seqdirectory.
Exception in thread "main" java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.mahout.text.SequenceFilesFromDirectory.run(SequenceFilesFromDirectory.java:96)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
at org.apache.mahout.text.SequenceFilesFromDirectory.main(SequenceFilesFromDirectory.java:53)
In class org.apache.mahout.text.SequenceFilesFromDirectory line 96 the following additional parameter should be inserted into the reflection call of the ctor: "charset"
Raises Error:
pathFilter = constructor.newInstance(conf, keyPrefix, options, writer, fs);
Fix:
pathFilter = constructor.newInstance(conf, keyPrefix, options, writer, charset, fs);