YARN-9099. GpuResourceAllocator#getReleasingGpus calculates number of GPUs in a wrong way. Contributed by Szilard Nemeth.
This commit is contained in:
parent
53729279c7
commit
71c49fa60f
|
@ -258,10 +258,7 @@ public class GpuResourceAllocator {
|
||||||
|
|
||||||
private synchronized long getReleasingGpus() {
|
private synchronized long getReleasingGpus() {
|
||||||
long releasingGpus = 0;
|
long releasingGpus = 0;
|
||||||
Iterator<Map.Entry<GpuDevice, ContainerId>> iter = usedDevices.entrySet()
|
for (ContainerId containerId : ImmutableSet.copyOf(usedDevices.values())) {
|
||||||
.iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
ContainerId containerId = iter.next().getValue();
|
|
||||||
Container container;
|
Container container;
|
||||||
if ((container = nmContext.getContainers().get(containerId)) != null) {
|
if ((container = nmContext.getContainers().get(containerId)) != null) {
|
||||||
if (container.isContainerInFinalStates()) {
|
if (container.isContainerInFinalStates()) {
|
||||||
|
|
Loading…
Reference in New Issue