Github user srdo commented on a diff in the pull request:
https://github.com/apache/storm/pull/2698#discussion_r193084777
--- Diff:
storm-client/src/jvm/org/apache/storm/container/cgroup/SystemOperation.java ---
@@ -54,8 +55,8 @@ public static String exec(String cmd) throws IOException {
Process process = new ProcessBuilder(new String[]{ "/bin/bash",
"-c", cmd }).start();
try {
process.waitFor();
- String output = IOUtils.toString(process.getInputStream());
- String errorOutput =
IOUtils.toString(process.getErrorStream());
+ String output = IOUtils.toString(process.getInputStream(),
Charsets.UTF_8);
--- End diff --
No, I think UTF-8 makes sense. Wasn't aware it was the default for bash. I
thought maybe
https://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html#defaultCharset()
would work, but I'm not sure that will match the encoding used by bash.
---