本文整理汇总了Java中org.apache.hadoop.yarn.server.utils.Lock.NoLock类的典型用法代码示例。如果您正苦于以下问题:Java NoLock类的具体用法?Java NoLock怎么用?Java NoLock使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NoLock类属于org.apache.hadoop.yarn.server.utils.Lock包,在下文中一共展示了NoLock类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNodeLocalityDelay
import org.apache.hadoop.yarn.server.utils.Lock.NoLock; //导入依赖的package包/类
@Lock(NoLock.class)
public int getNodeLocalityDelay() {
return nodeLocalityDelay;
}
示例2: getRackLocalityFullReset
import org.apache.hadoop.yarn.server.utils.Lock.NoLock; //导入依赖的package包/类
@Lock(NoLock.class)
public boolean getRackLocalityFullReset() {
return rackLocalityFullReset;
}
示例3: computeUserLimit
import org.apache.hadoop.yarn.server.utils.Lock.NoLock; //导入依赖的package包/类
@Lock(NoLock.class)
private Resource computeUserLimit(FiCaSchedulerApp application,
Resource clusterResource, Resource required) {
// What is our current capacity?
// * It is equal to the max(required, queue-capacity) if
// we're running below capacity. The 'max' ensures that jobs in queues
// with miniscule capacity (< 1 slot) make progress
// * If we're running over capacity, then its
// (usedResources + required) (which extra resources we are allocating)
// Allow progress for queues with miniscule capacity
final Resource queueCapacity =
Resources.max(
resourceCalculator, clusterResource,
Resources.multiplyAndNormalizeUp(
resourceCalculator,
clusterResource,
absoluteCapacity,
minimumAllocation),
required);
Resource currentCapacity =
Resources.lessThan(resourceCalculator, clusterResource,
usedResources, queueCapacity) ?
queueCapacity : Resources.add(usedResources, required);
// Never allow a single user to take more than the
// queue's configured capacity * user-limit-factor.
// Also, the queue's configured capacity should be higher than
// queue-hard-limit * ulMin
final int activeUsers = activeUsersManager.getNumActiveUsers();
Resource limit =
Resources.roundUp(
resourceCalculator,
Resources.min(
resourceCalculator, clusterResource,
Resources.max(
resourceCalculator, clusterResource,
Resources.divideAndCeil(
resourceCalculator, currentCapacity, activeUsers),
Resources.divideAndCeil(
resourceCalculator,
Resources.multiplyAndRoundDown(
currentCapacity, userLimit),
100)
),
Resources.multiplyAndRoundDown(queueCapacity, userLimitFactor)
),
minimumAllocation);
if (LOG.isDebugEnabled()) {
String userName = application.getUser();
LOG.debug("User limit computation for " + userName +
" in queue " + getQueueName() +
" userLimit=" + userLimit +
" userLimitFactor=" + userLimitFactor +
" required: " + required +
" consumed: " + getUser(userName).getConsumedResources() +
" limit: " + limit +
" queueCapacity: " + queueCapacity +
" qconsumed: " + usedResources +
" currentCapacity: " + currentCapacity +
" activeUsers: " + activeUsers +
" clusterCapacity: " + clusterResource
);
}
return limit;
}