Example usage for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainerImpl getApplicationAttemptId

List of usage examples for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainerImpl getApplicationAttemptId

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.server.resourcemanager.rmcontainer RMContainerImpl getApplicationAttemptId.

Prototype

@Override
    public ApplicationAttemptId getApplicationAttemptId() 

Source Link

Usage

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()));
        }// w w w .  j a  v a 2  s  .c o m
        rmcontainerDA.addAll(rmcontainerToUpdate);
    }
}