public final class TaskSpec extends GeneratedMessageV3 implements TaskSpecOrBuilder
Spec of a task
Protobuf type google.cloud.batch.v1alpha.TaskSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
COMPUTE_RESOURCE_FIELD_NUMBER
public static final int COMPUTE_RESOURCE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ENVIRONMENTS_FIELD_NUMBER
public static final int ENVIRONMENTS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ENVIRONMENT_FIELD_NUMBER
public static final int ENVIRONMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LIFECYCLE_POLICIES_FIELD_NUMBER
public static final int LIFECYCLE_POLICIES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MAX_RETRY_COUNT_FIELD_NUMBER
public static final int MAX_RETRY_COUNT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
MAX_RUN_DURATION_FIELD_NUMBER
public static final int MAX_RUN_DURATION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
RUNNABLES_FIELD_NUMBER
public static final int RUNNABLES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
VOLUMES_FIELD_NUMBER
public static final int VOLUMES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static TaskSpec getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static TaskSpec.Builder newBuilder()
newBuilder(TaskSpec prototype)
public static TaskSpec.Builder newBuilder(TaskSpec prototype)
Parameter |
Name |
Description |
prototype |
TaskSpec
|
public static TaskSpec parseDelimitedFrom(InputStream input)
public static TaskSpec parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static TaskSpec parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static TaskSpec parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static TaskSpec parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TaskSpec parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TaskSpec parseFrom(CodedInputStream input)
public static TaskSpec parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static TaskSpec parseFrom(InputStream input)
public static TaskSpec parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static TaskSpec parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static TaskSpec parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<TaskSpec> parser()
Methods
containsEnvironments(String key) (deprecated)
public boolean containsEnvironments(String key)
Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getComputeResource()
public ComputeResource getComputeResource()
ComputeResource requirements.
.google.cloud.batch.v1alpha.ComputeResource compute_resource = 3;
getComputeResourceOrBuilder()
public ComputeResourceOrBuilder getComputeResourceOrBuilder()
ComputeResource requirements.
.google.cloud.batch.v1alpha.ComputeResource compute_resource = 3;
getDefaultInstanceForType()
public TaskSpec getDefaultInstanceForType()
getEnvironment()
public Environment getEnvironment()
Environment variables to set before running the Task.
.google.cloud.batch.v1alpha.Environment environment = 10;
getEnvironmentOrBuilder()
public EnvironmentOrBuilder getEnvironmentOrBuilder()
Environment variables to set before running the Task.
.google.cloud.batch.v1alpha.Environment environment = 10;
getEnvironments() (deprecated)
public Map<String,String> getEnvironments()
getEnvironmentsCount() (deprecated)
public int getEnvironmentsCount()
Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];
Returns |
Type |
Description |
int |
|
getEnvironmentsMap() (deprecated)
public Map<String,String> getEnvironmentsMap()
Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];
getEnvironmentsOrDefault(String key, String defaultValue) (deprecated)
public String getEnvironmentsOrDefault(String key, String defaultValue)
Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];
Returns |
Type |
Description |
String |
|
getEnvironmentsOrThrow(String key) (deprecated)
public String getEnvironmentsOrThrow(String key)
Deprecated: please use environment(non-plural) instead.
map<string, string> environments = 6 [deprecated = true];
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getLifecyclePolicies(int index)
public LifecyclePolicy getLifecyclePolicies(int index)
Lifecycle management schema when any task in a task group is failed.
Currently we only support one lifecycle policy.
When the lifecycle policy condition is met,
the action in the policy will execute.
If task execution result does not meet with the defined lifecycle
policy, we consider it as the default policy.
Default policy means if the exit code is 0, exit task.
If task ends with non-zero exit code, retry the task with max_retry_count.
repeated .google.cloud.batch.v1alpha.LifecyclePolicy lifecycle_policies = 9;
Parameter |
Name |
Description |
index |
int
|
getLifecyclePoliciesCount()
public int getLifecyclePoliciesCount()
Lifecycle management schema when any task in a task group is failed.
Currently we only support one lifecycle policy.
When the lifecycle policy condition is met,
the action in the policy will execute.
If task execution result does not meet with the defined lifecycle
policy, we consider it as the default policy.
Default policy means if the exit code is 0, exit task.
If task ends with non-zero exit code, retry the task with max_retry_count.
repeated .google.cloud.batch.v1alpha.LifecyclePolicy lifecycle_policies = 9;
Returns |
Type |
Description |
int |
|
getLifecyclePoliciesList()
public List<LifecyclePolicy> getLifecyclePoliciesList()
Lifecycle management schema when any task in a task group is failed.
Currently we only support one lifecycle policy.
When the lifecycle policy condition is met,
the action in the policy will execute.
If task execution result does not meet with the defined lifecycle
policy, we consider it as the default policy.
Default policy means if the exit code is 0, exit task.
If task ends with non-zero exit code, retry the task with max_retry_count.
repeated .google.cloud.batch.v1alpha.LifecyclePolicy lifecycle_policies = 9;
getLifecyclePoliciesOrBuilder(int index)
public LifecyclePolicyOrBuilder getLifecyclePoliciesOrBuilder(int index)
Lifecycle management schema when any task in a task group is failed.
Currently we only support one lifecycle policy.
When the lifecycle policy condition is met,
the action in the policy will execute.
If task execution result does not meet with the defined lifecycle
policy, we consider it as the default policy.
Default policy means if the exit code is 0, exit task.
If task ends with non-zero exit code, retry the task with max_retry_count.
repeated .google.cloud.batch.v1alpha.LifecyclePolicy lifecycle_policies = 9;
Parameter |
Name |
Description |
index |
int
|
getLifecyclePoliciesOrBuilderList()
public List<? extends LifecyclePolicyOrBuilder> getLifecyclePoliciesOrBuilderList()
Lifecycle management schema when any task in a task group is failed.
Currently we only support one lifecycle policy.
When the lifecycle policy condition is met,
the action in the policy will execute.
If task execution result does not meet with the defined lifecycle
policy, we consider it as the default policy.
Default policy means if the exit code is 0, exit task.
If task ends with non-zero exit code, retry the task with max_retry_count.
repeated .google.cloud.batch.v1alpha.LifecyclePolicy lifecycle_policies = 9;
Returns |
Type |
Description |
List<? extends com.google.cloud.batch.v1alpha.LifecyclePolicyOrBuilder> |
|
getMaxRetryCount()
public int getMaxRetryCount()
Maximum number of retries on failures.
The default, 0, which means never retry.
The valid value range is [0, 10].
int32 max_retry_count = 5;
Returns |
Type |
Description |
int |
The maxRetryCount.
|
getMaxRunDuration()
public Duration getMaxRunDuration()
Returns |
Type |
Description |
Duration |
The maxRunDuration.
|
getMaxRunDurationOrBuilder()
public DurationOrBuilder getMaxRunDurationOrBuilder()
getParserForType()
public Parser<TaskSpec> getParserForType()
Overrides
getRunnables(int index)
public Runnable getRunnables(int index)
Required. The sequence of one or more runnables (executable scripts,
executable containers, and/or barriers) for each task in this task group to
run. Each task runs this list of runnables in order. For a task to succeed,
all of its script and container runnables each must meet at least one of
the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield.
- The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
repeated .google.cloud.batch.v1alpha.Runnable runnables = 8;
Parameter |
Name |
Description |
index |
int
|
getRunnablesCount()
public int getRunnablesCount()
Required. The sequence of one or more runnables (executable scripts,
executable containers, and/or barriers) for each task in this task group to
run. Each task runs this list of runnables in order. For a task to succeed,
all of its script and container runnables each must meet at least one of
the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield.
- The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
repeated .google.cloud.batch.v1alpha.Runnable runnables = 8;
Returns |
Type |
Description |
int |
|
getRunnablesList()
public List<Runnable> getRunnablesList()
Required. The sequence of one or more runnables (executable scripts,
executable containers, and/or barriers) for each task in this task group to
run. Each task runs this list of runnables in order. For a task to succeed,
all of its script and container runnables each must meet at least one of
the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield.
- The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
repeated .google.cloud.batch.v1alpha.Runnable runnables = 8;
getRunnablesOrBuilder(int index)
public RunnableOrBuilder getRunnablesOrBuilder(int index)
Required. The sequence of one or more runnables (executable scripts,
executable containers, and/or barriers) for each task in this task group to
run. Each task runs this list of runnables in order. For a task to succeed,
all of its script and container runnables each must meet at least one of
the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield.
- The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
repeated .google.cloud.batch.v1alpha.Runnable runnables = 8;
Parameter |
Name |
Description |
index |
int
|
getRunnablesOrBuilderList()
public List<? extends RunnableOrBuilder> getRunnablesOrBuilderList()
Required. The sequence of one or more runnables (executable scripts,
executable containers, and/or barriers) for each task in this task group to
run. Each task runs this list of runnables in order. For a task to succeed,
all of its script and container runnables each must meet at least one of
the following conditions:
- The runnable exited with a zero status.
- The runnable didn't finish, but you enabled its
background
subfield.
- The runnable exited with a non-zero status, but you enabled its
ignore_exit_status
subfield.
repeated .google.cloud.batch.v1alpha.Runnable runnables = 8;
Returns |
Type |
Description |
List<? extends com.google.cloud.batch.v1alpha.RunnableOrBuilder> |
|
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getVolumes(int index)
public Volume getVolumes(int index)
Volumes to mount before running Tasks using this TaskSpec.
repeated .google.cloud.batch.v1alpha.Volume volumes = 7;
Parameter |
Name |
Description |
index |
int
|
Returns |
Type |
Description |
Volume |
|
getVolumesCount()
public int getVolumesCount()
Volumes to mount before running Tasks using this TaskSpec.
repeated .google.cloud.batch.v1alpha.Volume volumes = 7;
Returns |
Type |
Description |
int |
|
getVolumesList()
public List<Volume> getVolumesList()
Volumes to mount before running Tasks using this TaskSpec.
repeated .google.cloud.batch.v1alpha.Volume volumes = 7;
getVolumesOrBuilder(int index)
public VolumeOrBuilder getVolumesOrBuilder(int index)
Volumes to mount before running Tasks using this TaskSpec.
repeated .google.cloud.batch.v1alpha.Volume volumes = 7;
Parameter |
Name |
Description |
index |
int
|
getVolumesOrBuilderList()
public List<? extends VolumeOrBuilder> getVolumesOrBuilderList()
Volumes to mount before running Tasks using this TaskSpec.
repeated .google.cloud.batch.v1alpha.Volume volumes = 7;
Returns |
Type |
Description |
List<? extends com.google.cloud.batch.v1alpha.VolumeOrBuilder> |
|
hasComputeResource()
public boolean hasComputeResource()
ComputeResource requirements.
.google.cloud.batch.v1alpha.ComputeResource compute_resource = 3;
Returns |
Type |
Description |
boolean |
Whether the computeResource field is set.
|
hasEnvironment()
public boolean hasEnvironment()
Environment variables to set before running the Task.
.google.cloud.batch.v1alpha.Environment environment = 10;
Returns |
Type |
Description |
boolean |
Whether the environment field is set.
|
hasMaxRunDuration()
public boolean hasMaxRunDuration()
Returns |
Type |
Description |
boolean |
Whether the maxRunDuration field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public TaskSpec.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected TaskSpec.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public TaskSpec.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides