本文整理汇总了Java中org.apache.hadoop.yarn.api.records.ContainerResourceIncrease类的典型用法代码示例。如果您正苦于以下问题:Java ContainerResourceIncrease类的具体用法?Java ContainerResourceIncrease怎么用?Java ContainerResourceIncrease使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContainerResourceIncrease类属于org.apache.hadoop.yarn.api.records包,在下文中一共展示了ContainerResourceIncrease类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: newInstance
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
@Public
@Stable
public static AllocateResponse newInstance(int responseId,
List<ContainerStatus> completedContainers,
List<Container> allocatedContainers, List<NodeReport> updatedNodes,
Resource availResources, AMCommand command, int numClusterNodes,
PreemptionMessage preempt, List<NMToken> nmTokens,
List<ContainerResourceIncrease> increasedContainers,
List<ContainerResourceDecrease> decreasedContainers) {
AllocateResponse response = newInstance(responseId, completedContainers,
allocatedContainers, updatedNodes, availResources, command,
numClusterNodes, preempt, nmTokens);
response.setIncreasedContainers(increasedContainers);
response.setDecreasedContainers(decreasedContainers);
return response;
}
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:AllocateResponse.java
示例2: allocate
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
@Override
public AllocateResponse allocate(AllocateRequest request)
throws YarnException, IOException {
Assert.assertEquals("response ID mismatch",
responseId, request.getResponseId());
++responseId;
org.apache.hadoop.yarn.api.records.Token yarnToken = null;
if (amToken != null) {
yarnToken = org.apache.hadoop.yarn.api.records.Token.newInstance(
amToken.getIdentifier(), amToken.getKind().toString(),
amToken.getPassword(), amToken.getService().toString());
}
return AllocateResponse.newInstance(responseId,
Collections.<ContainerStatus>emptyList(),
Collections.<Container>emptyList(),
Collections.<NodeReport>emptyList(),
Resources.none(), null, 1, null,
Collections.<NMToken>emptyList(),
yarnToken,
Collections.<ContainerResourceIncrease>emptyList(),
Collections.<ContainerResourceDecrease>emptyList());
}
开发者ID:naver,项目名称:hadoop,代码行数:23,代码来源:TestLocalContainerAllocator.java
示例3: setIncreasedContainers
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
@Override
public synchronized void setIncreasedContainers(
List<ContainerResourceIncrease> increasedContainers) {
if (increasedContainers == null)
return;
initLocalIncreasedContainerList();
this.increasedContainers.addAll(increasedContainers);
}
开发者ID:naver,项目名称:hadoop,代码行数:9,代码来源:AllocateResponsePBImpl.java
示例4: initLocalIncreasedContainerList
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
private synchronized void initLocalIncreasedContainerList() {
if (this.increasedContainers != null) {
return;
}
AllocateResponseProtoOrBuilder p = viaProto ? proto : builder;
List<ContainerResourceIncreaseProto> list = p.getIncreasedContainersList();
increasedContainers = new ArrayList<ContainerResourceIncrease>();
for (ContainerResourceIncreaseProto c : list) {
increasedContainers.add(convertFromProtoFormat(c));
}
}
开发者ID:naver,项目名称:hadoop,代码行数:13,代码来源:AllocateResponsePBImpl.java
示例5: getIncreaseProtoIterable
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
private synchronized Iterable<ContainerResourceIncreaseProto>
getIncreaseProtoIterable(
final List<ContainerResourceIncrease> newContainersList) {
maybeInitBuilder();
return new Iterable<ContainerResourceIncreaseProto>() {
@Override
public synchronized Iterator<ContainerResourceIncreaseProto> iterator() {
return new Iterator<ContainerResourceIncreaseProto>() {
Iterator<ContainerResourceIncrease> iter = newContainersList
.iterator();
@Override
public synchronized boolean hasNext() {
return iter.hasNext();
}
@Override
public synchronized ContainerResourceIncreaseProto next() {
return convertToProtoFormat(iter.next());
}
@Override
public synchronized void remove() {
throw new UnsupportedOperationException();
}
};
}
};
}
开发者ID:naver,项目名称:hadoop,代码行数:32,代码来源:AllocateResponsePBImpl.java
示例6: getIncreasedContainers
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
@Override
public synchronized List<ContainerResourceIncrease> getIncreasedContainers() {
initLocalIncreasedContainerList();
return increasedContainers;
}
开发者ID:naver,项目名称:hadoop,代码行数:6,代码来源:AllocateResponsePBImpl.java
示例7: convertFromProtoFormat
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
private synchronized ContainerResourceIncrease convertFromProtoFormat(
ContainerResourceIncreaseProto p) {
return new ContainerResourceIncreasePBImpl(p);
}
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:AllocateResponsePBImpl.java
示例8: convertToProtoFormat
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
private synchronized ContainerResourceIncreaseProto convertToProtoFormat(
ContainerResourceIncrease t) {
return ((ContainerResourceIncreasePBImpl) t).getProto();
}
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:AllocateResponsePBImpl.java
示例9: getIncreasedContainers
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
/**
* Get the list of newly increased containers by <code>ResourceManager</code>
*/
@Public
@Stable
public abstract List<ContainerResourceIncrease> getIncreasedContainers();
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:AllocateResponse.java
示例10: setIncreasedContainers
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
/**
* Set the list of newly increased containers by <code>ResourceManager</code>
*/
@Private
@Unstable
public abstract void setIncreasedContainers(
List<ContainerResourceIncrease> increasedContainers);
开发者ID:naver,项目名称:hadoop,代码行数:8,代码来源:AllocateResponse.java
示例11: getIncreasedContainers
import org.apache.hadoop.yarn.api.records.ContainerResourceIncrease; //导入依赖的package包/类
@Override
public List<ContainerResourceIncrease> getIncreasedContainers() {
return null;
}
开发者ID:hopshadoop,项目名称:hops,代码行数:5,代码来源:AllocateResponsePBImpl.java
注:本文中的org.apache.hadoop.yarn.api.records.ContainerResourceIncrease类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论