[GitHub] [hadoop] steveloughran commented on a change in pull request #1222: HADOOP-16488 Deprecated JsonSerialization and move it out of hadoop-c…

2019-08-26 Thread GitBox
steveloughran commented on a change in pull request #1222: HADOOP-16488 
Deprecated JsonSerialization and move it out of hadoop-c…
URL: https://github.com/apache/hadoop/pull/1222#discussion_r317676033
 
 

 ##
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 ##
 @@ -62,13 +65,12 @@
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.PatternSyntaxException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
-
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
 
 Review comment:
   and similarly, dont reorder stuff even when its wrong...it makes backporting 
too hard


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] steveloughran commented on a change in pull request #1222: HADOOP-16488 Deprecated JsonSerialization and move it out of hadoop-c…

2019-08-26 Thread GitBox
steveloughran commented on a change in pull request #1222: HADOOP-16488 
Deprecated JsonSerialization and move it out of hadoop-c…
URL: https://github.com/apache/hadoop/pull/1222#discussion_r317675782
 
 

 ##
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 ##
 @@ -18,14 +18,18 @@
 
 package org.apache.hadoop.conf;
 
+import static org.apache.commons.lang3.StringUtils.isBlank;
 
 Review comment:
   these should go at the bottom; imports should be as unchanged as possible


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] steveloughran commented on a change in pull request #1222: HADOOP-16488 Deprecated JsonSerialization and move it out of hadoop-c…

2019-08-04 Thread GitBox
steveloughran commented on a change in pull request #1222: HADOOP-16488 
Deprecated JsonSerialization and move it out of hadoop-c…
URL: https://github.com/apache/hadoop/pull/1222#discussion_r310394644
 
 

 ##
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 ##
 @@ -3718,52 +3709,42 @@ public static void dumpConfiguration(Configuration 
config,
*/
   public static void dumpConfiguration(Configuration config,
   Writer out) throws IOException {
-JsonFactory dumpFactory = new JsonFactory();
-JsonGenerator dumpGenerator = dumpFactory.createGenerator(out);
-dumpGenerator.writeStartObject();
-dumpGenerator.writeFieldName("properties");
-dumpGenerator.writeStartArray();
-dumpGenerator.flush();
+JsonWriter jsonWriter = new JsonWriter(out);
+jsonWriter.beginObject().name("properties").beginArray().flush();
 
 Review comment:
   do we have tests for this writing of configs? If not, they're needed first


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[GitHub] [hadoop] steveloughran commented on a change in pull request #1222: HADOOP-16488 Deprecated JsonSerialization and move it out of hadoop-c…

2019-08-04 Thread GitBox
steveloughran commented on a change in pull request #1222: HADOOP-16488 
Deprecated JsonSerialization and move it out of hadoop-c…
URL: https://github.com/apache/hadoop/pull/1222#discussion_r310394607
 
 

 ##
 File path: 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/conf/Configuration.java
 ##
 @@ -106,12 +106,6 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.google.common.base.Preconditions;
-import com.google.common.base.Strings;
-
-import static org.apache.commons.lang3.StringUtils.isBlank;
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
-
 
 Review comment:
   your IDE is moving imports around which is shouldn't; this always makes 
backporting of patches to a key class harder. Can you leave out all changes to 
the imports except for those classes added/removed


This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org