hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From naganarasimha...@apache.org
Subject hadoop git commit: YARN-6719. Fix findbugs warnings in SLSCapacityScheduler.java. Contributed by Akira Ajisaka.
Date Mon, 19 Jun 2017 07:13:18 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 023dcdc73 -> ac058c75a


YARN-6719. Fix findbugs warnings in SLSCapacityScheduler.java. Contributed by Akira Ajisaka.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ac058c75
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ac058c75
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ac058c75

Branch: refs/heads/branch-2
Commit: ac058c75a4d189a24f40c29a4129dd94e4455422
Parents: 023dcdc
Author: Naganarasimha <naganarasimha_gr@apache.org>
Authored: Mon Jun 19 12:41:13 2017 +0530
Committer: Naganarasimha <naganarasimha_gr@apache.org>
Committed: Mon Jun 19 12:41:13 2017 +0530

----------------------------------------------------------------------
 .../hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java  | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ac058c75/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java
b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java
index eebee6d..48b13c2 100644
--- a/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java
+++ b/hadoop-tools/hadoop-sls/src/main/java/org/apache/hadoop/yarn/sls/scheduler/SLSCapacityScheduler.java
@@ -26,8 +26,10 @@ import com.codahale.metrics.SlidingWindowReservoir;
 import com.codahale.metrics.Timer;
 import java.io.BufferedWriter;
 import java.io.File;
-import java.io.FileWriter;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -462,7 +464,8 @@ public class SLSCapacityScheduler extends CapacityScheduler implements
 
     // application running information
     jobRuntimeLogBW = new BufferedWriter(
-            new FileWriter(metricsOutputDir + "/jobruntime.csv"));
+        new OutputStreamWriter(new FileOutputStream(
+            metricsOutputDir + "/jobruntime.csv"), StandardCharsets.UTF_8));
     jobRuntimeLogBW.write("JobID,real_start_time,real_end_time," +
             "simulate_start_time,simulate_end_time" + EOL);
     jobRuntimeLogBW.flush();
@@ -667,7 +670,9 @@ public class SLSCapacityScheduler extends CapacityScheduler implements
     public MetricsLogRunnable() {
       try {
         metricsLogBW = new BufferedWriter(
-                new FileWriter(metricsOutputDir + "/realtimetrack.json"));
+            new OutputStreamWriter(new FileOutputStream(
+                metricsOutputDir + "/realtimetrack.json"),
+                StandardCharsets.UTF_8));
         metricsLogBW.write("[");
       } catch (IOException e) {
         e.printStackTrace();


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message