public class JobId extends Descriptor implements Comparable<JobId>
"name:version:hashvalue"The hash value is so that if you are talking to multiple clusters, and the job definitions are slightly different, even though they have the same name and version, they will still be uniquely identifiable. This is most important when executing commands against multiple clusters. Many endpoints taking JobId can take an abbreviated JobId. That is, one without a the final colon and hash value.
| Modifier and Type | Class and Description |
|---|---|
static class |
JobId.Builder |
| Modifier and Type | Field and Description |
|---|---|
static com.google.common.base.Function<String,JobId> |
FROM_STRING |
| Constructor and Description |
|---|
JobId(String name,
String version)
Create a new job id with a specific name and version.
|
JobId(String name,
String version,
String hash)
Create a fully qualified job id with name, version and hash.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(JobId o) |
boolean |
equals(Object o) |
static JobId |
fromString(String id)
Parse a job id string.
|
String |
getHash() |
String |
getName() |
String |
getVersion() |
int |
hashCode() |
boolean |
isFullyQualified() |
static JobId.Builder |
newBuilder() |
static JobId |
parse(String id)
Parse a job id string.
|
String |
toShortString() |
String |
toString() |
parse, parse, toJsonBytes, toJsonStringpublic JobId(String name, String version, String hash)
name - The name of the job.version - The version of the job.hash - The hash of the job.public static JobId fromString(String id)
id - A string representation of the job ID.parse(String)public static JobId parse(String id) throws JobIdParseException
id - A string representation of the job ID.JobIdParseException - If the ID cannot be parsed.fromString(String)public String toShortString()
public String getName()
public String getVersion()
public String getHash()
public int compareTo(JobId o)
compareTo in interface Comparable<JobId>public static JobId.Builder newBuilder()
public boolean isFullyQualified()
Copyright © 2016. All rights reserved.