Class: Google::Apis::DataflowV1b3::WorkerLifecycleEvent

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

Overview

A report of an event in a worker's lifecycle. The proto contains one event, because the worker is expected to asynchronously send each message immediately after the event. Due to this asynchrony, messages may arrive out of order (or missing), and it is up to the consumer to interpret. The timestamp of the event is in the enclosing WorkerMessage proto.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WorkerLifecycleEvent

Returns a new instance of WorkerLifecycleEvent.



6254
6255
6256
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 6254

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

Instance Attribute Details

#container_start_timeString

The start time of this container. All events will report this so that events can be grouped together across container/VM restarts. Corresponds to the JSON property containerStartTime

Returns:

  • (String)


6242
6243
6244
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 6242

def container_start_time
  @container_start_time
end

#eventString

The event being reported. Corresponds to the JSON property event

Returns:

  • (String)


6247
6248
6249
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 6247

def event
  @event
end

#metadataHash<String,String>

Other stats that can accompany an event. E.g. "downloaded_bytes" : "123456" Corresponds to the JSON property metadata

Returns:

  • (Hash<String,String>)


6252
6253
6254
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 6252

def 
  @metadata
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6259
6260
6261
6262
6263
# File 'lib/google/apis/dataflow_v1b3/classes.rb', line 6259

def update!(**args)
  @container_start_time = args[:container_start_time] if args.key?(:container_start_time)
  @event = args[:event] if args.key?(:event)
  @metadata = args[:metadata] if args.key?(:metadata)
end