本文整理汇总了Java中org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue.getQueueName方法的典型用法代码示例。如果您正苦于以下问题:Java CSQueue.getQueueName方法的具体用法?Java CSQueue.getQueueName怎么用?Java CSQueue.getQueueName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue
的用法示例。
在下文中一共展示了CSQueue.getQueueName方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
queuePath = q.getQueuePath();
capacity = q.getCapacity() * 100;
usedCapacity = q.getUsedCapacity() * 100;
maxCapacity = q.getMaximumCapacity();
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
numApplications = q.getNumApplications();
usedResources = q.getUsedResources().toString();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(q.getUsedResources());
}
示例2: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
queuePath = q.getQueuePath();
capacity = q.getCapacity() * 100;
usedCapacity = q.getUsedCapacity() * 100;
maxCapacity = q.getMaximumCapacity();
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
numApplications = q.getNumApplications();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(q.getUsedResources());
}
示例3: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q, String nodeLabel) {
QueueCapacities qCapacities = q.getQueueCapacities();
ResourceUsage queueResourceUsage = q.getQueueResourceUsage();
queuePath = q.getQueuePath();
capacity = qCapacities.getCapacity(nodeLabel) * 100;
usedCapacity = q.getUsedCapacity(nodeLabel) * 100;
maxCapacity = qCapacities.getMaximumCapacity(nodeLabel);
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity =
cap(qCapacities.getAbsoluteCapacity(nodeLabel), 0f, 1f) * 100;
absoluteMaxCapacity =
cap(qCapacities.getAbsoluteMaximumCapacity(nodeLabel), 0f, 1f) * 100;
absoluteUsedCapacity = q.getAbsoluteUsedCapacity(nodeLabel) * 100;
numApplications = q.getNumApplications();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(queueResourceUsage.getUsed(nodeLabel));
if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
hideReservationQueues = true;
}
// add labels
Set<String> labelSet = q.getAccessibleNodeLabels();
if (labelSet != null) {
nodeLabels.addAll(labelSet);
Collections.sort(nodeLabels);
}
}
示例4: CapacitySchedulerInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, NodeLabel nodeLabel) {
this.queueName = parent.getQueueName();
this.usedCapacity = parent.getUsedCapacity() * 100;
this.capacity = parent.getCapacity() * 100;
float max = parent.getMaximumCapacity();
if (max < EPSILON || max > 1f)
max = 1f;
this.maxCapacity = max * 100;
queues = getQueues(parent, nodeLabel);
}
示例5: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
queuePath = q.getQueuePath();
capacity = q.getCapacity() * 100;
usedCapacity = q.getUsedCapacity() * 100;
maxCapacity = q.getMaximumCapacity();
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity =
cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
absoluteMaxCapacity =
cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
absoluteUsedCapacity =
cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
numApplications = q.getNumApplications();
allocatedContainers = q.getMetrics().getAllocatedContainers();
pendingContainers = q.getMetrics().getPendingContainers();
reservedContainers = q.getMetrics().getReservedContainers();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(q.getUsedResources());
if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
hideReservationQueues = true;
}
// add labels
Set<String> labelSet = q.getAccessibleNodeLabels();
if (labelSet != null) {
nodeLabels.addAll(labelSet);
Collections.sort(nodeLabels);
}
QueueCapacities qCapacities = q.getQueueCapacities();
capacities = new QueueCapacitiesInfo(qCapacities);
ResourceUsage queueResourceUsage = q.getQueueResourceUsage();
populateQueueResourceUsage(queueResourceUsage);
}
示例6: CapacitySchedulerInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, CapacityScheduler cs) {
this.queueName = parent.getQueueName();
this.usedCapacity = parent.getUsedCapacity() * 100;
this.capacity = parent.getCapacity() * 100;
float max = parent.getMaximumCapacity();
if (max < EPSILON || max > 1f)
max = 1f;
this.maxCapacity = max * 100;
capacities = new QueueCapacitiesInfo(parent.getQueueCapacities());
queues = getQueues(parent);
health = new CapacitySchedulerHealthInfo(cs);
}
示例7: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
queuePath = q.getQueuePath();
capacity = q.getCapacity() * 100;
usedCapacity = q.getUsedCapacity() * 100;
maxCapacity = q.getMaximumCapacity();
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity = cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
absoluteMaxCapacity = cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
absoluteUsedCapacity = cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
numApplications = q.getNumApplications();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(q.getUsedResources());
if(q instanceof PlanQueue &&
!((PlanQueue)q).showReservationsAsQueues()) {
hideReservationQueues = true;
}
// add labels
Set<String> labelSet = q.getAccessibleNodeLabels();
if (labelSet != null) {
nodeLabels.addAll(labelSet);
Collections.sort(nodeLabels);
}
}
示例8: CapacitySchedulerInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent) {
this.queueName = parent.getQueueName();
this.usedCapacity = parent.getUsedCapacity() * 100;
this.capacity = parent.getCapacity() * 100;
float max = parent.getMaximumCapacity();
if (max < EPSILON || max > 1f)
max = 1f;
this.maxCapacity = max * 100;
queues = getQueues(parent);
}
示例9: CapacitySchedulerQueueInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
CapacitySchedulerQueueInfo(CSQueue q) {
queuePath = q.getQueuePath();
capacity = q.getCapacity() * 100;
usedCapacity = q.getUsedCapacity() * 100;
maxCapacity = q.getMaximumCapacity();
if (maxCapacity < EPSILON || maxCapacity > 1f)
maxCapacity = 1f;
maxCapacity *= 100;
absoluteCapacity =
cap(q.getAbsoluteCapacity(), 0f, 1f) * 100;
absoluteMaxCapacity =
cap(q.getAbsoluteMaximumCapacity(), 0f, 1f) * 100;
absoluteUsedCapacity =
cap(q.getAbsoluteUsedCapacity(), 0f, 1f) * 100;
numApplications = q.getNumApplications();
allocatedContainers = q.getMetrics().getAllocatedContainers();
pendingContainers = q.getMetrics().getPendingContainers();
reservedContainers = q.getMetrics().getReservedContainers();
queueName = q.getQueueName();
state = q.getState();
resourcesUsed = new ResourceInfo(q.getUsedResources());
if (q instanceof PlanQueue && !((PlanQueue) q).showReservationsAsQueues()) {
hideReservationQueues = true;
}
// add labels
Set<String> labelSet = q.getAccessibleNodeLabels();
if (labelSet != null) {
nodeLabels.addAll(labelSet);
Collections.sort(nodeLabels);
}
QueueCapacities qCapacities = q.getQueueCapacities();
populateQueueCapacities(qCapacities);
ResourceUsage queueResourceUsage = q.getQueueResourceUsage();
populateQueueResourceUsage(queueResourceUsage);
}
示例10: CapacitySchedulerInfo
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
public CapacitySchedulerInfo(CSQueue parent, CapacityScheduler cs) {
this.queueName = parent.getQueueName();
this.usedCapacity = parent.getUsedCapacity() * 100;
this.capacity = parent.getCapacity() * 100;
float max = parent.getMaximumCapacity();
if (max < EPSILON || max > 1f)
max = 1f;
this.maxCapacity = max * 100;
capacities = new QueueCapacitiesInfo(parent.getQueueCapacities(), false);
queues = getQueues(parent);
health = new CapacitySchedulerHealthInfo(cs);
}
示例11: cloneQueues
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CSQueue; //导入方法依赖的package包/类
/**
* This method walks a tree of CSQueue and clones the portion of the state
* relevant for preemption in TempQueue(s). It also maintains a pointer to
* the leaves. Finally it aggregates pending resources in each queue and rolls
* it up to higher levels.
*
* @param curQueue current queue which I'm looking at now
* @param partitionResource the total amount of resources in the cluster
* @return the root of the cloned queue hierarchy
*/
private TempQueuePerPartition cloneQueues(CSQueue curQueue,
Resource partitionResource, String partitionToLookAt) {
TempQueuePerPartition ret;
synchronized (curQueue) {
String queueName = curQueue.getQueueName();
QueueCapacities qc = curQueue.getQueueCapacities();
float absCap = qc.getAbsoluteCapacity(partitionToLookAt);
float absMaxCap = qc.getAbsoluteMaximumCapacity(partitionToLookAt);
boolean preemptionDisabled = curQueue.getPreemptionDisabled();
Resource current = Resources.clone(
curQueue.getQueueResourceUsage().getUsed(partitionToLookAt));
Resource killable = Resources.none();
Resource reserved = Resources.clone(
curQueue.getQueueResourceUsage().getReserved(partitionToLookAt));
if (null != preemptableQueues.get(queueName)) {
killable = Resources.clone(preemptableQueues.get(queueName)
.getKillableResource(partitionToLookAt));
}
// when partition is a non-exclusive partition, the actual maxCapacity
// could more than specified maxCapacity
try {
if (!scheduler.getRMContext().getNodeLabelManager()
.isExclusiveNodeLabel(partitionToLookAt)) {
absMaxCap = 1.0f;
}
} catch (IOException e) {
// This may cause by partition removed when running capacity monitor,
// just ignore the error, this will be corrected when doing next check.
}
ret = new TempQueuePerPartition(queueName, current, preemptionDisabled,
partitionToLookAt, killable, absCap, absMaxCap, partitionResource,
reserved, curQueue);
if (curQueue instanceof ParentQueue) {
// Recursively add children
for (CSQueue c : curQueue.getChildQueues()) {
TempQueuePerPartition subq = cloneQueues(c, partitionResource,
partitionToLookAt);
ret.addChild(subq);
}
}
}
addTempQueuePartition(ret);
return ret;
}