Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
0.13.0
-
None
-
None
Description
While creating Options in the PigStorage constructor via populateValidOptions(), we started using OptionBuilder to create option corresponding to "overwrite" feature. OptionBuilder overuses static variables whose state can be manipulated by multiple threads. So when PigStorage tries to create a "longOpt", there might be some other thread that might be updating "longOpt" to null with a reset on the static variables. This does not seem to be safe for use within a multithreaded context.
Here is the ST
Cause5:
java.lang.IllegalArgumentException: must specify longopt
Cause5-StackTrace:
at org.apache.commons.cli.OptionBuilder.create(OptionBuilder.java:330)
at org.apache.pig.builtin.PigStorage.populateValidOptions(PigStorage.java:172)
at org.apache.pig.builtin.PigStorage.<init>(PigStorage.java:207)
... 36 shared with parent