Skip to content
Snippets Groups Projects
  • Marcelo Vanzin's avatar
    4661d30b
    [SPARK-19554][UI,YARN] Allow SHS URL to be used for tracking in YARN RM. · 4661d30b
    Marcelo Vanzin authored
    Allow an application to use the History Server URL as the tracking
    URL in the YARN RM, so there's still a link to the web UI somewhere
    in YARN even if the driver's UI is disabled. This is useful, for
    example, if an admin wants to disable the driver UI by default for
    applications, since it's harder to secure it (since it involves non
    trivial ssl certificate and auth management that admins may not want
    to expose to user apps).
    
    This needs to be opt-in, because of the way the YARN proxy works, so
    a new configuration was added to enable the option.
    
    The YARN RM will proxy requests to live AMs instead of redirecting
    the client, so pages in the SHS UI will not render correctly since
    they'll reference invalid paths in the RM UI. The proxy base support
    in the SHS cannot be used since that would prevent direct access to
    the SHS.
    
    So, to solve this problem, for the feature to work end-to-end, a new
    YARN-specific filter was added that detects whether the requests come
    from the proxy and redirects the client appropriatly. The SHS admin has
    to add this filter manually if they want the feature to work.
    
    Tested with new unit test, and by running with the documented configuration
    set in a test cluster. Also verified the driver UI is used when it's
    enabled.
    
    Author: Marcelo Vanzin <vanzin@cloudera.com>
    
    Closes #16946 from vanzin/SPARK-19554.
    4661d30b
    History
    [SPARK-19554][UI,YARN] Allow SHS URL to be used for tracking in YARN RM.
    Marcelo Vanzin authored
    Allow an application to use the History Server URL as the tracking
    URL in the YARN RM, so there's still a link to the web UI somewhere
    in YARN even if the driver's UI is disabled. This is useful, for
    example, if an admin wants to disable the driver UI by default for
    applications, since it's harder to secure it (since it involves non
    trivial ssl certificate and auth management that admins may not want
    to expose to user apps).
    
    This needs to be opt-in, because of the way the YARN proxy works, so
    a new configuration was added to enable the option.
    
    The YARN RM will proxy requests to live AMs instead of redirecting
    the client, so pages in the SHS UI will not render correctly since
    they'll reference invalid paths in the RM UI. The proxy base support
    in the SHS cannot be used since that would prevent direct access to
    the SHS.
    
    So, to solve this problem, for the feature to work end-to-end, a new
    YARN-specific filter was added that detects whether the requests come
    from the proxy and redirects the client appropriatly. The SHS admin has
    to add this filter manually if they want the feature to work.
    
    Tested with new unit test, and by running with the documented configuration
    set in a test cluster. Also verified the driver UI is used when it's
    enabled.
    
    Author: Marcelo Vanzin <vanzin@cloudera.com>
    
    Closes #16946 from vanzin/SPARK-19554.