gravitino.api.job.job_template.JobType

class gravitino.api.job.job_template.JobType(value)

Bases: Enum

JobType is an enum to define the type of the job.

Gravitino supports different types of jobs, such as Spark and Shell. The job type is required to determine the runtime environment for executing the job.

__init__()

Methods

job_type_serialize(job_type)

Serializes the JobType to a string.

job_type_deserialize(job_type_str)

Deserializes a string to a JobType.

Attributes

SPARK

job type for executing Spark jobs

SHELL

job type for executing shell commands

SHELL = 'shell'

job type for executing shell commands

SPARK = 'spark'

job type for executing Spark jobs

classmethod job_type_deserialize(job_type_str: str) JobType

Deserializes a string to a JobType.

Args:

job_type_str: The string representation of the JobType.

Returns:

The JobType corresponding to the string.

classmethod job_type_serialize(job_type: JobType) str

Serializes the JobType to a string.

Args:

job_type: The JobType to serialize.

Returns:

The serialized string representation of the JobType.