Skip to content

Commit

Permalink
using env HADOOP_HOME in heap dump script
Browse files Browse the repository at this point in the history
  • Loading branch information
NoTrace7 committed Mar 16, 2015
1 parent 006675e commit a949576
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public static void generateDumpScript(Path dumpScript, FileSystem fs, String hea
BufferedWriter scriptWriter =
closer.register(new BufferedWriter(new OutputStreamWriter(fs.create(dumpScript), Charset
.forName(ConfigurationKeys.DEFAULT_CHARSET_ENCODING))));
scriptWriter.write("#!/bin/sh\n" + "hadoop dfs -put " + heapFileName + " " + dumpDir + "/${PWD//\\//_}.hprof");
scriptWriter.write("#!/bin/sh\n" + "${HADOOP_HOME}/bin/hadoop dfs -put " + heapFileName + " " + dumpDir
+ "/${PWD//\\//_}.hprof");
} catch (IOException ioe) {
LOG.error("Heap dump script is not generated successfully.");
if (fs.exists(dumpScript)) {
Expand Down

0 comments on commit a949576

Please sign in to comment.