You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2015/12/01 01:11:40 UTC

ambari git commit: Revert "AMBARI-14058. "Application Tracking URL" in Tez View broken due to RM HA changes in Ambari views framework. (Dipayan Bhowmick)"

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ee26fe050 -> ebd59e295


Revert "AMBARI-14058. "Application Tracking URL" in Tez View broken due to RM HA changes in Ambari views framework. (Dipayan Bhowmick)"

This reverts commit 5fb8fa27ee6172d04521830187845dfb2c8d3c8c.


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

Branch: refs/heads/branch-2.1
Commit: ebd59e295bba512ab61b8d2307b43b73bbc78443
Parents: ee26fe0
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Mon Nov 30 16:05:51 2015 -0800
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Mon Nov 30 16:11:14 2015 -0800

----------------------------------------------------------------------
 .../ambari/view/tez/rest/BaseProxyResource.java | 21 +-------------------
 .../resources/ui/scripts/init-ambari-view.js    |  3 ---
 2 files changed, 1 insertion(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ebd59e29/contrib/views/tez/src/main/java/org/apache/ambari/view/tez/rest/BaseProxyResource.java
----------------------------------------------------------------------
diff --git a/contrib/views/tez/src/main/java/org/apache/ambari/view/tez/rest/BaseProxyResource.java b/contrib/views/tez/src/main/java/org/apache/ambari/view/tez/rest/BaseProxyResource.java
index 5f8fb91..3670a40 100644
--- a/contrib/views/tez/src/main/java/org/apache/ambari/view/tez/rest/BaseProxyResource.java
+++ b/contrib/views/tez/src/main/java/org/apache/ambari/view/tez/rest/BaseProxyResource.java
@@ -19,7 +19,6 @@
 package org.apache.ambari.view.tez.rest;
 
 import com.google.inject.Inject;
-import org.apache.ambari.view.tez.exceptions.ProxyException;
 import org.apache.ambari.view.tez.utils.ProxyHelper;
 import org.json.simple.JSONObject;
 import org.json.simple.JSONValue;
@@ -28,13 +27,7 @@ import javax.ws.rs.GET;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import java.net.URI;
-import java.net.URISyntaxException;
+import javax.ws.rs.core.*;
 import java.util.HashMap;
 
 /**
@@ -57,18 +50,6 @@ public abstract class BaseProxyResource {
     String response = proxyHelper.getResponse(url, new HashMap<String, String>());
 
     JSONObject jsonObject = (JSONObject) JSONValue.parse(response);
-
-    // If the endpoint returns some other format apart from JSON,
-    // we will only redirect the request. This is required because UI may call
-    // the proxy endpoint to directly point to any URL of RM/ATS.
-    if (jsonObject == null) {
-      try {
-        return Response.temporaryRedirect(new URI(url)).build();
-      } catch (URISyntaxException e) {
-        throw new ProxyException("Failed to set the redirection url to : " + url + ".Internal Error.",
-          Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), e.getMessage());
-      }
-    }
     return Response.ok(jsonObject).type(MediaType.APPLICATION_JSON).build();
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ebd59e29/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js
----------------------------------------------------------------------
diff --git a/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js b/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js
index c443726..5152fb9 100644
--- a/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js
+++ b/contrib/views/tez/src/main/resources/ui/scripts/init-ambari-view.js
@@ -164,9 +164,6 @@ function setConfigs() {
       aminfo: '%@rmproxy/proxy/__app_id__/ws/v1/tez'.fmt(resourcesPrefix),
       aminfoV2: '%@rmproxy/proxy/__app_id__/ws/v2/tez'.fmt(resourcesPrefix),
       cluster: '%@rmproxy/ws/v1/cluster'.fmt(resourcesPrefix)
-    },
-    otherNamespace: {
-      cluster: '%@rmproxy/cluster'.fmt(resourcesPrefix)
     }
   });