tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject tez git commit: TEZ-2092. Tez UI history url handler injects spurious trailing slash. (hitesh)
Date Fri, 13 Feb 2015 17:31:31 GMT
Repository: tez
Updated Branches:
  refs/heads/branch-0.6 d26b8b2f2 -> 7bcc3482a


TEZ-2092. Tez UI history url handler injects spurious trailing slash. (hitesh)

(cherry picked from commit 6f0825d0fbee49f652e3341b82e63d13d33d59c4)


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

Branch: refs/heads/branch-0.6
Commit: 7bcc3482a77d89a1d2b000f2993497e431be15ec
Parents: d26b8b2
Author: Hitesh Shah <hitesh@apache.org>
Authored: Fri Feb 13 09:30:49 2015 -0800
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Fri Feb 13 09:31:26 2015 -0800

----------------------------------------------------------------------
 CHANGES.txt                                                   | 1 +
 .../org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java  | 2 +-
 .../apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java  | 7 +++++++
 3 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/7bcc3482/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index cc4bc6a..06f000f 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.1: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-2092. Tez UI history url handler injects spurious trailing slash.
   TEZ-2098. Tez UI: Dag details should be the default page for dag, fix invalid time entries
for failed Vertices.
   TEZ-2024. TaskFinishedEvent may not be logged in recovery.
   TEZ-2031. Tez UI: horizontal scrollbars do not appear in tables, causing them to look truncated.


http://git-wip-us.apache.org/repos/asf/tez/blob/7bcc3482/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java
b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java
index 4fd655e..05cbc66 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerEventHandler.java
@@ -604,7 +604,7 @@ public class TaskSchedulerEventHandler extends AbstractService
       // instances of consecutive "/" with single (except for the http(s):// case
       historyUrl = historyUrlTemplate
           .replaceAll(APPLICATION_ID_PLACEHOLDER, appContext.getApplicationID().toString())
-          .replaceAll(HISTORY_URL_BASE, historyUrlBase + "/")
+          .replaceAll(HISTORY_URL_BASE, historyUrlBase)
           .replaceAll("([^:])/{2,}", "$1/");
     }
 

http://git-wip-us.apache.org/repos/asf/tez/blob/7bcc3482/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java
b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java
index 1611859..7bb9d9b 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerEventHandler.java
@@ -280,6 +280,13 @@ public class TestTaskSchedulerEventHandler {
         "__HISTORY_URL_BASE__#/somepath");
     Assert.assertTrue("http://ui-host:9998/#/somepath"
         .equals(schedulerHandler.getHistoryUrl()));
+
+    conf.set(TezConfiguration.TEZ_AM_TEZ_UI_HISTORY_URL_TEMPLATE,
+        "__HISTORY_URL_BASE__?viewPath=tez-app/__APPLICATION_ID__");
+    conf.set(TezConfiguration.TEZ_HISTORY_URL_BASE, "http://localhost/ui/tez");
+    Assert.assertTrue("http://localhost/ui/tez?viewPath=tez-app/TEST_APP_ID"
+        .equals(schedulerHandler.getHistoryUrl()));
+
   }
 
 }


Mime
View raw message