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:09 GMT
Repository: tez
Updated Branches:
  refs/heads/master 8e8405b37 -> 6f0825d0f


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


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

Branch: refs/heads/master
Commit: 6f0825d0fbee49f652e3341b82e63d13d33d59c4
Parents: 8e8405b
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:30:49 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/6f0825d0/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index df584a9..ec631b3 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -62,6 +62,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/6f0825d0/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/6f0825d0/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