[ https://issues.apache.org/jira/browse/PIG-4223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prashant Kommireddi resolved PIG-4223. -------------------------------------- Resolution: Duplicate Dup of PIG-3988 > PigStorage using OptionBuilder is not thread-safe > ------------------------------------------------- > > Key: PIG-4223 > URL: https://issues.apache.org/jira/browse/PIG-4223 > Project: Pig > Issue Type: Bug > Affects Versions: 0.13.0 > Reporter: Prashant Kommireddi > Assignee: Prashant Kommireddi > Fix For: 0.14.0 > > > 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)