@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class ReservationId extends Object implements Comparable<ReservationId>
ReservationId represents the globally unique identifier for
a reservation.
The globally unique nature of the identifier is achieved by using the
cluster timestamp i.e. start-time of the ResourceManager
along with a monotonically increasing counter for the reservation.
| Modifier and Type | Field and Description |
|---|---|
protected long |
clusterTimestamp |
protected long |
id |
static String |
reserveIdStrPrefix |
| Constructor and Description |
|---|
ReservationId() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
build() |
int |
compareTo(ReservationId other) |
boolean |
equals(Object obj) |
abstract long |
getClusterTimestamp()
Get the start time of the
ResourceManager which is used to
generate globally unique ReservationId. |
abstract long |
getId()
Get the long identifier of the
ReservationId which is unique for
all Reservations started by a particular instance of the
ResourceManager. |
int |
hashCode() |
static ReservationId |
newInstance(long clusterTimestamp,
long id) |
static ReservationId |
parseReservationId(String reservationId)
Parse the string argument as a
ReservationId |
protected abstract void |
setClusterTimestamp(long clusterTimestamp) |
protected abstract void |
setId(long id) |
String |
toString() |
@InterfaceAudience.Private @InterfaceStability.Unstable public static final String reserveIdStrPrefix
protected long clusterTimestamp
protected long id
@InterfaceAudience.Private @InterfaceStability.Unstable public static ReservationId newInstance(long clusterTimestamp, long id)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract long getId()
ReservationId which is unique for
all Reservations started by a particular instance of the
ResourceManager.ReservationId@InterfaceAudience.Private @InterfaceStability.Unstable protected abstract void setId(long id)
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract long getClusterTimestamp()
ResourceManager which is used to
generate globally unique ReservationId.ResourceManager@InterfaceAudience.Private @InterfaceStability.Unstable protected abstract void setClusterTimestamp(long clusterTimestamp)
protected abstract void build()
public int compareTo(ReservationId other)
compareTo in interface Comparable<ReservationId>@InterfaceAudience.Public @InterfaceStability.Unstable public static ReservationId parseReservationId(String reservationId) throws IOException
ReservationIdreservationId - the string representation of the ReservationIdReservationId corresponding to the input string if
valid, null if input is nullIOException - if unable to parse the input stringCopyright © 2008–2023 Apache Software Foundation. All rights reserved.