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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]