Class JobID

  • All Implemented Interfaces:
    Serializable, Comparable<AbstractID>

    @Public
    public final class JobID
    extends AbstractID
    Unique (at least statistically unique) identifier for a Flink Job. Jobs in Flink correspond to dataflow graphs.

    Jobs act simultaneously as sessions, because jobs can be created and submitted incrementally in different parts. Newer fragments of a graph can be attached to existing graphs, thereby extending the current data flow graphs.

    See Also:
    Serialized Form
    • Constructor Detail

      • JobID

        public JobID()
        Creates a new (statistically) random JobID.
      • JobID

        public JobID​(long lowerPart,
                     long upperPart)
        Creates a new JobID, using the given lower and upper parts.
        Parameters:
        lowerPart - The lower 8 bytes of the ID.
        upperPart - The upper 8 bytes of the ID.
      • JobID

        public JobID​(byte[] bytes)
        Creates a new JobID from the given byte sequence. The byte sequence must be exactly 16 bytes long. The first eight bytes make up the lower part of the ID, while the next 8 bytes make up the upper part of the ID.
        Parameters:
        bytes - The byte sequence.
    • Method Detail

      • generate

        public static JobID generate()
        Creates a new (statistically) random JobID.
        Returns:
        A new random JobID.
      • fromByteArray

        public static JobID fromByteArray​(byte[] bytes)
        Creates a new JobID from the given byte sequence. The byte sequence must be exactly 16 bytes long. The first eight bytes make up the lower part of the ID, while the next 8 bytes make up the upper part of the ID.
        Parameters:
        bytes - The byte sequence.
        Returns:
        A new JobID corresponding to the ID encoded in the bytes.
      • fromHexString

        public static JobID fromHexString​(String hexString)
        Parses a JobID from the given string.
        Parameters:
        hexString - string representation of a JobID
        Returns:
        Parsed JobID
        Throws:
        IllegalArgumentException - if the JobID could not be parsed from the given string