From a949576e742291bfd754b0fe8b7f51d89dfedfa4 Mon Sep 17 00:00:00 2001 From: YingDai Date: Mon, 16 Mar 2015 10:04:47 -0700 Subject: [PATCH] using env HADOOP_HOME in heap dump script --- .../src/main/java/gobblin/util/HeapDumpForTaskUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobblin-utility/src/main/java/gobblin/util/HeapDumpForTaskUtils.java b/gobblin-utility/src/main/java/gobblin/util/HeapDumpForTaskUtils.java index 45a2f1f5cc3..c0b24b9d1bb 100644 --- a/gobblin-utility/src/main/java/gobblin/util/HeapDumpForTaskUtils.java +++ b/gobblin-utility/src/main/java/gobblin/util/HeapDumpForTaskUtils.java @@ -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)) {