Reference documentation and code samples for the Cloud Dataproc V1beta2 API class Google::Cloud::Dataproc::V1beta2::JobController::Client.
Client for the JobController service.
The JobController provides methods to manage jobs.
Inherits
- Object
Methods
.configure
def self.configure() { |config| ... } -> Client::ConfigurationConfigure the JobController Client class.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
# Modify the configuration for all JobController clients ::Google::Cloud::Dataproc::V1beta2::JobController::Client.configure do |config| config.timeout = 10.0 end
#cancel_job
def cancel_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Job
def cancel_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::JobStarts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list or regions/{region}/jobs.get.
def cancel_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobcancel_job via a request object, either of type
CancelJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::CancelJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def cancel_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobcancel_job via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::Job)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#configure
def configure() { |config| ... } -> Client::ConfigurationConfigure the JobController Client instance.
The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.
See Configuration for a description of the configuration fields.
- (config) — Configure the Client client.
- config (Client::Configuration)
#delete_job
def delete_job(request, options = nil) -> ::Google::Protobuf::Empty
def delete_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Protobuf::EmptyDeletes the job from the project. If the job is active, the delete fails,
and the response returns FAILED_PRECONDITION.
def delete_job(request, options = nil) -> ::Google::Protobuf::Emptydelete_job via a request object, either of type
DeleteJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::DeleteJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def delete_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Protobuf::Emptydelete_job via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Protobuf::Empty)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#get_job
def get_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Job
def get_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::JobGets the resource representation for a job in a project.
def get_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobget_job via a request object, either of type
GetJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::GetJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_job(project_id: nil, region: nil, job_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobget_job via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::Job)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#initialize
def initialize() { |config| ... } -> ClientCreate a new JobController client object.
- (config) — Configure the JobController client.
- config (Client::Configuration)
- (Client) — a new instance of Client
# Create a client using the default configuration client = ::Google::Cloud::Dataproc::V1beta2::JobController::Client.new # Create a client using a custom configuration client = ::Google::Cloud::Dataproc::V1beta2::JobController::Client.new do |config| config.timeout = 10.0 end
#list_jobs
def list_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>
def list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>Lists regions/{region}/jobs in a project.
def list_jobs(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>list_jobs via a request object, either of type
ListJobsRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::ListJobsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_jobs(project_id: nil, region: nil, page_size: nil, page_token: nil, cluster_name: nil, job_state_matcher: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>list_jobs via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- page_size (::Integer) — Optional. The number of results to return in each response.
- page_token (::String) — Optional. The page token, returned by a previous call, to request the next page of results.
- cluster_name (::String) — Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.
-
job_state_matcher (::Google::Cloud::Dataproc::V1beta2::ListJobsRequest::JobStateMatcher) — Optional. Specifies enumerated categories of jobs to list.
(default = match ALL jobs).
If
filteris provided,jobStateMatcherwill be ignored. -
filter (::String) — Optional. A filter constraining the jobs to list. Filters are
case-sensitive and have the following syntax:
[field = value] AND [field [= value]] ...
where field is
status.stateorlabels.[KEY], and[KEY]is a label key. value can be*to match all values.status.statecan be eitherACTIVEorNON_ACTIVE. Only the logicalANDoperator is supported; space-separated items are treated as having an implicitANDoperator.Example filter:
status.state = ACTIVE AND labels.env = staging AND labels.starred = *
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::PagedEnumerable<::Google::Cloud::Dataproc::V1beta2::Job>)
- (::Google::Cloud::Error) — if the RPC is aborted.
#operations_client
def operations_client() -> ::Google::Cloud::Dataproc::V1beta2::JobController::OperationsGet the associated client for long-running operations.
#submit_job
def submit_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Job
def submit_job(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::JobSubmits a job to a cluster.
def submit_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobsubmit_job via a request object, either of type
SubmitJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::SubmitJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def submit_job(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobsubmit_job via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job (::Google::Cloud::Dataproc::V1beta2::Job, ::Hash) — Required. The job resource.
-
request_id (::String) — Optional. A unique id used to identify the request. If the server
receives two SubmitJobRequest requests with the same
id, then the second request will be ignored and the
first Job created and stored in the backend
is returned.
It is recommended to always set this value to a UUID.
The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::Job)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#submit_job_as_operation
def submit_job_as_operation(request, options = nil) -> ::Gapic::Operation
def submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Gapic::OperationSubmits job to a cluster.
def submit_job_as_operation(request, options = nil) -> ::Gapic::Operationsubmit_job_as_operation via a request object, either of type
SubmitJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::SubmitJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def submit_job_as_operation(project_id: nil, region: nil, job: nil, request_id: nil) -> ::Gapic::Operationsubmit_job_as_operation via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job (::Google::Cloud::Dataproc::V1beta2::Job, ::Hash) — Required. The job resource.
-
request_id (::String) — Optional. A unique id used to identify the request. If the server
receives two SubmitJobRequest requests with the same
id, then the second request will be ignored and the
first Job created and stored in the backend
is returned.
It is recommended to always set this value to a UUID.
The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
- (response, operation) — Access the result along with the RPC operation
- response (::Gapic::Operation)
- operation (::GRPC::ActiveCall::Operation)
- (::Gapic::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.
#update_job
def update_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Job
def update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil) -> ::Google::Cloud::Dataproc::V1beta2::JobUpdates a job in a project.
def update_job(request, options = nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobupdate_job via a request object, either of type
UpdateJobRequest or an equivalent Hash.
- request (::Google::Cloud::Dataproc::V1beta2::UpdateJobRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
- options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def update_job(project_id: nil, region: nil, job_id: nil, job: nil, update_mask: nil) -> ::Google::Cloud::Dataproc::V1beta2::Jobupdate_job via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
- project_id (::String) — Required. The ID of the Google Cloud Platform project that the job belongs to.
- region (::String) — Required. The Dataproc region in which to handle the request.
- job_id (::String) — Required. The job ID.
- job (::Google::Cloud::Dataproc::V1beta2::Job, ::Hash) — Required. The changes to the job.
-
update_mask (::Google::Protobuf::FieldMask, ::Hash) — Required. Specifies the path, relative to
Job, of the field to update. For example, to update the labels of a Job theupdate_maskparameter would be specified aslabels, and thePATCHrequest body would specify the new value. Note: Currently,labelsis the only field that can be updated.
- (response, operation) — Access the result along with the RPC operation
- response (::Google::Cloud::Dataproc::V1beta2::Job)
- operation (::GRPC::ActiveCall::Operation)
- (::Google::Cloud::Error) — if the RPC is aborted.