List of usage examples for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainerImpl getContainer
@Override
public Container getContainer()
From source file:io.hops.ha.common.TransactionStateImpl.java
License:Apache License
public void addRMContainerToUpdate(RMContainerImpl rmContainer) { rmContainersToUpdate.put(rmContainer.getContainer().getId().toString(), rmContainer); }
From source file:io.hops.ha.common.TransactionStateImpl.java
License:Apache License
private void persistRMContainerToUpdate() throws StorageException { if (!rmContainersToUpdate.isEmpty()) { RMContainerDataAccess rmcontainerDA = (RMContainerDataAccess) RMStorageFactory .getDataAccess(RMContainerDataAccess.class); ArrayList<RMContainer> rmcontainerToUpdate = new ArrayList<RMContainer>(); for (String containerId : rmContainersToUpdate.keySet()) { RMContainerImpl rmContainer = rmContainersToUpdate.get(containerId); rmcontainerToUpdate.add(new RMContainer(rmContainer.getContainer().getId().toString(), rmContainer.getApplicationAttemptId().toString(), rmContainer.getNodeId().toString(), rmContainer.getUser(), // rmContainer.getReservedNode(), // Integer.MIN_VALUE, rmContainer.getStartTime(), rmContainer.getFinishTime(), rmContainer.getState().toString(), rmContainer.getContainerState().toString(), rmContainer.getContainerExitStatus())); }//from w w w . j ava 2 s . com rmcontainerDA.addAll(rmcontainerToUpdate); } }