diff --git a/samza-core/src/main/java/org/apache/samza/container/host/PosixCommandBasedStatisticsGetter.java b/samza-core/src/main/java/org/apache/samza/container/host/PosixCommandBasedStatisticsGetter.java index 11782617ac..bc2e9152f2 100644 --- a/samza-core/src/main/java/org/apache/samza/container/host/PosixCommandBasedStatisticsGetter.java +++ b/samza-core/src/main/java/org/apache/samza/container/host/PosixCommandBasedStatisticsGetter.java @@ -24,6 +24,7 @@ import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; +import java.nio.charset.Charset; /** * An implementation of {@link SystemStatisticsGetter} that relies on using Posix commands like ps. @@ -45,7 +46,7 @@ private String getCommandOutput(String[] cmdArray) throws IOException { String psOutput = null; try { - processReader = new BufferedReader(new InputStreamReader(executable.getInputStream())); + processReader = new BufferedReader(new InputStreamReader(executable.getInputStream(), Charset.forName("UTF-8"))); psOutput = processReader.readLine(); } finally { if (processReader != null) {