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() {
|
||||
long releasingGpus = 0;
|
||||
Iterator<Map.Entry<GpuDevice, ContainerId>> iter = usedDevices.entrySet()
|
||||
.iterator();
|
||||
while (iter.hasNext()) {
|
||||
ContainerId containerId = iter.next().getValue();
|
||||
for (ContainerId containerId : ImmutableSet.copyOf(usedDevices.values())) {
|
||||
Container container;
|
||||
if ((container = nmContext.getContainers().get(containerId)) != null) {
|
||||
if (container.isContainerInFinalStates()) {
|
||||
|
|
Loading…
Reference in New Issue