Example usage for org.apache.hadoop.yarn.api.records ContainerId getContainerId

List of usage examples for org.apache.hadoop.yarn.api.records ContainerId getContainerId

Introduction

In this page you can find the example usage for org.apache.hadoop.yarn.api.records ContainerId getContainerId.

Prototype

@Public
@Unstable
public abstract long getContainerId();

Source Link

Document

Get the identifier of the ContainerId.

Usage

From source file:org.apache.metron.maas.service.callback.ContainerRequestListener.java

License:Apache License

@Override
public void onContainerStopped(ContainerId containerId) {
    if (LOG.isDebugEnabled()) {
        LOG.debug("Succeeded to stop Container " + containerId);
    }//w ww  .  j  a v  a 2s.co  m
    if (containerId == null) {
        LOG.error("Container stopped callback: Empty container ID!");
        throw new IllegalStateException("onContainerStopped returned null container ID!");
    }
    serviceDiscoverer.unregisterByContainer(containerId.getContainerId() + "");
    removeContainer(containerId);
}

From source file:org.apache.metron.maas.service.callback.ContainerRequestListener.java

License:Apache License

@Override
public void onStartContainerError(ContainerId containerId, Throwable t) {
    LOG.error("Failed to start Container " + containerId);
    serviceDiscoverer.unregisterByContainer(containerId.getContainerId() + "");
    removeContainer(containerId);/*from   w w w  .  j  ava 2  s  . c o  m*/
}

From source file:org.apache.metron.maas.service.callback.ContainerRequestListener.java

License:Apache License

@Override
public void onStopContainerError(ContainerId containerId, Throwable t) {
    LOG.error("Failed to stop Container " + containerId);
    serviceDiscoverer.unregisterByContainer(containerId.getContainerId() + "");
    removeContainer(containerId);//from  w  w  w .j av  a  2s . co m
}