Java Code Examples for org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto

The following examples show how to use org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: ambari-metrics   Source File: ContainerStartDataPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource resource) {
  return ((ResourcePBImpl) resource).getProto();
}
 
Example 2
Source Project: ambari-metrics   Source File: ContainerStartDataPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto resource) {
  return new ResourcePBImpl(resource);
}
 
Example 3
private Resource convertFromProtoFormat(ResourceProto resource) {
  return new ResourcePBImpl(resource);
}
 
Example 4
private ResourceProto convertToProtoFormat(Resource resource) {
  return ((ResourcePBImpl)resource).getProto();
}
 
Example 5
Source Project: hadoop   Source File: GetNewApplicationResponsePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private Resource convertFromProtoFormat(ResourceProto resource) {
 return new ResourcePBImpl(resource);
}
 
Example 6
Source Project: hadoop   Source File: GetNewApplicationResponsePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource resource) {
 return ((ResourcePBImpl)resource).getProto();
}
 
Example 7
Source Project: hadoop   Source File: AllocateResponsePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private synchronized ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 8
Source Project: hadoop   Source File: AllocateResponsePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private synchronized ResourceProto convertToProtoFormat(Resource r) {
  return ((ResourcePBImpl) r).getProto();
}
 
Example 9
private Resource convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 10
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl) t).getProto();
}
 
Example 11
Source Project: hadoop   Source File: ContainerPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 12
Source Project: hadoop   Source File: ContainerPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl)t).getProto();
}
 
Example 13
Source Project: hadoop   Source File: NodeReportPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 14
Source Project: hadoop   Source File: NodeReportPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource r) {
  return ((ResourcePBImpl) r).getProto();
}
 
Example 15
Source Project: hadoop   Source File: ResourcePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ResourcePBImpl() {
  builder = ResourceProto.newBuilder();
}
 
Example 16
Source Project: hadoop   Source File: ResourcePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ResourcePBImpl(ResourceProto proto) {
  this.proto = proto;
  viaProto = true;
}
 
Example 17
Source Project: hadoop   Source File: ResourcePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
public ResourceProto getProto() {
  proto = viaProto ? proto : builder.build();
  viaProto = true;
  return proto;
}
 
Example 18
Source Project: hadoop   Source File: ResourcePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private void maybeInitBuilder() {
  if (viaProto || builder == null) {
    builder = ResourceProto.newBuilder(proto);
  }
  viaProto = false;
}
 
Example 19
Source Project: hadoop   Source File: ResourceOptionPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(
    Resource resource) {
  return ((ResourcePBImpl)resource).getProto();
}
 
Example 20
Source Project: hadoop   Source File: ResourceOptionPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(
    ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 21
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 22
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl)t).getProto();
}
 
Example 23
Source Project: hadoop   Source File: ResourceRequestPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 24
Source Project: hadoop   Source File: ResourceRequestPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl)t).getProto();
}
 
Example 25
Source Project: hadoop   Source File: ReservationRequestPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 26
Source Project: hadoop   Source File: ReservationRequestPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl) t).getProto();
}
 
Example 27
Source Project: hadoop   Source File: ApplicationSubmissionContextPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourcePBImpl convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 28
Source Project: hadoop   Source File: ApplicationSubmissionContextPBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl)t).getProto();
}
 
Example 29
Source Project: hadoop   Source File: ContainerResourceDecreasePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private Resource convertFromProtoFormat(ResourceProto p) {
  return new ResourcePBImpl(p);
}
 
Example 30
Source Project: hadoop   Source File: ContainerResourceDecreasePBImpl.java    License: Apache License 2.0 4 votes vote down vote up
private ResourceProto convertToProtoFormat(Resource t) {
  return ((ResourcePBImpl) t).getProto();
}