YARN-6994. [YARN-3926] Remove last uses of Long from resource types code. (Daniel Templeton via Yufei Gu)
This commit is contained in:
parent
5c4ab4c291
commit
d5e9939ebb
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user