Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 70 additions & 70 deletions dataproc/google/cloud/dataproc_v1/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,24 @@
import enum


class ClusterOperationStatus(object):
class State(enum.IntEnum):
"""
The operation state.

Attributes:
UNKNOWN (int): Unused.
PENDING (int): The operation has been created.
RUNNING (int): The operation is running.
DONE (int): The operation is done; either cancelled or completed.
"""

UNKNOWN = 0
PENDING = 1
RUNNING = 2
DONE = 3


class ClusterStatus(object):
class State(enum.IntEnum):
"""
Expand Down Expand Up @@ -61,36 +79,6 @@ class Substate(enum.IntEnum):
STALE_STATUS = 2


class LoggingConfig(object):
class Level(enum.IntEnum):
"""
The Log4j level for job execution. When running an `Apache
Hive <http://hive.apache.org/>`__ job, Cloud Dataproc configures the
Hive client to an equivalent verbosity level.

Attributes:
LEVEL_UNSPECIFIED (int): Level is unspecified. Use default level for log4j.
ALL (int): Use ALL level for log4j.
TRACE (int): Use TRACE level for log4j.
DEBUG (int): Use DEBUG level for log4j.
INFO (int): Use INFO level for log4j.
WARN (int): Use WARN level for log4j.
ERROR (int): Use ERROR level for log4j.
FATAL (int): Use FATAL level for log4j.
OFF (int): Turn off log4j.
"""

LEVEL_UNSPECIFIED = 0
ALL = 1
TRACE = 2
DEBUG = 3
INFO = 4
WARN = 5
ERROR = 6
FATAL = 7
OFF = 8


class JobStatus(object):
class State(enum.IntEnum):
"""
Expand Down Expand Up @@ -152,35 +140,6 @@ class Substate(enum.IntEnum):
STALE_STATUS = 3


class YarnApplication(object):
class State(enum.IntEnum):
"""
The application state, corresponding to
<code>YarnProtos.YarnApplicationStateProto</code>.

Attributes:
STATE_UNSPECIFIED (int): Status is unspecified.
NEW (int): Status is NEW.
NEW_SAVING (int): Status is NEW\_SAVING.
SUBMITTED (int): Status is SUBMITTED.
ACCEPTED (int): Status is ACCEPTED.
RUNNING (int): Status is RUNNING.
FINISHED (int): Status is FINISHED.
FAILED (int): Status is FAILED.
KILLED (int): Status is KILLED.
"""

STATE_UNSPECIFIED = 0
NEW = 1
NEW_SAVING = 2
SUBMITTED = 3
ACCEPTED = 4
RUNNING = 5
FINISHED = 6
FAILED = 7
KILLED = 8


class ListJobsRequest(object):
class JobStateMatcher(enum.IntEnum):
"""
Expand All @@ -198,22 +157,34 @@ class JobStateMatcher(enum.IntEnum):
NON_ACTIVE = 2


class ClusterOperationStatus(object):
class State(enum.IntEnum):
class LoggingConfig(object):
class Level(enum.IntEnum):
"""
The operation state.
The Log4j level for job execution. When running an `Apache
Hive <http://hive.apache.org/>`__ job, Cloud Dataproc configures the
Hive client to an equivalent verbosity level.

Attributes:
UNKNOWN (int): Unused.
PENDING (int): The operation has been created.
RUNNING (int): The operation is running.
DONE (int): The operation is done; either cancelled or completed.
LEVEL_UNSPECIFIED (int): Level is unspecified. Use default level for log4j.
ALL (int): Use ALL level for log4j.
TRACE (int): Use TRACE level for log4j.
DEBUG (int): Use DEBUG level for log4j.
INFO (int): Use INFO level for log4j.
WARN (int): Use WARN level for log4j.
ERROR (int): Use ERROR level for log4j.
FATAL (int): Use FATAL level for log4j.
OFF (int): Turn off log4j.
"""

UNKNOWN = 0
PENDING = 1
RUNNING = 2
DONE = 3
LEVEL_UNSPECIFIED = 0
ALL = 1
TRACE = 2
DEBUG = 3
INFO = 4
WARN = 5
ERROR = 6
FATAL = 7
OFF = 8


class WorkflowMetadata(object):
Expand Down Expand Up @@ -255,3 +226,32 @@ class NodeState(enum.IntEnum):
RUNNING = 3
COMPLETED = 4
FAILED = 5


class YarnApplication(object):
class State(enum.IntEnum):
"""
The application state, corresponding to
<code>YarnProtos.YarnApplicationStateProto</code>.

Attributes:
STATE_UNSPECIFIED (int): Status is unspecified.
NEW (int): Status is NEW.
NEW_SAVING (int): Status is NEW\_SAVING.
SUBMITTED (int): Status is SUBMITTED.
ACCEPTED (int): Status is ACCEPTED.
RUNNING (int): Status is RUNNING.
FINISHED (int): Status is FINISHED.
FAILED (int): Status is FAILED.
KILLED (int): Status is KILLED.
"""

STATE_UNSPECIFIED = 0
NEW = 1
NEW_SAVING = 2
SUBMITTED = 3
ACCEPTED = 4
RUNNING = 5
FINISHED = 6
FAILED = 7
KILLED = 8
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def channel(self):

@property
def create_cluster(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.create_cluster`.

Creates a cluster in a project.

Expand All @@ -118,7 +118,7 @@ def create_cluster(self):

@property
def update_cluster(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.update_cluster`.

Updates a cluster in a project.

Expand All @@ -131,7 +131,7 @@ def update_cluster(self):

@property
def delete_cluster(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.delete_cluster`.

Deletes a cluster in a project.

Expand All @@ -144,7 +144,7 @@ def delete_cluster(self):

@property
def get_cluster(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.get_cluster`.

Gets the resource representation for a cluster in a project.

Expand All @@ -157,7 +157,7 @@ def get_cluster(self):

@property
def list_clusters(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.list_clusters`.

Lists all regions/{region}/clusters in a project.

Expand All @@ -170,7 +170,7 @@ def list_clusters(self):

@property
def diagnose_cluster(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`ClusterControllerClient.diagnose_cluster`.

Gets cluster diagnostic information. After the operation completes, the
Operation.response field contains ``DiagnoseClusterOutputLocation``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def channel(self):

@property
def submit_job(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.submit_job`.

Submits a job to a cluster.

Expand All @@ -108,7 +108,7 @@ def submit_job(self):

@property
def get_job(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.get_job`.

Gets the resource representation for a job in a project.

Expand All @@ -121,7 +121,7 @@ def get_job(self):

@property
def list_jobs(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.list_jobs`.

Lists regions/{region}/jobs in a project.

Expand All @@ -134,7 +134,7 @@ def list_jobs(self):

@property
def update_job(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.update_job`.

Updates a job in a project.

Expand All @@ -147,7 +147,7 @@ def update_job(self):

@property
def cancel_job(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.cancel_job`.

Starts a job cancellation request. To access the job resource after
cancellation, call
Expand All @@ -164,7 +164,7 @@ def cancel_job(self):

@property
def delete_job(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`JobControllerClient.delete_job`.

Deletes the job from the project. If the job is active, the delete
fails, and the response returns ``FAILED_PRECONDITION``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def channel(self):

@property
def create_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.create_workflow_template`.

Creates new workflow template.

Expand All @@ -120,7 +120,7 @@ def create_workflow_template(self):

@property
def get_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.get_workflow_template`.

Retrieves the latest workflow template.

Expand All @@ -136,7 +136,7 @@ def get_workflow_template(self):

@property
def instantiate_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.instantiate_workflow_template`.

Instantiates a template and begins execution.

Expand All @@ -161,7 +161,7 @@ def instantiate_workflow_template(self):

@property
def instantiate_inline_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.instantiate_inline_workflow_template`.

Instantiates a template and begins execution.

Expand Down Expand Up @@ -192,7 +192,7 @@ def instantiate_inline_workflow_template(self):

@property
def update_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.update_workflow_template`.

Updates (replaces) workflow template. The updated template
must contain version that matches the current server version.
Expand All @@ -206,7 +206,7 @@ def update_workflow_template(self):

@property
def list_workflow_templates(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.list_workflow_templates`.

Lists workflows that match the specified filter in the request.

Expand All @@ -219,7 +219,7 @@ def list_workflow_templates(self):

@property
def delete_workflow_template(self):
"""Return the gRPC stub for {$apiMethod.name}.
"""Return the gRPC stub for :meth:`WorkflowTemplateServiceClient.delete_workflow_template`.

Deletes a workflow template. It does not cancel in-progress workflows.

Expand Down
Loading