Search in sources :

Example 1 with HsWebApp

use of org.apache.hadoop.mapreduce.v2.hs.webapp.HsWebApp in project hadoop by apache.

the class HistoryClientService method initializeWebApp.

@VisibleForTesting
protected void initializeWebApp(Configuration conf) {
    webApp = new HsWebApp(history);
    InetSocketAddress bindAddress = MRWebAppUtil.getJHSWebBindAddress(conf);
    // NOTE: there should be a .at(InetSocketAddress)
    WebApps.$for("jobhistory", HistoryClientService.class, this, "ws").with(conf).withHttpSpnegoKeytabKey(JHAdminConfig.MR_WEBAPP_SPNEGO_KEYTAB_FILE_KEY).withHttpSpnegoPrincipalKey(JHAdminConfig.MR_WEBAPP_SPNEGO_USER_NAME_KEY).withCSRFProtection(JHAdminConfig.MR_HISTORY_CSRF_PREFIX).withXFSProtection(JHAdminConfig.MR_HISTORY_XFS_PREFIX).at(NetUtils.getHostPortString(bindAddress)).start(webApp);
    String connectHost = MRWebAppUtil.getJHSWebappURLWithoutScheme(conf).split(":")[0];
    MRWebAppUtil.setJHSWebappURLWithoutScheme(conf, connectHost + ":" + webApp.getListenerAddress().getPort());
}
Also used : InetSocketAddress(java.net.InetSocketAddress) HsWebApp(org.apache.hadoop.mapreduce.v2.hs.webapp.HsWebApp) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 InetSocketAddress (java.net.InetSocketAddress)1 HsWebApp (org.apache.hadoop.mapreduce.v2.hs.webapp.HsWebApp)1