dataflow  v1b3
Public Member Functions | Static Public Member Functions | List of all members
google_dataflow_api::WorkItemStatus Class Reference

#include <work_item_status.h>

Inheritance diagram for google_dataflow_api::WorkItemStatus:

Public Member Functions

 WorkItemStatus (const Json::Value &storage)
 
 WorkItemStatus (Json::Value *storage)
 
virtual ~WorkItemStatus ()
 
const StringPiece GetTypeName () const
 
bool has_completed () const
 
void clear_completed ()
 
bool get_completed () const
 
void set_completed (bool value)
 
bool has_counter_updates () const
 
void clear_counter_updates ()
 
const client::JsonCppArray< CounterUpdateget_counter_updates () const
 
client::JsonCppArray< CounterUpdatemutable_counterUpdates ()
 
bool has_dynamic_source_split () const
 
void clear_dynamic_source_split ()
 
const DynamicSourceSplit get_dynamic_source_split () const
 
DynamicSourceSplit mutable_dynamicSourceSplit ()
 
bool has_errors () const
 
void clear_errors ()
 
const client::JsonCppArray< Statusget_errors () const
 
client::JsonCppArray< Statusmutable_errors ()
 
bool has_metric_updates () const
 
void clear_metric_updates ()
 
const client::JsonCppArray< MetricUpdateget_metric_updates () const
 
client::JsonCppArray< MetricUpdatemutable_metricUpdates ()
 
bool has_progress () const
 
void clear_progress ()
 
const ApproximateProgress get_progress () const
 
ApproximateProgress mutable_progress ()
 
bool has_report_index () const
 
void clear_report_index ()
 
int64 get_report_index () const
 
void set_report_index (int64 value)
 
bool has_reported_progress () const
 
void clear_reported_progress ()
 
const ApproximateReportedProgress get_reported_progress () const
 
ApproximateReportedProgress mutable_reportedProgress ()
 
bool has_requested_lease_duration () const
 
void clear_requested_lease_duration ()
 
const StringPiece get_requested_lease_duration () const
 
void set_requested_lease_duration (const StringPiece &value)
 
bool has_source_fork () const
 
void clear_source_fork ()
 
const SourceFork get_source_fork () const
 
SourceFork mutable_sourceFork ()
 
bool has_source_operation_response () const
 
void clear_source_operation_response ()
 
const SourceOperationResponse get_source_operation_response () const
 
SourceOperationResponse mutable_sourceOperationResponse ()
 
bool has_stop_position () const
 
void clear_stop_position ()
 
const Position get_stop_position () const
 
Position mutable_stopPosition ()
 
bool has_total_throttler_wait_time_seconds () const
 
void clear_total_throttler_wait_time_seconds ()
 
double get_total_throttler_wait_time_seconds () const
 
void set_total_throttler_wait_time_seconds (double value)
 
bool has_work_item_id () const
 
void clear_work_item_id ()
 
const StringPiece get_work_item_id () const
 
void set_work_item_id (const StringPiece &value)
 

Static Public Member Functions

static WorkItemStatusNew ()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ WorkItemStatus() [1/2]

google_dataflow_api::WorkItemStatus::WorkItemStatus ( const Json::Value &  storage)
explicit

Standard constructor for an immutable data object instance.

Parameters
[in]storageThe 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]storageThe underlying data storage for this instance.

◆ ~WorkItemStatus()

google_dataflow_api::WorkItemStatus::~WorkItemStatus ( )
virtual

Standard destructor.

Member Function Documentation

◆ 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()

const ApproximateProgress google_dataflow_api::WorkItemStatus::get_progress ( ) const

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()

const ApproximateReportedProgress google_dataflow_api::WorkItemStatus::get_reported_progress ( ) const

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()

const SourceOperationResponse google_dataflow_api::WorkItemStatus::get_source_operation_response ( ) const

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

Returns a string denoting the type of this data object.

Returns
google_dataflow_api::WorkItemStatus

◆ 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()

DynamicSourceSplit google_dataflow_api::WorkItemStatus::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()

ApproximateProgress google_dataflow_api::WorkItemStatus::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()

ApproximateReportedProgress google_dataflow_api::WorkItemStatus::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()

SourceOperationResponse google_dataflow_api::WorkItemStatus::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()

WorkItemStatus * google_dataflow_api::WorkItemStatus::New ( )
static

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
[in]valueThe new value.

◆ 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
[in]valueThe new value.

◆ 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
[in]valueThe new value.

◆ 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
[in]valueThe new value.

◆ 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
[in]valueThe new value.

The documentation for this class was generated from the following files: