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:21:32 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 e47ec9413 -> 582bdfd42


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/582bdfd4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/582bdfd4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/582bdfd4

Branch: refs/heads/branch-2.8
Commit: 582bdfd423a1c163ed945cf0e686e58de1de39c0
Parents: e47ec94
Author: Naganarasimha <naganarasimha_gr@apache.org>
Authored: Mon Jun 19 12:47:25 2017 +0530
Committer: Naganarasimha <naganarasimha_gr@apache.org>
Committed: Mon Jun 19 12:47:25 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/582bdfd4/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 72807de..efb1716 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
@@ -84,8 +84,10 @@ import org.apache.log4j.Logger;
 
 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;
@@ -488,7 +490,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();
@@ -693,7 +696,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