wynot12 commented on a change in pull request #192: [NEMO-335] DB for storing 
metrics
URL: https://github.com/apache/incubator-nemo/pull/192#discussion_r256313393
 
 

 ##########
 File path: 
runtime/master/src/main/java/org/apache/nemo/runtime/master/metric/MetricStore.java
 ##########
 @@ -232,10 +325,7 @@ public void dumpAllMetricToFile(final String filePath) {
     final T metric = getMetricWithId(metricClass, id);
     final JsonFactory jsonFactory = new JsonFactory();
     final ByteArrayOutputStream stream = new ByteArrayOutputStream();
-    final JsonGenerator jsonGenerator;
-    try {
-      jsonGenerator = jsonFactory.createGenerator(stream, JsonEncoding.UTF8);
-
+    try (final JsonGenerator jsonGenerator = 
jsonFactory.createGenerator(stream, JsonEncoding.UTF8)) {
 
 Review comment:
   It's out of context, right?
   I'm okay to include it.
   I'm just asking for confirm.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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

Reply via email to