Class: Google::Apis::DataflowV1b3::WorkItemStatus

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dataflow_v1b3/classes.rb,
generated/google/apis/dataflow_v1b3/representations.rb,
generated/google/apis/dataflow_v1b3/representations.rb

Overview

Conveys a worker's progress through the work described by a WorkItem.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WorkItemStatus

Returns a new instance of WorkItemStatus.



5505
5506
5507
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5505

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#completedBoolean Also known as: completed?

True if the WorkItem was completed (successfully or unsuccessfully). Corresponds to the JSON property completed

Returns:

  • (Boolean)


5419
5420
5421
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5419

def completed
  @completed
end

#counter_updatesArray<Google::Apis::DataflowV1b3::CounterUpdate>

Worker output counters for this WorkItem. Corresponds to the JSON property counterUpdates



5425
5426
5427
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5425

def counter_updates
  @counter_updates
end

#dynamic_source_splitGoogle::Apis::DataflowV1b3::DynamicSourceSplit

When a task splits using WorkItemStatus.dynamic_source_split, this message describes the two parts of the split relative to the description of the current task's input. Corresponds to the JSON property dynamicSourceSplit



5432
5433
5434
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5432

def dynamic_source_split
  @dynamic_source_split
end

#errorsArray<Google::Apis::DataflowV1b3::Status>

Specifies errors which occurred during processing. If errors are provided, and completed = true, then the WorkItem is considered to have failed. Corresponds to the JSON property errors



5439
5440
5441
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5439

def errors
  @errors
end

#metric_updatesArray<Google::Apis::DataflowV1b3::MetricUpdate>

DEPRECATED in favor of counter_updates. Corresponds to the JSON property metricUpdates



5444
5445
5446
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5444

def metric_updates
  @metric_updates
end

#progressGoogle::Apis::DataflowV1b3::ApproximateProgress

Obsolete in favor of ApproximateReportedProgress and ApproximateSplitRequest. Corresponds to the JSON property progress



5449
5450
5451
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5449

def progress
  @progress
end

#report_indexFixnum

The report index. When a WorkItem is leased, the lease will contain an initial report index. When a WorkItem's status is reported to the system, the report should be sent with that report index, and the response will contain the index the worker should use for the next report. Reports received with unexpected index values will be rejected by the service. In order to preserve idempotency, the worker should not alter the contents of a report, even if the worker must submit the same report multiple times before getting back a response. The worker should not submit a subsequent report until the response for the previous report had been received from the service. Corresponds to the JSON property reportIndex

Returns:

  • (Fixnum)


5464
5465
5466
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5464

def report_index
  @report_index
end

#reported_progressGoogle::Apis::DataflowV1b3::ApproximateReportedProgress

A progress measurement of a WorkItem by a worker. Corresponds to the JSON property reportedProgress



5469
5470
5471
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5469

def reported_progress
  @reported_progress
end

#requested_lease_durationString

Amount of time the worker requests for its lease. Corresponds to the JSON property requestedLeaseDuration

Returns:

  • (String)


5474
5475
5476
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5474

def requested_lease_duration
  @requested_lease_duration
end

#source_forkGoogle::Apis::DataflowV1b3::SourceFork

DEPRECATED in favor of DynamicSourceSplit. Corresponds to the JSON property sourceFork



5479
5480
5481
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5479

def source_fork
  @source_fork
end

#source_operation_responseGoogle::Apis::DataflowV1b3::SourceOperationResponse

The result of a SourceOperationRequest, specified in ReportWorkItemStatusRequest.source_operation when the work item is completed. Corresponds to the JSON property sourceOperationResponse



5486
5487
5488
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5486

def source_operation_response
  @source_operation_response
end

#stop_positionGoogle::Apis::DataflowV1b3::Position

Position defines a position within a collection of data. The value can be either the end position, a key (used with ordered collections), a byte offset, or a record index. Corresponds to the JSON property stopPosition



5493
5494
5495
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5493

def stop_position
  @stop_position
end

#total_throttler_wait_time_secondsFloat

Total time the worker spent being throttled by external systems. Corresponds to the JSON property totalThrottlerWaitTimeSeconds

Returns:

  • (Float)


5498
5499
5500
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5498

def total_throttler_wait_time_seconds
  @total_throttler_wait_time_seconds
end

#work_item_idString

Identifies the WorkItem. Corresponds to the JSON property workItemId

Returns:

  • (String)


5503
5504
5505
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5503

def work_item_id
  @work_item_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 5510

def update!(**args)
  @completed = args[:completed] if args.key?(:completed)
  @counter_updates = args[:counter_updates] if args.key?(:counter_updates)
  @dynamic_source_split = args[:dynamic_source_split] if args.key?(:dynamic_source_split)
  @errors = args[:errors] if args.key?(:errors)
  @metric_updates = args[:metric_updates] if args.key?(:metric_updates)
  @progress = args[:progress] if args.key?(:progress)
  @report_index = args[:report_index] if args.key?(:report_index)
  @reported_progress = args[:reported_progress] if args.key?(:reported_progress)
  @requested_lease_duration = args[:requested_lease_duration] if args.key?(:requested_lease_duration)
  @source_fork = args[:source_fork] if args.key?(:source_fork)
  @source_operation_response = args[:source_operation_response] if args.key?(:source_operation_response)
  @stop_position = args[:stop_position] if args.key?(:stop_position)
  @total_throttler_wait_time_seconds = args[:total_throttler_wait_time_seconds] if args.key?(:total_throttler_wait_time_seconds)
  @work_item_id = args[:work_item_id] if args.key?(:work_item_id)
end