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)) {