hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rkan...@apache.org
Subject hadoop git commit: MAPREDUCE-6503. archive-logs tool should use HADOOP_PREFIX instead of HADOOP_HOME (rkanter)
Date Tue, 06 Oct 2015 23:55:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 fa3e77429 -> e5bf4594c


MAPREDUCE-6503. archive-logs tool should use HADOOP_PREFIX instead of HADOOP_HOME (rkanter)

(cherry picked from commit 1bca1bb5175b5976a5a0e45b6e1c4486bdf87a0e)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/e5bf4594
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/e5bf4594
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/e5bf4594

Branch: refs/heads/branch-2
Commit: e5bf4594cc9749bd35313243acbcc167b8764708
Parents: fa3e774
Author: Robert Kanter <rkanter@apache.org>
Authored: Tue Oct 6 16:49:50 2015 -0700
Committer: Robert Kanter <rkanter@apache.org>
Committed: Tue Oct 6 16:50:18 2015 -0700

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                             | 3 +++
 .../src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java | 4 ++--
 .../test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5bf4594/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index ae7f419..fb2400c 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -322,6 +322,9 @@ Release 2.8.0 - UNRELEASED
    MAPREDUCE-6485. Create a new task attempt with failed map task priority
    if in-progress attempts are unassigned. (Xianyin Xin via rohithsharmaks)
 
+   MAPREDUCE-6503. archive-logs tool should use HADOOP_PREFIX instead
+   of HADOOP_HOME (rkanter)
+
 Release 2.7.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5bf4594/hadoop-tools/hadoop-archive-logs/src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-archive-logs/src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java
b/hadoop-tools/hadoop-archive-logs/src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java
index 8b8e77b..b633521 100644
--- a/hadoop-tools/hadoop-archive-logs/src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java
+++ b/hadoop-tools/hadoop-archive-logs/src/main/java/org/apache/hadoop/tools/HadoopArchiveLogs.java
@@ -437,7 +437,7 @@ public class HadoopArchiveLogs implements Tool {
   fi
   export HADOOP_CLIENT_OPTS="-Xmx1024m"
   export HADOOP_CLASSPATH=/dist/share/hadoop/tools/lib/hadoop-archive-logs-2.8.0-SNAPSHOT.jar:/dist/share/hadoop/tools/lib/hadoop-archives-2.8.0-SNAPSHOT.jar
-  "$HADOOP_HOME"/bin/hadoop org.apache.hadoop.tools.HadoopArchiveLogsRunner -appId "$appId"
-user "$user" -workingDir /tmp/logs/archive-logs-work -remoteRootLogDir /tmp/logs -suffix
logs
+  "$HADOOP_PREFIX"/bin/hadoop org.apache.hadoop.tools.HadoopArchiveLogsRunner -appId "$appId"
-user "$user" -workingDir /tmp/logs/archive-logs-work -remoteRootLogDir /tmp/logs -suffix
logs
    */
   @VisibleForTesting
   void generateScript(File localScript, Path workingDir,
@@ -471,7 +471,7 @@ public class HadoopArchiveLogs implements Tool {
       fw.write("m\"\n");
       fw.write("export HADOOP_CLASSPATH=");
       fw.write(classpath);
-      fw.write("\n\"$HADOOP_HOME\"/bin/hadoop ");
+      fw.write("\n\"$HADOOP_PREFIX\"/bin/hadoop ");
       fw.write(HadoopArchiveLogsRunner.class.getName());
       fw.write(" -appId \"$appId\" -user \"$user\" -workingDir ");
       fw.write(workingDir.toString());

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e5bf4594/hadoop-tools/hadoop-archive-logs/src/test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-archive-logs/src/test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java
b/hadoop-tools/hadoop-archive-logs/src/test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java
index 3b8a40f..95835d1 100644
--- a/hadoop-tools/hadoop-archive-logs/src/test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java
+++ b/hadoop-tools/hadoop-archive-logs/src/test/java/org/apache/hadoop/tools/TestHadoopArchiveLogs.java
@@ -286,7 +286,7 @@ public class TestHadoopArchiveLogs {
     Assert.assertEquals("fi", lines[12]);
     Assert.assertEquals("export HADOOP_CLIENT_OPTS=\"-Xmx1024m\"", lines[13]);
     Assert.assertTrue(lines[14].startsWith("export HADOOP_CLASSPATH="));
-    Assert.assertEquals("\"$HADOOP_HOME\"/bin/hadoop org.apache.hadoop.tools." +
+    Assert.assertEquals("\"$HADOOP_PREFIX\"/bin/hadoop org.apache.hadoop.tools." +
         "HadoopArchiveLogsRunner -appId \"$appId\" -user \"$user\" -workingDir "
         + workingDir.toString() + " -remoteRootLogDir " +
         remoteRootLogDir.toString() + " -suffix " + suffix, lines[15]);


Mime
View raw message