@InterfaceAudience.Public @InterfaceStability.Stable public abstract class ContainerId extends Object implements Comparable<ContainerId>
ContainerId
represents a globally unique identifier
for a Container
in the cluster.
Modifier and Type | Field and Description |
---|---|
static long |
CONTAINER_ID_BITMASK |
Constructor and Description |
---|
ContainerId() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
build() |
int |
compareTo(ContainerId other) |
boolean |
equals(Object obj) |
static ContainerId |
fromString(String containerIdStr) |
abstract ApplicationAttemptId |
getApplicationAttemptId()
Get the
ApplicationAttemptId of the application to which the
Container was assigned. |
abstract long |
getContainerId()
Get the identifier of the
ContainerId . |
abstract int |
getId()
Deprecated.
|
int |
hashCode() |
String |
toString() |
public static final long CONTAINER_ID_BITMASK
public ContainerId()
@InterfaceAudience.Public @InterfaceStability.Stable public abstract ApplicationAttemptId getApplicationAttemptId()
ApplicationAttemptId
of the application to which the
Container
was assigned.
Note: If containers are kept alive across application attempts via
ApplicationSubmissionContext.setKeepContainersAcrossApplicationAttempts(boolean)
the ContainerId
does not necessarily contain the current
running application attempt's ApplicationAttemptId
This
container can be allocated by previously exited application attempt and
managed by the current running attempt thus have the previous application
attempt's ApplicationAttemptId
.
ApplicationAttemptId
of the application to which the
Container
was assigned@InterfaceAudience.Public @Deprecated @InterfaceStability.Stable public abstract int getId()
ContainerId
,
which doesn't include epoch. Note that this method will be marked as
deprecated, so please use getContainerId
instead.ContainerId
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract long getContainerId()
ContainerId
. Upper 24 bits are
reserved as epoch of cluster, and lower 40 bits are reserved as
sequential number of containers.ContainerId
public int compareTo(ContainerId other)
compareTo
in interface Comparable<ContainerId>
public String toString()
toString
in class Object
@InterfaceAudience.Public @InterfaceStability.Unstable public static ContainerId fromString(String containerIdStr)
protected abstract void build()
Copyright © 2015 Apache Software Foundation. All rights reserved.