Reference documentation and code samples for the Google Cloud Dataflow V1beta3 Client class WorkerPool.
Describes one particular pool of Cloud Dataflow workers to be instantiated by the Cloud Dataflow service in order to perform the computations required by a job. Note that a workflow job may use multiple pools, in order to match the various computational requirements of the various stages of the job.
Generated from protobuf message google.dataflow.v1beta3.WorkerPool
Namespace
Google \ Cloud \ Dataflow \ V1beta3Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ kind
string
The kind of the worker pool; currently only harness
and shuffle
are supported.
↳ num_workers
int
Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default.
↳ packages
↳ default_package_set
int
The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language.
↳ machine_type
string
Machine type (e.g. "n1-standard-1"). If empty or unspecified, the service will attempt to choose a reasonable default.
↳ teardown_policy
int
Sets the policy for determining when to turndown worker pool. Allowed values are: TEARDOWN_ALWAYS
, TEARDOWN_ON_SUCCESS
, and TEARDOWN_NEVER
. TEARDOWN_ALWAYS
means workers are always torn down regardless of whether the job succeeds. TEARDOWN_ON_SUCCESS
means workers are torn down if the job succeeds. TEARDOWN_NEVER
means the workers are never torn down. If the workers are not torn down by the service, they will continue to run and use Google Compute Engine VM resources in the user's project until they are explicitly terminated by the user. Because of this, Google recommends using the TEARDOWN_ALWAYS
policy except for small, manually supervised test jobs. If unknown or unspecified, the service will attempt to choose a reasonable default.
↳ disk_size_gb
int
Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default.
↳ disk_type
string
Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default.
↳ disk_source_image
string
Fully qualified source image for disks.
↳ zone
string
Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default.
↳ taskrunner_settings
Google\Cloud\Dataflow\V1beta3\TaskRunnerSettings
Settings passed through to Google Compute Engine workers when using the standard Dataflow task runner. Users should ignore this field.
↳ on_host_maintenance
string
The action to take on host maintenance, as defined by the Google Compute Engine API.
↳ data_disks
↳ metadata
↳ autoscaling_settings
↳ pool_args
↳ network
string
Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
↳ subnetwork
string
Subnetwork to which VMs will be assigned, if desired. Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK".
↳ worker_harness_container_image
string
Required. Docker container image that executes the Cloud Dataflow worker harness, residing in Google Container Registry. Deprecated for the Fn API path. Use sdk_harness_container_images instead.
↳ num_threads_per_worker
int
The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming).
↳ ip_configuration
int
Configuration for VM IPs.
↳ sdk_harness_container_images
array< Google\Cloud\Dataflow\V1beta3\SdkHarnessContainerImage
>
Set of SDK harness containers needed to execute this pipeline. This will only be set in the Fn API path. For non-cross-language pipelines this should have only one entry. Cross-language pipelines will have two or more entries.
getKind
The kind of the worker pool; currently only harness
and shuffle
are supported.
string
setKind
The kind of the worker pool; currently only harness
and shuffle
are supported.
var
string
$this
getNumWorkers
Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default.
int
setNumWorkers
Number of Google Compute Engine workers in this pool needed to execute the job. If zero or unspecified, the service will attempt to choose a reasonable default.
var
int
$this
getPackages
Packages to be installed on workers.
setPackages
Packages to be installed on workers.
$this
getDefaultPackageSet
The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language.
int
setDefaultPackageSet
The default package set to install. This allows the service to select a default set of packages which are useful to worker harnesses written in a particular language.
var
int
$this
getMachineType
Machine type (e.g. "n1-standard-1"). If empty or unspecified, the service will attempt to choose a reasonable default.
string
setMachineType
Machine type (e.g. "n1-standard-1"). If empty or unspecified, the service will attempt to choose a reasonable default.
var
string
$this
getTeardownPolicy
Sets the policy for determining when to turndown worker pool.
Allowed values are: TEARDOWN_ALWAYS
, TEARDOWN_ON_SUCCESS
, and TEARDOWN_NEVER
. TEARDOWN_ALWAYS
means workers are always torn down regardless of whether
the job succeeds. TEARDOWN_ON_SUCCESS
means workers are torn down
if the job succeeds. TEARDOWN_NEVER
means the workers are never torn
down.
If the workers are not torn down by the service, they will
continue to run and use Google Compute Engine VM resources in the
user's project until they are explicitly terminated by the user.
Because of this, Google recommends using the TEARDOWN_ALWAYS
policy except for small, manually supervised test jobs.
If unknown or unspecified, the service will attempt to choose a reasonable
default.
int
setTeardownPolicy
Sets the policy for determining when to turndown worker pool.
Allowed values are: TEARDOWN_ALWAYS
, TEARDOWN_ON_SUCCESS
, and TEARDOWN_NEVER
. TEARDOWN_ALWAYS
means workers are always torn down regardless of whether
the job succeeds. TEARDOWN_ON_SUCCESS
means workers are torn down
if the job succeeds. TEARDOWN_NEVER
means the workers are never torn
down.
If the workers are not torn down by the service, they will
continue to run and use Google Compute Engine VM resources in the
user's project until they are explicitly terminated by the user.
Because of this, Google recommends using the TEARDOWN_ALWAYS
policy except for small, manually supervised test jobs.
If unknown or unspecified, the service will attempt to choose a reasonable
default.
var
int
$this
getDiskSizeGb
Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default.
int
setDiskSizeGb
Size of root disk for VMs, in GB. If zero or unspecified, the service will attempt to choose a reasonable default.
var
int
$this
getDiskType
Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default.
string
setDiskType
Type of root disk for VMs. If empty or unspecified, the service will attempt to choose a reasonable default.
var
string
$this
getDiskSourceImage
Fully qualified source image for disks.
string
setDiskSourceImage
Fully qualified source image for disks.
var
string
$this
getZone
Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default.
string
setZone
Zone to run the worker pools in. If empty or unspecified, the service will attempt to choose a reasonable default.
var
string
$this
getTaskrunnerSettings
Settings passed through to Google Compute Engine workers when using the standard Dataflow task runner. Users should ignore this field.
hasTaskrunnerSettings
clearTaskrunnerSettings
setTaskrunnerSettings
Settings passed through to Google Compute Engine workers when using the standard Dataflow task runner. Users should ignore this field.
$this
getOnHostMaintenance
The action to take on host maintenance, as defined by the Google Compute Engine API.
string
setOnHostMaintenance
The action to take on host maintenance, as defined by the Google Compute Engine API.
var
string
$this
getDataDisks
Data disks that are used by a VM in this workflow.
setDataDisks
Data disks that are used by a VM in this workflow.
$this
getMetadata
Metadata to set on the Google Compute Engine VMs.
setMetadata
Metadata to set on the Google Compute Engine VMs.
$this
getAutoscalingSettings
Settings for autoscaling of this WorkerPool.
hasAutoscalingSettings
clearAutoscalingSettings
setAutoscalingSettings
Settings for autoscaling of this WorkerPool.
$this
getPoolArgs
Extra arguments for this worker pool.
hasPoolArgs
clearPoolArgs
setPoolArgs
Extra arguments for this worker pool.
$this
getNetwork
Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
string
setNetwork
Network to which VMs will be assigned. If empty or unspecified, the service will use the network "default".
var
string
$this
getSubnetwork
Subnetwork to which VMs will be assigned, if desired. Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK".
string
setSubnetwork
Subnetwork to which VMs will be assigned, if desired. Expected to be of the form "regions/REGION/subnetworks/SUBNETWORK".
var
string
$this
getWorkerHarnessContainerImage
Required. Docker container image that executes the Cloud Dataflow worker harness, residing in Google Container Registry.
Deprecated for the Fn API path. Use sdk_harness_container_images instead.
string
setWorkerHarnessContainerImage
Required. Docker container image that executes the Cloud Dataflow worker harness, residing in Google Container Registry.
Deprecated for the Fn API path. Use sdk_harness_container_images instead.
var
string
$this
getNumThreadsPerWorker
The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming).
int
setNumThreadsPerWorker
The number of threads per worker harness. If empty or unspecified, the service will choose a number of threads (according to the number of cores on the selected machine type for batch, or 1 by convention for streaming).
var
int
$this
getIpConfiguration
Configuration for VM IPs.
int
setIpConfiguration
Configuration for VM IPs.
var
int
$this
getSdkHarnessContainerImages
Set of SDK harness containers needed to execute this pipeline. This will only be set in the Fn API path. For non-cross-language pipelines this should have only one entry. Cross-language pipelines will have two or more entries.
setSdkHarnessContainerImages
Set of SDK harness containers needed to execute this pipeline. This will only be set in the Fn API path. For non-cross-language pipelines this should have only one entry. Cross-language pipelines will have two or more entries.
$this