@Test public void shouldReturnATSUrlConfiguredInCustomMode() throws Exception { Map<String, String> map = new HashMap<>(); map.put("yarn.ats.url", HTTP_RM_URL1); ViewContext viewContext = getViewContext(map); AmbariApi ambariApi = createNiceMock(AmbariApi.class); expect(ambariApi.isClusterAssociated()).andReturn(false); replay(viewContext); Services services = new Services(ambariApi, viewContext); assertEquals(HTTP_RM_URL1, services.getTimelineServerUrl()); }
public String getTimelineServerUrl() { String url = context.getCluster() != null ? getATSUrlFromCluster() : getATSUrlFromCustom(); return removeTrailingSlash(url); }
Services { public String getTimelineServerUrl() { String url = context.getCluster() != null ? getATSUrlFromCluster() : getATSUrlFromCustom(); return removeTrailingSlash(url); } }
Services { public String getTimelineServerUrl() { String url = context.getCluster() != null ? getATSUrlFromCluster() : getATSUrlFromCustom(); return removeTrailingSlash(url); } Services(AmbariApi ambariApi, ViewContext context); }
Services { public String getTimelineServerUrl() { String url = context.getCluster() != null ? getATSUrlFromCluster() : getATSUrlFromCustom(); return removeTrailingSlash(url); } Services(AmbariApi ambariApi, ViewContext context); String getRMUrl(); String getWebHCatURL(); String getTimelineServerUrl(); String getYARNProtocol(); static String addProtocolIfMissing(String url, String protocol); static boolean hasProtocol(String[] urls); static boolean hasProtocol(String url); String getHadoopHttpWebAuthType(); String getTimelineServerAuthType(); }
Services { public String getTimelineServerUrl() { String url = context.getCluster() != null ? getATSUrlFromCluster() : getATSUrlFromCustom(); return removeTrailingSlash(url); } Services(AmbariApi ambariApi, ViewContext context); String getRMUrl(); String getWebHCatURL(); String getTimelineServerUrl(); String getYARNProtocol(); static String addProtocolIfMissing(String url, String protocol); static boolean hasProtocol(String[] urls); static boolean hasProtocol(String url); String getHadoopHttpWebAuthType(); String getTimelineServerAuthType(); static final String HTTPS_ONLY; static final String HTTP_ONLY; static final String YARN_SITE; static final String YARN_HTTP_POLICY; static final String YARN_RESOURCEMANAGER_HA_ENABLED; static final String RM_INFO_API_ENDPOINT; static final String TIMELINE_AUTH_TYPE_PROP_KEY; static final String HADOOP_HTTP_AUTH_TYPE_KEY; }