当前位置: 首页>>代码示例>>Java>>正文


Java SchedulerNodeReport.getNumContainers方法代码示例

本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport.getNumContainers方法的典型用法代码示例。如果您正苦于以下问题:Java SchedulerNodeReport.getNumContainers方法的具体用法?Java SchedulerNodeReport.getNumContainers怎么用?Java SchedulerNodeReport.getNumContainers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport的用法示例。


在下文中一共展示了SchedulerNodeReport.getNumContainers方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createNodeReports

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
private NodeReport createNodeReports(RMNode rmNode) {    
  SchedulerNodeReport schedulerNodeReport = 
      scheduler.getNodeReport(rmNode.getNodeID());
  Resource used = BuilderUtils.newResource(0, 0, 0);
  int numContainers = 0;
  if (schedulerNodeReport != null) {
    used = schedulerNodeReport.getUsedResource();
    numContainers = schedulerNodeReport.getNumContainers();
  } 
  
  NodeReport report =
      BuilderUtils.newNodeReport(rmNode.getNodeID(), rmNode.getState(),
          rmNode.getHttpAddress(), rmNode.getRackName(), used,
          rmNode.getTotalCapability(), numContainers,
          rmNode.getHealthReport(), rmNode.getLastHealthReportTime(),
          rmNode.getNodeLabels());

  return report;
}
 
开发者ID:naver,项目名称:hadoop,代码行数:20,代码来源:ClientRMService.java

示例2: createNodeReports

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
private NodeReport createNodeReports(RMNode rmNode) {    
  SchedulerNodeReport schedulerNodeReport = 
      scheduler.getNodeReport(rmNode.getNodeID());
  Resource used = BuilderUtils.newResource(0, 0);
  int numContainers = 0;
  if (schedulerNodeReport != null) {
    used = schedulerNodeReport.getUsedResource();
    numContainers = schedulerNodeReport.getNumContainers();
  } 

  NodeReport report =
      BuilderUtils.newNodeReport(rmNode.getNodeID(), rmNode.getState(),
          rmNode.getHttpAddress(), rmNode.getRackName(), used,
          rmNode.getTotalCapability(), numContainers,
          rmNode.getHealthReport(), rmNode.getLastHealthReportTime(),
          rmNode.getNodeLabels(), rmNode.getAggregatedContainersUtilization(),
          rmNode.getNodeUtilization());

  return report;
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:21,代码来源:ClientRMService.java

示例3: createNodeReports

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
private NodeReport createNodeReports(RMNode rmNode) {    
  SchedulerNodeReport schedulerNodeReport = 
      scheduler.getNodeReport(rmNode.getNodeID());
  Resource used = BuilderUtils.newResource(0, 0);
  int numContainers = 0;
  if (schedulerNodeReport != null) {
    used = schedulerNodeReport.getUsedResource();
    numContainers = schedulerNodeReport.getNumContainers();
  } 
  
  NodeReport report =
      BuilderUtils.newNodeReport(rmNode.getNodeID(), rmNode.getState(),
          rmNode.getHttpAddress(), rmNode.getRackName(), used,
          rmNode.getTotalCapability(), numContainers,
          rmNode.getHealthReport(), rmNode.getLastHealthReportTime(),
          rmNode.getNodeLabels());

  return report;
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:20,代码来源:ClientRMService.java

示例4: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemory();
    this.availMemoryMB = report.getAvailableResource().getMemory();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:20,代码来源:NodeInfo.java

示例5: createNodeReports

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
private NodeReport createNodeReports(RMNode rmNode) {    
  SchedulerNodeReport schedulerNodeReport = 
      scheduler.getNodeReport(rmNode.getNodeID());
  Resource used = BuilderUtils.newResource(0, 0);
  int numContainers = 0;
  if (schedulerNodeReport != null) {
    used = schedulerNodeReport.getUsedResource();
    numContainers = schedulerNodeReport.getNumContainers();
  } 
  
  NodeReport report = BuilderUtils.newNodeReport(rmNode.getNodeID(),
      rmNode.getState(),
      rmNode.getHttpAddress(), rmNode.getRackName(), used,
      rmNode.getTotalCapability(), numContainers,
      rmNode.getHealthReport(),
      rmNode.getLastHealthReportTime());

  return report;
}
 
开发者ID:ict-carch,项目名称:hadoop-plus,代码行数:20,代码来源:ClientRMService.java

示例6: createNodeReports

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
private NodeReport createNodeReports(RMNode rmNode) {    
    SchedulerNodeReport schedulerNodeReport = 
        scheduler.getNodeReport(rmNode.getNodeID());
    Resource used = BuilderUtils.newResource(0, 0);
    int numContainers = 0;
    if (schedulerNodeReport != null) {
      used = schedulerNodeReport.getUsedResource();
      numContainers = schedulerNodeReport.getNumContainers();
    } 
    
    NodeReport report = BuilderUtils.newNodeReport(rmNode.getNodeID(),
        rmNode.getState(),
        rmNode.getHttpAddress(), rmNode.getRackName(), used,
        rmNode.getTotalCapability(), numContainers,
        rmNode.getHealthReport(),
        rmNode.getLastHealthReportTime(),
//Add by ME
	rmNode.getTrustReport(),
        rmNode.getLastTrustReportTime());	

    return report;
  }
 
开发者ID:chendave,项目名称:hadoop-TCP,代码行数:23,代码来源:ClientRMService.java

示例7: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemory();
    this.availMemoryMB = report.getAvailableResource().getMemory();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
  this.version = ni.getNodeManagerVersion();
}
 
开发者ID:Seagate,项目名称:hadoop-on-lustre2,代码行数:21,代码来源:NodeInfo.java

示例8: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemory();
    this.availMemoryMB = report.getAvailableResource().getMemory();
    this.usedVirtualCores = report.getUsedResource().getVirtualCores();
    this.availableVirtualCores = report.getAvailableResource().getVirtualCores();
    this.usedGpuCores = report.getUsedResource().getGpuCores();
    this.availableGpuCores = report.getAvailableResource().getGpuCores();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
  this.version = ni.getNodeManagerVersion();
  
  // add labels
  Set<String> labelSet = ni.getNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:32,代码来源:NodeInfo.java

示例9: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemory();
    this.availMemoryMB = report.getAvailableResource().getMemory();
    this.usedVirtualCores = report.getUsedResource().getVirtualCores();
    this.availableVirtualCores = report.getAvailableResource().getVirtualCores();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
  this.version = ni.getNodeManagerVersion();
  
  // add labels
  Set<String> labelSet = ni.getNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }

  // update node and containers resource utilization
  this.resourceUtilization = new ResourceUtilizationInfo(ni);
}
 
开发者ID:aliyun-beta,项目名称:aliyun-oss-hadoop-fs,代码行数:33,代码来源:NodeInfo.java

示例10: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemory();
    this.availMemoryMB = report.getAvailableResource().getMemory();
    this.usedVirtualCores = report.getUsedResource().getVirtualCores();
    this.availableVirtualCores = report.getAvailableResource().getVirtualCores();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
  this.version = ni.getNodeManagerVersion();
  
  // add labels
  Set<String> labelSet = ni.getNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }
}
 
开发者ID:yncxcw,项目名称:big-c,代码行数:30,代码来源:NodeInfo.java

示例11: NodeInfo

import org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport; //导入方法依赖的package包/类
public NodeInfo(RMNode ni, ResourceScheduler sched) {
  NodeId id = ni.getNodeID();
  SchedulerNodeReport report = sched.getNodeReport(id);
  this.numContainers = 0;
  this.usedMemoryMB = 0;
  this.availMemoryMB = 0;
  if (report != null) {
    this.numContainers = report.getNumContainers();
    this.usedMemoryMB = report.getUsedResource().getMemorySize();
    this.availMemoryMB = report.getAvailableResource().getMemorySize();
    this.usedVirtualCores = report.getUsedResource().getVirtualCores();
    this.availableVirtualCores = report.getAvailableResource().getVirtualCores();
    this.usedGPUs = report.getUsedResource().getGPUs();
    this.availableGPUs = report.getAvailableResource().getGPUs();
  }
  this.id = id.toString();
  this.rack = ni.getRackName();
  this.nodeHostName = ni.getHostName();
  this.state = ni.getState();
  this.nodeHTTPAddress = ni.getHttpAddress();
  this.lastHealthUpdate = ni.getLastHealthReportTime();
  this.healthReport = String.valueOf(ni.getHealthReport());
  this.version = ni.getNodeManagerVersion();

  // add labels
  Set<String> labelSet = ni.getNodeLabels();
  if (labelSet != null) {
    nodeLabels.addAll(labelSet);
    Collections.sort(nodeLabels);
  }

  // update node and containers resource utilization
  this.resourceUtilization = new ResourceUtilizationInfo(ni);
}
 
开发者ID:hopshadoop,项目名称:hops,代码行数:35,代码来源:NodeInfo.java


注:本文中的org.apache.hadoop.yarn.server.resourcemanager.scheduler.SchedulerNodeReport.getNumContainers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。