TEZ-3037. History URL should be set regardless of which history logging service is enabled. (hitesh)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/b47af572 Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/b47af572 Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/b47af572 Branch: refs/heads/TEZ-2980 Commit: b47af5729360ce6d171baf624f3e97f946d0b733 Parents: 885ad73 Author: Hitesh Shah <[email protected]> Authored: Thu Jan 14 14:10:10 2016 -0800 Committer: Hitesh Shah <[email protected]> Committed: Thu Jan 14 14:10:10 2016 -0800 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../org/apache/tez/dag/app/rm/TaskSchedulerManager.java | 5 +---- .../apache/tez/dag/app/rm/TestTaskSchedulerManager.java | 11 +++-------- 3 files changed, 6 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tez/blob/b47af572/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index a9dc823..d6a53aa 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -6,6 +6,7 @@ Release 0.8.3: Unreleased INCOMPATIBLE CHANGES ALL CHANGES: + TEZ-3037. History URL should be set regardless of which history logging service is enabled. TEZ-3032. DAG start time getting logged using system time instead of recorded time in startTime field. Release 0.8.2: 2016-01-19 @@ -313,6 +314,7 @@ INCOMPATIBLE CHANGES TEZ-2949. Allow duplicate dag names within session for Tez. ALL CHANGES + TEZ-3037. History URL should be set regardless of which history logging service is enabled. TEZ-3032. DAG start time getting logged using system time instead of recorded time in startTime field. TEZ-2129. Task and Attempt views should contain links to the logs TEZ-3025. InputInitializer creation should use the dag ugi. http://git-wip-us.apache.org/repos/asf/tez/blob/b47af572/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java ---------------------------------------------------------------------- diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java index e4612b6..fa9fb81 100644 --- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java +++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/TaskSchedulerManager.java @@ -943,14 +943,11 @@ public class TaskSchedulerManager extends AbstractService implements Configuration config = this.appContext.getAMConf(); String historyUrl = ""; - String loggingClass = config.get(TezConfiguration.TEZ_HISTORY_LOGGING_SERVICE_CLASS, ""); String historyUrlTemplate = config.get(TezConfiguration.TEZ_AM_TEZ_UI_HISTORY_URL_TEMPLATE, TezConfiguration.TEZ_AM_TEZ_UI_HISTORY_URL_TEMPLATE_DEFAULT); String historyUrlBase = config.get(TezConfiguration.TEZ_HISTORY_URL_BASE, ""); - - if (loggingClass.equals("org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService") && - !historyUrlTemplate.isEmpty() && + if (!historyUrlTemplate.isEmpty() && !historyUrlBase.isEmpty()) { // replace the placeholders, while tolerating extra or missing "/" in input. replace all // instances of consecutive "/" with single (except for the http(s):// case http://git-wip-us.apache.org/repos/asf/tez/blob/b47af572/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerManager.java ---------------------------------------------------------------------- diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerManager.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerManager.java index c62ff21..4d828e2 100644 --- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerManager.java +++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskSchedulerManager.java @@ -381,17 +381,12 @@ public class TestTaskSchedulerManager { @Test (timeout = 5000) public void testHistoryUrlConf() throws Exception { Configuration conf = schedulerHandler.appContext.getAMConf(); - - // ensure history url is empty when timeline server is not the logging class - conf.set(TezConfiguration.TEZ_HISTORY_URL_BASE, "http://ui-host:9999"); - assertTrue("".equals(schedulerHandler.getHistoryUrl())); - - // ensure expansion of url happens - conf.set(TezConfiguration.TEZ_HISTORY_LOGGING_SERVICE_CLASS, - "org.apache.tez.dag.history.logging.ats.ATSHistoryLoggingService"); final ApplicationId mockApplicationId = mock(ApplicationId.class); doReturn("TEST_APP_ID").when(mockApplicationId).toString(); doReturn(mockApplicationId).when(mockAppContext).getApplicationID(); + + // ensure history url is empty when timeline server is not the logging class + conf.set(TezConfiguration.TEZ_HISTORY_URL_BASE, "http://ui-host:9999"); assertTrue("http://ui-host:9999/#/tez-app/TEST_APP_ID" .equals(schedulerHandler.getHistoryUrl()));
