public final class RouterWebServiceUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static javax.ws.rs.core.Response | clientResponseToResponse(com.sun.jersey.api.client.ClientResponse r) | 
| static org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo | deleteDuplicateNodesInfo(ArrayList<org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo> nodes)Deletes all the duplicate NodeInfo by discarding the old instances. | 
| protected static <T> T | genericForward(String webApp,
              javax.servlet.http.HttpServletRequest hsr,
              Class<T> returnType,
              HTTPMethods method,
              String targetPath,
              Object formParam,
              Map<String,String[]> additionalParam,
              org.apache.hadoop.conf.Configuration conf)Creates and performs a REST call to a specific WebService. | 
| protected static <T> String | getMediaTypeFromHttpServletRequest(javax.servlet.http.HttpServletRequest request,
                                  Class<T> returnType)Extract from HttpServletRequest the MediaType in output. | 
| static org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppsInfo | mergeAppsInfo(ArrayList<org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo> appsInfo,
             boolean returnPartialResult)Merges a list of AppInfo grouping by ApplicationId. | 
| static void | mergeMetrics(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo metrics,
            org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo metricsResponse)Adds all the values from the second ClusterMetricsInfo to the first one. | 
| static void | retrieveException(com.sun.jersey.api.client.ClientResponse response) | 
protected static <T> T genericForward(String webApp, javax.servlet.http.HttpServletRequest hsr, Class<T> returnType, HTTPMethods method, String targetPath, Object formParam, Map<String,String[]> additionalParam, org.apache.hadoop.conf.Configuration conf)
T - Type of return object.webApp - the address of the remote webaphsr - the servlet requestreturnType - the return type of the REST callmethod - the HTTP method of the REST calltargetPath - additional path to add to the webapp addressformParam - the form parameters as input for a specific REST calladditionalParam - the query parameters as input for a specific REST
          call in case the call has no servlet requestconf - Configuration objectpublic static javax.ws.rs.core.Response clientResponseToResponse(com.sun.jersey.api.client.ClientResponse r)
public static void retrieveException(com.sun.jersey.api.client.ClientResponse response)
public static org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppsInfo mergeAppsInfo(ArrayList<org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppInfo> appsInfo, boolean returnPartialResult)
appsInfo - a list of AppInfo to mergereturnPartialResult - if the merge AppsInfo should contain partial
          result or notpublic static org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodesInfo deleteDuplicateNodesInfo(ArrayList<org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.NodeInfo> nodes)
nodes - a list of NodeInfo to check for duplicatespublic static void mergeMetrics(org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo metrics,
                                org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo metricsResponse)
metrics - the ClusterMetricsInfo we want to updatemetricsResponse - the ClusterMetricsInfo we want to add to the first
          paramCopyright © 2008–2023 Apache Software Foundation. All rights reserved.