HADOOP-13179. GenericOptionsParser is not thread-safe because commons-cli OptionBuilder is not thread-safe. (Contributed by hongbin ma)

This commit is contained in:
Vinayakumar B 2016-06-14 15:58:04 +05:30
parent 20b13d109a
commit 8e8cb4c6ca
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,7 @@ public class GenericOptionsParser {
* Specify properties of each generic option
*/
@SuppressWarnings("static-access")
private static Options buildGeneralOptions(Options opts) {
private static synchronized Options buildGeneralOptions(Options opts) {
Option fs = OptionBuilder.withArgName("local|namenode:port")
.hasArg()
.withDescription("specify a namenode")