Class Router

java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.service.CompositeService
org.apache.hadoop.yarn.server.router.Router
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.service.Service

public class Router extends org.apache.hadoop.service.CompositeService
The router is a stateless YARN component which is the entry point to the cluster. It can be deployed on multiple nodes behind a Virtual IP (VIP) with a LoadBalancer. The Router exposes the ApplicationClientProtocol (RPC and REST) to the outside world, transparently hiding the presence of ResourceManager(s), which allows users to request and update reservations, submit and kill applications, and request status on running applications. In addition, it exposes the ResourceManager Admin API. This provides a placeholder for throttling mis-behaving clients (YARN-1546) and masks the access to multiple RMs (YARN-3659).
  • Field Details

    • clientRMProxyService

      @VisibleForTesting protected RouterClientRMService clientRMProxyService
    • rmAdminProxyService

      @VisibleForTesting protected RouterRMAdminService rmAdminProxyService
    • webAppAddress

      @VisibleForTesting protected String webAppAddress
    • SHUTDOWN_HOOK_PRIORITY

      public static final int SHUTDOWN_HOOK_PRIORITY
      Priority of the Router shutdown hook.
      See Also:
  • Constructor Details

    • Router

      public Router()
  • Method Details

    • doSecureLogin

      protected void doSecureLogin() throws IOException
      Throws:
      IOException
    • serviceInit

      protected void serviceInit(org.apache.hadoop.conf.Configuration config) throws Exception
      Overrides:
      serviceInit in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception
    • serviceStart

      protected void serviceStart() throws Exception
      Overrides:
      serviceStart in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception
    • serviceStop

      protected void serviceStop() throws Exception
      Overrides:
      serviceStop in class org.apache.hadoop.service.CompositeService
      Throws:
      Exception
    • shutDown

      protected void shutDown()
    • createClientRMProxyService

      protected RouterClientRMService createClientRMProxyService()
    • createRMAdminProxyService

      protected RouterRMAdminService createRMAdminProxyService()
    • getWebapp

      @Private public org.apache.hadoop.yarn.webapp.WebApp getWebapp()
    • startWepApp

      @VisibleForTesting public void startWepApp()
    • getProxyHostAndPort

      public static String getProxyHostAndPort(org.apache.hadoop.conf.Configuration conf)
    • main

      public static void main(String[] argv)
    • getClientRMProxyService

      @VisibleForTesting public RouterClientRMService getClientRMProxyService()
    • getRmAdminProxyService

      @VisibleForTesting public RouterRMAdminService getRmAdminProxyService()
    • getClusterTimeStamp

      public static long getClusterTimeStamp()
    • getFetcher

      @VisibleForTesting public org.apache.hadoop.yarn.server.webproxy.FedAppReportFetcher getFetcher()
    • removeApplication

      @VisibleForTesting public static void removeApplication(org.apache.hadoop.conf.Configuration conf, String applicationId) throws Exception
      Throws:
      Exception