Java 类org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer 实例源码

项目:spydra    文件:HistoryLogUtils.java   
/**
 * Starts a minimal JobHistoryServer
 */
public static void startJHS(Configuration cfg) {
  try {
    JobHistoryServer jobHistoryServer = new JobHistoryServer();
    jobHistoryServer.init(cfg);
    logger.info(String.format("Starting JobHistoryServer on: http://%s",
        cfg.get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS)));
    jobHistoryServer.start();
  } catch (Exception e) {
    logger.error("Error starting JobHistoryServer", e);
    System.exit(1);
  }
}
项目:hadoop    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:aliyun-oss-hadoop-fs    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      String hostname = MiniYARNCluster.getHostname();
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
        hostname + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(), hostname
          + ":0");
      getConfig().set(JHAdminConfig.JHS_ADMIN_ADDRESS,
        hostname + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
        jhsStarted = true;
      };
    }.start();

    while (!jhsStarted) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
}
项目:aliyun-oss-hadoop-fs    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:big-c    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hadoop-plus    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:FlexMap    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hops    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hadoop-TCP    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hardfs    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:hadoop-on-lustre2    文件:TestHsWebServices.java   
public void verifyHsInfoGeneric(String hadoopVersionBuiltOn,
    String hadoopBuildVersion, String hadoopVersion, long startedon) {
  WebServicesTestUtils.checkStringMatch("hadoopVersionBuiltOn",
      VersionInfo.getDate(), hadoopVersionBuiltOn);
  WebServicesTestUtils.checkStringEqual("hadoopBuildVersion",
      VersionInfo.getBuildVersion(), hadoopBuildVersion);
  WebServicesTestUtils.checkStringMatch("hadoopVersion",
      VersionInfo.getVersion(), hadoopVersion);
  assertEquals("startedOn doesn't match: ",
      JobHistoryServer.historyServerTimeStamp, startedon);
}
项目:t4f-data    文件:MapReduceJobHistory.java   
public static void main(String... args) throws Exception {

        new AosProcessLauncher() {
            @Override
            public void process() throws Exception {
                JobHistoryServer.main(new String[] {});
            }
        }.launch();

        while (true) {
            LOGGER.info("Sleeping...");
            TimeUnit.MINUTES.sleep(1);
        }

    }
项目:hadoop    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      String hostname = MiniYARNCluster.getHostname();
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
        hostname + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(), hostname
          + ":0");
      getConfig().set(JHAdminConfig.JHS_ADMIN_ADDRESS,
        hostname + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: "
      + getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          MRWebAppUtil.getJHSHttpPolicy() == HttpConfig.Policy.HTTPS_ONLY));
}
项目:hadoop    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hadoop    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:aliyun-oss-hadoop-fs    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:aliyun-oss-hadoop-fs    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:big-c    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      String hostname = MiniYARNCluster.getHostname();
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
        hostname + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(), hostname
          + ":0");
      getConfig().set(JHAdminConfig.JHS_ADMIN_ADDRESS,
        hostname + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: "
      + getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          MRWebAppUtil.getJHSHttpPolicy() == HttpConfig.Policy.HTTPS_ONLY));
}
项目:big-c    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:big-c    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:hadoop-2.6.0-cdh5.4.3    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      String hostname = MiniYARNCluster.getHostname();
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
        hostname + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(), hostname
          + ":0");
      getConfig().set(JHAdminConfig.JHS_ADMIN_ADDRESS,
        hostname + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: "
      + getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          MRWebAppUtil.getJHSHttpPolicy() == HttpConfig.Policy.HTTPS_ONLY));
}
项目:hadoop-2.6.0-cdh5.4.3    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hadoop-2.6.0-cdh5.4.3    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:hadoop-plus    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
      getConfig().set(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  getConfig().set(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           getConfig().get(YarnConfiguration.RM_WEBAPP_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS));
}
项目:hadoop-plus    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hadoop-plus    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:search    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
      getConfig().set(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  getConfig().set(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           getConfig().get(YarnConfiguration.RM_WEBAPP_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_WEBAPP_ADDRESS));
}
项目:search    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:FlexMap    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      String hostname = MiniYARNCluster.getHostname();
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
        hostname + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(), hostname
          + ":0");
      getConfig().set(JHAdminConfig.JHS_ADMIN_ADDRESS,
        hostname + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: "
      + getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          MRWebAppUtil.getJHSHttpPolicy() == HttpConfig.Policy.HTTPS_ONLY));
}
项目:FlexMap    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:FlexMap    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:hops    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hops    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:hadoop-TCP    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
          MiniYARNCluster.getHostname() + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: " +
      getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          HttpConfig.isSecure()));
}
项目:hadoop-TCP    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hadoop-TCP    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
项目:hardfs    文件:MiniMRYarnCluster.java   
@Override
public synchronized void serviceStart() throws Exception {
  try {
    if (!getConfig().getBoolean(
        JHAdminConfig.MR_HISTORY_MINICLUSTER_FIXED_PORTS,
        JHAdminConfig.DEFAULT_MR_HISTORY_MINICLUSTER_FIXED_PORTS)) {
      // pick free random ports.
      getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
          MiniYARNCluster.getHostname() + ":0");
      MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
          MiniYARNCluster.getHostname() + ":0");
    }
    historyServer = new JobHistoryServer();
    historyServer.init(getConfig());
    new Thread() {
      public void run() {
        historyServer.start();
      };
    }.start();
    while (historyServer.getServiceState() == STATE.INITED) {
      LOG.info("Waiting for HistoryServer to start...");
      Thread.sleep(1500);
    }
    //TODO Add a timeout. State.STOPPED check ?
    if (historyServer.getServiceState() != STATE.STARTED) {
      throw new IOException("HistoryServer failed to start");
    }
    super.serviceStart();
  } catch (Throwable t) {
    throw new YarnRuntimeException(t);
  }
  //need to do this because historyServer.init creates a new Configuration
  getConfig().set(JHAdminConfig.MR_HISTORY_ADDRESS,
                  historyServer.getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  MRWebAppUtil.setJHSWebappURLWithoutScheme(getConfig(),
      MRWebAppUtil.getJHSWebappURLWithoutScheme(historyServer.getConfig()));

  LOG.info("MiniMRYARN ResourceManager address: " +
           getConfig().get(YarnConfiguration.RM_ADDRESS));
  LOG.info("MiniMRYARN ResourceManager web address: " +
           WebAppUtils.getRMWebAppURLWithoutScheme(getConfig()));
  LOG.info("MiniMRYARN HistoryServer address: " +
           getConfig().get(JHAdminConfig.MR_HISTORY_ADDRESS));
  LOG.info("MiniMRYARN HistoryServer web address: " +
      getResolvedMRHistoryWebAppURLWithoutScheme(getConfig(),
          HttpConfig.isSecure()));
}
项目:hardfs    文件:MiniMRYarnCluster.java   
public JobHistoryServer getHistoryServer() {
  return this.historyServer;
}
项目:hardfs    文件:HistoryInfo.java   
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}