當前位置: 首頁>>代碼示例>>Java>>正文


Java VersionInfo.getBuildVersion方法代碼示例

本文整理匯總了Java中org.apache.hadoop.util.VersionInfo.getBuildVersion方法的典型用法代碼示例。如果您正苦於以下問題:Java VersionInfo.getBuildVersion方法的具體用法?Java VersionInfo.getBuildVersion怎麽用?Java VersionInfo.getBuildVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.hadoop.util.VersionInfo的用法示例。


在下文中一共展示了VersionInfo.getBuildVersion方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ClusterInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public ClusterInfo(ResourceManager rm) {
  long ts = ResourceManager.getClusterTimeStamp();

  this.id = ts;
  this.state = rm.getServiceState();
  this.haState = rm.getRMContext().getHAServiceState();
  this.rmStateStoreName = rm.getRMContext().getStateStore().getClass()
      .getName();
  this.startedOn = ts;
  this.resourceManagerVersion = YarnVersionInfo.getVersion();
  this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion();
  this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate();
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:17,代碼來源:ClusterInfo.java

示例2: NodeInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public NodeInfo(final Context context, final ResourceView resourceView) {

    this.id = context.getNodeId().toString();
    this.nodeHostName = context.getNodeId().getHost();
    this.totalVmemAllocatedContainersMB = resourceView
        .getVmemAllocatedForContainers() / BYTES_IN_MB;
    this.vmemCheckEnabled = resourceView.isVmemCheckEnabled();
    this.totalPmemAllocatedContainersMB = resourceView
        .getPmemAllocatedForContainers() / BYTES_IN_MB;
    this.pmemCheckEnabled = resourceView.isPmemCheckEnabled();
    this.totalVCoresAllocatedContainers = resourceView
        .getVCoresAllocatedForContainers();
    this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy();
    this.lastNodeUpdateTime = context.getNodeHealthStatus()
        .getLastHealthReportTime();

    this.healthReport = context.getNodeHealthStatus().getHealthReport();

    this.nodeManagerVersion = YarnVersionInfo.getVersion();
    this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion();
    this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate();
    this.hadoopVersion = VersionInfo.getVersion();
    this.hadoopBuildVersion = VersionInfo.getBuildVersion();
    this.hadoopVersionBuiltOn = VersionInfo.getDate();
    this.nmStartupTime = NodeManager.getNMStartupTime();
  }
 
開發者ID:aliyun-beta,項目名稱:aliyun-oss-hadoop-fs,代碼行數:27,代碼來源:NodeInfo.java

示例3: ClusterInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public ClusterInfo(ResourceManager rm) {
  long ts = ResourceManager.getClusterTimeStamp();

  this.id = ts;
  this.state = rm.getServiceState();
  this.haState = rm.getRMContext().getHAServiceState();
  this.rmStateStoreName = rm.getRMContext().getStateStore().getClass()
      .getName();
  this.startedOn = ts;
  this.resourceManagerVersion = YarnVersionInfo.getVersion();
  this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion();
  this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate();
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
  this.haZooKeeperConnectionState =
      rm.getRMContext().getRMAdminService().getHAZookeeperConnectionState();
}
 
開發者ID:aliyun-beta,項目名稱:aliyun-oss-hadoop-fs,代碼行數:19,代碼來源:ClusterInfo.java

示例4: NodeInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public NodeInfo(final Context context, final ResourceView resourceView) {

    this.id = context.getNodeId().toString();
    this.nodeHostName = context.getNodeId().getHost();
    this.totalVmemAllocatedContainersMB = resourceView
        .getVmemAllocatedForContainers() / BYTES_IN_MB;
    this.vmemCheckEnabled = resourceView.isVmemCheckEnabled();
    this.totalPmemAllocatedContainersMB = resourceView
        .getPmemAllocatedForContainers() / BYTES_IN_MB;
    this.pmemCheckEnabled = resourceView.isPmemCheckEnabled();
    this.totalVCoresAllocatedContainers = resourceView
        .getVCoresAllocatedForContainers();
    this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy();
    this.lastNodeUpdateTime = context.getNodeHealthStatus()
        .getLastHealthReportTime();

    this.healthReport = context.getNodeHealthStatus().getHealthReport();

    this.nodeManagerVersion = YarnVersionInfo.getVersion();
    this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion();
    this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate();
    this.hadoopVersion = VersionInfo.getVersion();
    this.hadoopBuildVersion = VersionInfo.getBuildVersion();
    this.hadoopVersionBuiltOn = VersionInfo.getDate();
  }
 
開發者ID:yncxcw,項目名稱:big-c,代碼行數:26,代碼來源:NodeInfo.java

示例5: testRelaxedVersionCheck

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
/**
 * Test the "relaxed" TT version checking
 */
@Test
public void testRelaxedVersionCheck() throws IOException {
  MiniMRCluster mr = null;
  try {
    JobConf jtConf = new JobConf();
    mr = new MiniMRCluster(1, "file:///", 1, null, null, jtConf);
    TaskTracker tt = mr.getTaskTrackerRunner(0).getTaskTracker();
    String currFullVersion = VersionInfo.getBuildVersion();
    String currVersion = VersionInfo.getVersion();

    assertTrue(tt.isPermittedVersion(currFullVersion, currVersion));
    assertFalse("We dissallow different versions",
        tt.isPermittedVersion(currFullVersion+"x", currVersion+"x"));
    assertTrue("We allow different full versions with same version",
        tt.isPermittedVersion(currFullVersion+"x", currVersion));
  } finally {
    if (mr != null) {
      mr.shutdown();
    }
  }
}
 
開發者ID:Nextzero,項目名稱:hadoop-2.6.0-cdh5.4.3,代碼行數:25,代碼來源:TestTaskTrackerVersionCheck.java

示例6: testNoVersionCheck

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
/**
 * Test no TT version checking
 */
@Test
public void testNoVersionCheck() throws IOException {
  MiniMRCluster mr = null;
  try {
    JobConf jtConf = new JobConf();
    jtConf.setBoolean(TaskTracker.HADOOP_SKIP_VERSION_CHECK_KEY, true);
    mr = new MiniMRCluster(1, "file:///", 1, null, null, jtConf);
    TaskTracker tt = mr.getTaskTrackerRunner(0).getTaskTracker();
    String currFullVersion = VersionInfo.getBuildVersion();
    String currVersion = VersionInfo.getVersion();

    assertTrue(tt.isPermittedVersion(currFullVersion, currVersion));
    assertTrue(tt.isPermittedVersion(currFullVersion+"x", currVersion+"x"));
    assertTrue(tt.isPermittedVersion(currFullVersion+"x", currVersion));
  } finally {
    if (mr != null) {
      mr.shutdown();
    }
  }
}
 
開發者ID:Nextzero,項目名稱:hadoop-2.6.0-cdh5.4.3,代碼行數:24,代碼來源:TestTaskTrackerVersionCheck.java

示例7: NodeInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public NodeInfo(final Context context, final ResourceView resourceView) {

    this.id = context.getNodeId().toString();
    this.nodeHostName = context.getNodeId().getHost();
    this.totalVmemAllocatedContainersMB = resourceView
        .getVmemAllocatedForContainers() / BYTES_IN_MB;
    this.vmemCheckEnabled = resourceView.isVmemCheckEnabled();
    this.totalPmemAllocatedContainersMB = resourceView
        .getPmemAllocatedForContainers() / BYTES_IN_MB;
    this.pmemCheckEnabled = resourceView.isPmemCheckEnabled();
    this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy();
    this.lastNodeUpdateTime = context.getNodeHealthStatus()
        .getLastHealthReportTime();

    this.healthReport = context.getNodeHealthStatus().getHealthReport();

    this.nodeManagerVersion = YarnVersionInfo.getVersion();
    this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion();
    this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate();
    this.hadoopVersion = VersionInfo.getVersion();
    this.hadoopBuildVersion = VersionInfo.getBuildVersion();
    this.hadoopVersionBuiltOn = VersionInfo.getDate();
  }
 
開發者ID:ict-carch,項目名稱:hadoop-plus,代碼行數:24,代碼來源:NodeInfo.java

示例8: ClusterInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public ClusterInfo(ResourceManager rm) {
  long ts = ResourceManager.getClusterTimeStamp();

  this.id = ts;
  this.state = rm.getServiceState();
  this.haState = rm.getRMContext().getHAServiceState();
  this.rmStateStoreName = rm.getRMContext().getStateStore().getClass()
      .getName();
  this.startedOn = ts;
  this.resourceManagerVersion = YarnVersionInfo.getVersion();
  this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion();
  this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate();
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
  this.haZooKeeperConnectionState =
      rm.getRMContext().getHAZookeeperConnectionState();
}
 
開發者ID:hopshadoop,項目名稱:hops,代碼行數:19,代碼來源:ClusterInfo.java

示例9: NodeInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public NodeInfo(final Context context, final ResourceView resourceView) {

    this.id = context.getNodeId().toString();
    this.nodeHostName = context.getNodeId().getHost();
    this.totalVmemAllocatedContainersMB = resourceView
        .getVmemAllocatedForContainers() / BYTES_IN_MB;
    this.vmemCheckEnabled = resourceView.isVmemCheckEnabled();
    this.totalPmemAllocatedContainersMB = resourceView
        .getPmemAllocatedForContainers() / BYTES_IN_MB;
    this.pmemCheckEnabled = resourceView.isPmemCheckEnabled();
    this.totalVCoresAllocatedContainers = resourceView
        .getVCoresAllocatedForContainers();
    this.totalGCoresAllocatedContainers = resourceView
        .getGCoresAllocatedForContainers();
    this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy();
    this.lastNodeUpdateTime = context.getNodeHealthStatus()
        .getLastHealthReportTime();

    this.healthReport = context.getNodeHealthStatus().getHealthReport();

    this.nodeManagerVersion = YarnVersionInfo.getVersion();
    this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion();
    this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate();
    this.hadoopVersion = VersionInfo.getVersion();
    this.hadoopBuildVersion = VersionInfo.getBuildVersion();
    this.hadoopVersionBuiltOn = VersionInfo.getDate();
  }
 
開發者ID:naver,項目名稱:hadoop,代碼行數:28,代碼來源:NodeInfo.java

示例10: testDefaultVersionCheck

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
/**
 * Test the strict TT version checking
 */
@Test
public void testDefaultVersionCheck() throws IOException {
  MiniMRCluster mr = null;
  try {
    JobConf jtConf = new JobConf();
    jtConf.setBoolean(
        "hadoop.relaxed.worker.version.check", false);
    mr = new MiniMRCluster(1, "file:///", 1, null, null, jtConf);
    TaskTracker tt = mr.getTaskTrackerRunner(0).getTaskTracker();
    String currBuildVersion = VersionInfo.getBuildVersion();
    String currVersion = VersionInfo.getVersion();

    assertTrue(tt.isPermittedVersion(currBuildVersion, currVersion));
    assertFalse("We disallow different versions",
        tt.isPermittedVersion(currBuildVersion+"x", currVersion+"x"));
    assertFalse("We disallow different full versions with same version",
        tt.isPermittedVersion(currBuildVersion+"x", currVersion));      
    try {
      tt.isPermittedVersion(currBuildVersion, currVersion+"x");
      fail("Matched full version with mismatched version");
    } catch (AssertionError ae) {
      // Expected. The versions should always match if the full
      // versions match as the full version contains the version.
    }
  } finally {
    if (mr != null) {
      mr.shutdown();
    }
  }
}
 
開發者ID:Nextzero,項目名稱:hadoop-2.6.0-cdh5.4.3,代碼行數:34,代碼來源:TestTaskTrackerVersionCheck.java

示例11: ClusterInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public ClusterInfo(ResourceManager rm) {
  long ts = ResourceManager.clusterTimeStamp;

  this.id = ts;
  this.state = rm.getServiceState();
  this.startedOn = ts;
  this.resourceManagerVersion = YarnVersionInfo.getVersion();
  this.resourceManagerBuildVersion = YarnVersionInfo.getBuildVersion();
  this.resourceManagerVersionBuiltOn = YarnVersionInfo.getDate();
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
 
開發者ID:ict-carch,項目名稱:hadoop-plus,代碼行數:14,代碼來源:ClusterInfo.java

示例12: NodeInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public NodeInfo(final Context context, final ResourceView resourceView) {

    this.id = context.getNodeId().toString();
    this.nodeHostName = context.getNodeId().getHost();
    this.totalVmemAllocatedContainersMB = resourceView
        .getVmemAllocatedForContainers() / BYTES_IN_MB;
    this.vmemCheckEnabled = resourceView.isVmemCheckEnabled();
    this.totalPmemAllocatedContainersMB = resourceView
        .getPmemAllocatedForContainers() / BYTES_IN_MB;
    this.pmemCheckEnabled = resourceView.isPmemCheckEnabled();
    this.totalVCoresAllocatedContainers = resourceView
        .getVCoresAllocatedForContainers();
    this.totalGPUsAllocatedContainers = resourceView
        .getGPUsAllocatedForContainers();
    this.nodeHealthy = context.getNodeHealthStatus().getIsNodeHealthy();
    this.lastNodeUpdateTime = context.getNodeHealthStatus()
        .getLastHealthReportTime();

    this.healthReport = context.getNodeHealthStatus().getHealthReport();

    this.nodeManagerVersion = YarnVersionInfo.getVersion();
    this.nodeManagerBuildVersion = YarnVersionInfo.getBuildVersion();
    this.nodeManagerVersionBuiltOn = YarnVersionInfo.getDate();
    this.hadoopVersion = VersionInfo.getVersion();
    this.hadoopBuildVersion = VersionInfo.getBuildVersion();
    this.hadoopVersionBuiltOn = VersionInfo.getDate();
    this.nmStartupTime = NodeManager.getNMStartupTime();
  }
 
開發者ID:hopshadoop,項目名稱:hops,代碼行數:29,代碼來源:NodeInfo.java

示例13: HistoryInfo

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public HistoryInfo() {
  this.startedOn = JobHistoryServer.historyServerTimeStamp;
  this.hadoopVersion = VersionInfo.getVersion();
  this.hadoopBuildVersion = VersionInfo.getBuildVersion();
  this.hadoopVersionBuiltOn = VersionInfo.getDate();
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:7,代碼來源:HistoryInfo.java

示例14: getBuildVersion

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public String getBuildVersion() throws IOException {
  return VersionInfo.getBuildVersion();
}
 
開發者ID:Nextzero,項目名稱:hadoop-2.6.0-cdh5.4.3,代碼行數:4,代碼來源:JobTracker.java

示例15: getBuildVersion

import org.apache.hadoop.util.VersionInfo; //導入方法依賴的package包/類
public String getBuildVersion() throws IOException{
  return VersionInfo.getBuildVersion();
}
 
開發者ID:rhli,項目名稱:hadoop-EAR,代碼行數:4,代碼來源:JobTracker.java


注:本文中的org.apache.hadoop.util.VersionInfo.getBuildVersion方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。