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



1025
1026
1027
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1025

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)


1012
1013
1014
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1012

def completed
  @completed
end

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

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



944
945
946
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 944

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



968
969
970
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 968

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



956
957
958
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 956

def errors
  @errors
end

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

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



961
962
963
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 961

def metric_updates
  @metric_updates
end

#progressGoogle::Apis::DataflowV1b3::ApproximateProgress

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



980
981
982
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 980

def progress
  @progress
end

#report_indexString

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:

  • (String)


1000
1001
1002
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1000

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



1018
1019
1020
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1018

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)


985
986
987
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 985

def requested_lease_duration
  @requested_lease_duration
end

#source_forkGoogle::Apis::DataflowV1b3::SourceFork

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



1023
1024
1025
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1023

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



975
976
977
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 975

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



1007
1008
1009
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1007

def stop_position
  @stop_position
end

#work_item_idString

Identifies the WorkItem. Corresponds to the JSON property workItemId

Returns:

  • (String)


949
950
951
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 949

def work_item_id
  @work_item_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
# File 'generated/google/apis/dataflow_v1b3/classes.rb', line 1030

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