Exemplo n.º 1
0
        protected internal virtual void InitializeWebApp(Configuration conf)
        {
            webApp = new HsWebApp(history);
            IPEndPoint bindAddress = MRWebAppUtil.GetJHSWebBindAddress(conf);

            // NOTE: there should be a .at(InetSocketAddress)
            WebApps.$for <Org.Apache.Hadoop.Mapreduce.V2.HS.HistoryClientService>("jobhistory"
                                                                                  , this, "ws").With(conf).WithHttpSpnegoKeytabKey(JHAdminConfig.MrWebappSpnegoKeytabFileKey
                                                                                                                                   ).WithHttpSpnegoPrincipalKey(JHAdminConfig.MrWebappSpnegoUserNameKey).At(NetUtils
                                                                                                                                                                                                            .GetHostPortString(bindAddress)).Start(webApp);
            string connectHost = MRWebAppUtil.GetJHSWebappURLWithoutScheme(conf).Split(":")[0
                                 ];

            MRWebAppUtil.SetJHSWebappURLWithoutScheme(conf, connectHost + ":" + webApp.GetListenerAddress
                                                          ().Port);
        }