#include <work_item_status.h>
Conveys a worker's progress through the work described by a WorkItem.
◆ WorkItemStatus() [1/2]
google_dataflow_api::WorkItemStatus::WorkItemStatus |
( |
const Json::Value & |
storage | ) |
|
|
explicit |
Standard constructor for an immutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ WorkItemStatus() [2/2]
google_dataflow_api::WorkItemStatus::WorkItemStatus |
( |
Json::Value * |
storage | ) |
|
|
explicit |
Standard constructor for a mutable data object instance.
- Parameters
-
[in] | storage | The underlying data storage for this instance. |
◆ ~WorkItemStatus()
google_dataflow_api::WorkItemStatus::~WorkItemStatus |
( |
| ) |
|
|
virtual |
◆ clear_completed()
void google_dataflow_api::WorkItemStatus::clear_completed |
( |
| ) |
|
|
inline |
Clears the 'completed
' attribute.
◆ clear_counter_updates()
void google_dataflow_api::WorkItemStatus::clear_counter_updates |
( |
| ) |
|
|
inline |
Clears the 'counterUpdates
' attribute.
◆ clear_dynamic_source_split()
void google_dataflow_api::WorkItemStatus::clear_dynamic_source_split |
( |
| ) |
|
|
inline |
Clears the 'dynamicSourceSplit
' attribute.
◆ clear_errors()
void google_dataflow_api::WorkItemStatus::clear_errors |
( |
| ) |
|
|
inline |
Clears the 'errors
' attribute.
◆ clear_metric_updates()
void google_dataflow_api::WorkItemStatus::clear_metric_updates |
( |
| ) |
|
|
inline |
Clears the 'metricUpdates
' attribute.
◆ clear_progress()
void google_dataflow_api::WorkItemStatus::clear_progress |
( |
| ) |
|
|
inline |
Clears the 'progress
' attribute.
◆ clear_report_index()
void google_dataflow_api::WorkItemStatus::clear_report_index |
( |
| ) |
|
|
inline |
Clears the 'reportIndex
' attribute.
◆ clear_reported_progress()
void google_dataflow_api::WorkItemStatus::clear_reported_progress |
( |
| ) |
|
|
inline |
Clears the 'reportedProgress
' attribute.
◆ clear_requested_lease_duration()
void google_dataflow_api::WorkItemStatus::clear_requested_lease_duration |
( |
| ) |
|
|
inline |
Clears the 'requestedLeaseDuration
' attribute.
◆ clear_source_fork()
void google_dataflow_api::WorkItemStatus::clear_source_fork |
( |
| ) |
|
|
inline |
Clears the 'sourceFork
' attribute.
◆ clear_source_operation_response()
void google_dataflow_api::WorkItemStatus::clear_source_operation_response |
( |
| ) |
|
|
inline |
Clears the 'sourceOperationResponse
' attribute.
◆ clear_stop_position()
void google_dataflow_api::WorkItemStatus::clear_stop_position |
( |
| ) |
|
|
inline |
Clears the 'stopPosition
' attribute.
◆ clear_total_throttler_wait_time_seconds()
void google_dataflow_api::WorkItemStatus::clear_total_throttler_wait_time_seconds |
( |
| ) |
|
|
inline |
Clears the 'totalThrottlerWaitTimeSeconds
' attribute.
◆ clear_work_item_id()
void google_dataflow_api::WorkItemStatus::clear_work_item_id |
( |
| ) |
|
|
inline |
Clears the 'workItemId
' attribute.
◆ get_completed()
bool google_dataflow_api::WorkItemStatus::get_completed |
( |
| ) |
const |
|
inline |
Get the value of the 'completed
' attribute.
◆ get_counter_updates()
const client::JsonCppArray<CounterUpdate > google_dataflow_api::WorkItemStatus::get_counter_updates |
( |
| ) |
const |
Get a reference to the value of the 'counterUpdates
' attribute.
◆ get_dynamic_source_split()
const DynamicSourceSplit google_dataflow_api::WorkItemStatus::get_dynamic_source_split |
( |
| ) |
const |
Get a reference to the value of the 'dynamicSourceSplit
' attribute.
◆ get_errors()
const client::JsonCppArray<Status > google_dataflow_api::WorkItemStatus::get_errors |
( |
| ) |
const |
Get a reference to the value of the 'errors
' attribute.
◆ get_metric_updates()
const client::JsonCppArray<MetricUpdate > google_dataflow_api::WorkItemStatus::get_metric_updates |
( |
| ) |
const |
Get a reference to the value of the 'metricUpdates
' attribute.
◆ get_progress()
Get a reference to the value of the 'progress
' attribute.
◆ get_report_index()
int64 google_dataflow_api::WorkItemStatus::get_report_index |
( |
| ) |
const |
|
inline |
Get the value of the 'reportIndex
' attribute.
◆ get_reported_progress()
Get a reference to the value of the 'reportedProgress
' attribute.
◆ get_requested_lease_duration()
const StringPiece google_dataflow_api::WorkItemStatus::get_requested_lease_duration |
( |
| ) |
const |
|
inline |
Get the value of the 'requestedLeaseDuration
' attribute.
◆ get_source_fork()
const SourceFork google_dataflow_api::WorkItemStatus::get_source_fork |
( |
| ) |
const |
Get a reference to the value of the 'sourceFork
' attribute.
◆ get_source_operation_response()
Get a reference to the value of the 'sourceOperationResponse
' attribute.
◆ get_stop_position()
const Position google_dataflow_api::WorkItemStatus::get_stop_position |
( |
| ) |
const |
Get a reference to the value of the 'stopPosition
' attribute.
◆ get_total_throttler_wait_time_seconds()
double google_dataflow_api::WorkItemStatus::get_total_throttler_wait_time_seconds |
( |
| ) |
const |
|
inline |
Get the value of the 'totalThrottlerWaitTimeSeconds
' attribute.
◆ get_work_item_id()
const StringPiece google_dataflow_api::WorkItemStatus::get_work_item_id |
( |
| ) |
const |
|
inline |
Get the value of the 'workItemId
' attribute.
◆ GetTypeName()
const StringPiece google_dataflow_api::WorkItemStatus::GetTypeName |
( |
| ) |
const |
|
inline |
◆ has_completed()
bool google_dataflow_api::WorkItemStatus::has_completed |
( |
| ) |
const |
|
inline |
Determine if the 'completed
' attribute was set.
- Returns
- true if the '
completed
' attribute was set.
◆ has_counter_updates()
bool google_dataflow_api::WorkItemStatus::has_counter_updates |
( |
| ) |
const |
|
inline |
Determine if the 'counterUpdates
' attribute was set.
- Returns
- true if the '
counterUpdates
' attribute was set.
◆ has_dynamic_source_split()
bool google_dataflow_api::WorkItemStatus::has_dynamic_source_split |
( |
| ) |
const |
|
inline |
Determine if the 'dynamicSourceSplit
' attribute was set.
- Returns
- true if the '
dynamicSourceSplit
' attribute was set.
◆ has_errors()
bool google_dataflow_api::WorkItemStatus::has_errors |
( |
| ) |
const |
|
inline |
Determine if the 'errors
' attribute was set.
- Returns
- true if the '
errors
' attribute was set.
◆ has_metric_updates()
bool google_dataflow_api::WorkItemStatus::has_metric_updates |
( |
| ) |
const |
|
inline |
Determine if the 'metricUpdates
' attribute was set.
- Returns
- true if the '
metricUpdates
' attribute was set.
◆ has_progress()
bool google_dataflow_api::WorkItemStatus::has_progress |
( |
| ) |
const |
|
inline |
Determine if the 'progress
' attribute was set.
- Returns
- true if the '
progress
' attribute was set.
◆ has_report_index()
bool google_dataflow_api::WorkItemStatus::has_report_index |
( |
| ) |
const |
|
inline |
Determine if the 'reportIndex
' attribute was set.
- Returns
- true if the '
reportIndex
' attribute was set.
◆ has_reported_progress()
bool google_dataflow_api::WorkItemStatus::has_reported_progress |
( |
| ) |
const |
|
inline |
Determine if the 'reportedProgress
' attribute was set.
- Returns
- true if the '
reportedProgress
' attribute was set.
◆ has_requested_lease_duration()
bool google_dataflow_api::WorkItemStatus::has_requested_lease_duration |
( |
| ) |
const |
|
inline |
Determine if the 'requestedLeaseDuration
' attribute was set.
- Returns
- true if the '
requestedLeaseDuration
' attribute was set.
◆ has_source_fork()
bool google_dataflow_api::WorkItemStatus::has_source_fork |
( |
| ) |
const |
|
inline |
Determine if the 'sourceFork
' attribute was set.
- Returns
- true if the '
sourceFork
' attribute was set.
◆ has_source_operation_response()
bool google_dataflow_api::WorkItemStatus::has_source_operation_response |
( |
| ) |
const |
|
inline |
Determine if the 'sourceOperationResponse
' attribute was set.
- Returns
- true if the '
sourceOperationResponse
' attribute was set.
◆ has_stop_position()
bool google_dataflow_api::WorkItemStatus::has_stop_position |
( |
| ) |
const |
|
inline |
Determine if the 'stopPosition
' attribute was set.
- Returns
- true if the '
stopPosition
' attribute was set.
◆ has_total_throttler_wait_time_seconds()
bool google_dataflow_api::WorkItemStatus::has_total_throttler_wait_time_seconds |
( |
| ) |
const |
|
inline |
Determine if the 'totalThrottlerWaitTimeSeconds
' attribute was set.
- Returns
- true if the '
totalThrottlerWaitTimeSeconds
' attribute was set.
◆ has_work_item_id()
bool google_dataflow_api::WorkItemStatus::has_work_item_id |
( |
| ) |
const |
|
inline |
Determine if the 'workItemId
' attribute was set.
- Returns
- true if the '
workItemId
' attribute was set.
◆ mutable_counterUpdates()
client::JsonCppArray<CounterUpdate > google_dataflow_api::WorkItemStatus::mutable_counterUpdates |
( |
| ) |
|
Gets a reference to a mutable value of the 'counterUpdates
' property.
Worker output counters for this WorkItem.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_dynamicSourceSplit()
Gets a reference to a mutable value of the 'dynamicSourceSplit
' property.
See documentation of stop_position.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_errors()
client::JsonCppArray<Status > google_dataflow_api::WorkItemStatus::mutable_errors |
( |
| ) |
|
Gets a reference to a mutable value of the 'errors
' property.
Specifies errors which occurred during processing. If errors are provided, and completed = true, then the WorkItem is considered to have failed.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_metricUpdates()
client::JsonCppArray<MetricUpdate > google_dataflow_api::WorkItemStatus::mutable_metricUpdates |
( |
| ) |
|
Gets a reference to a mutable value of the 'metricUpdates
' property.
- Deprecated:
DEPRECATED in favor of counter_updates.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_progress()
Gets a reference to a mutable value of the 'progress
' property.
- Deprecated:
DEPRECATED in favor of reported_progress.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_reportedProgress()
Gets a reference to a mutable value of the 'reportedProgress
' property.
The worker's progress through this WorkItem.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_sourceFork()
SourceFork google_dataflow_api::WorkItemStatus::mutable_sourceFork |
( |
| ) |
|
Gets a reference to a mutable value of the 'sourceFork
' property.
- Deprecated:
DEPRECATED in favor of dynamic_source_split.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_sourceOperationResponse()
Gets a reference to a mutable value of the 'sourceOperationResponse
' property.
If the work item represented a SourceOperationRequest, and the work is completed, contains the result of the operation.
- Returns
- The result can be modified to change the attribute value.
◆ mutable_stopPosition()
Position google_dataflow_api::WorkItemStatus::mutable_stopPosition |
( |
| ) |
|
Gets a reference to a mutable value of the 'stopPosition
' property.
A worker may split an active map task in two parts, "primary" and "residual", continuing to process the primary part and returning the residual part into the pool of available work. This event is called a "dynamic split" and is critical to the dynamic work rebalancing feature. The two obtained sub-tasks are called "parts" of the split. The parts, if concatenated, must represent the same input as would be read by the current task if the split did not happen. The exact way in which the original task is decomposed into the two parts is specified either as a position demarcating them (stop_position), or explicitly as two DerivedSources, if this task consumes a user-defined source type (dynamic_source_split).
The "current" task is adjusted as a result of the split: after a task with range [A, B) sends a stop_position update at C, its range is considered to be [A, C), e.g.:
- Progress should be interpreted relative to the new range, e.g. "75% completed" means "75% of [A, C) completed"
- The worker should interpret proposed_stop_position relative to the new range, e.g. "split at 68%" should be interpreted as "split at 68% of [A, C)".
- If the worker chooses to split again using stop_position, only stop_positions in [A, C) will be accepted.
- Etc. dynamic_source_split has similar semantics: e.g., if a task with source S splits using dynamic_source_split into {P, R} (where P and R must be together equivalent to S), then subsequent progress and proposed_stop_position should be interpreted relative to P, and in a potential subsequent dynamic_source_split into {P', R'}, P' and R' must be together equivalent to P, etc.
- Returns
- The result can be modified to change the attribute value.
◆ New()
Creates a new default instance.
- Returns
- Ownership is passed back to the caller.
◆ set_completed()
void google_dataflow_api::WorkItemStatus::set_completed |
( |
bool |
value | ) |
|
|
inline |
Change the 'completed
' attribute.
True if the WorkItem was completed (successfully or unsuccessfully).
- Parameters
-
◆ set_report_index()
void google_dataflow_api::WorkItemStatus::set_report_index |
( |
int64 |
value | ) |
|
|
inline |
Change the 'reportIndex
' attribute.
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.
- Parameters
-
◆ set_requested_lease_duration()
void google_dataflow_api::WorkItemStatus::set_requested_lease_duration |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'requestedLeaseDuration
' attribute.
Amount of time the worker requests for its lease.
- Parameters
-
◆ set_total_throttler_wait_time_seconds()
void google_dataflow_api::WorkItemStatus::set_total_throttler_wait_time_seconds |
( |
double |
value | ) |
|
|
inline |
Change the 'totalThrottlerWaitTimeSeconds
' attribute.
Total time the worker spent being throttled by external systems.
- Parameters
-
◆ set_work_item_id()
void google_dataflow_api::WorkItemStatus::set_work_item_id |
( |
const StringPiece & |
value | ) |
|
|
inline |
Change the 'workItemId
' attribute.
Identifies the WorkItem.
- Parameters
-
The documentation for this class was generated from the following files: