YARN-6994. [YARN-3926] Remove last uses of Long from resource types code. (Daniel Templeton via Yufei Gu)

This commit is contained in:
Yufei Gu 2017-08-14 11:18:08 -07:00 committed by Wangda Tan
parent 5c4ab4c291
commit d5e9939ebb
3 changed files with 5 additions and 5 deletions

View File

@ -273,14 +273,14 @@ public void setResourceInformation(String resource,
*/
@Public
@Evolving
public void setResourceValue(String resource, Long value)
public void setResourceValue(String resource, long value)
throws ResourceNotFoundException {
if (resource.equals(MEMORY)) {
this.setMemorySize(value);
return;
}
if (resource.equals(VCORES)) {
this.setVirtualCores(value.intValue());
this.setVirtualCores((int)value);
return;
}

View File

@ -31,8 +31,8 @@
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProto;
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceProtoOrBuilder;
import org.apache.hadoop.yarn.proto.YarnProtos.ResourceInformationProto;
import org.apache.hadoop.yarn.util.resource.ResourceUtils;
import org.apache.hadoop.yarn.util.UnitsConversionUtil;
import org.apache.hadoop.yarn.util.resource.ResourceUtils;
import java.util.Arrays;
import java.util.Map;
@ -174,7 +174,7 @@ public void setResourceInformation(String resource,
}
@Override
public void setResourceValue(String resource, Long value)
public void setResourceValue(String resource, long value)
throws ResourceNotFoundException {
maybeInitBuilder();
if (resource == null) {

View File

@ -104,7 +104,7 @@ public void setResourceInformation(String resource,
}
@Override
public void setResourceValue(String resource, Long value)
public void setResourceValue(String resource, long value)
throws ResourceNotFoundException {
throw new RuntimeException(name + " cannot be modified!");
}