public final class TaskGroup extends com.google.protobuf.GeneratedMessageV3 implements TaskGroupOrBuilder
A TaskGroup defines one or more Tasks that all share the same TaskSpec.Protobuf type
google.cloud.batch.v1.TaskGroup| Modifier and Type | Class and Description |
|---|---|
static class |
TaskGroup.Builder
A TaskGroup defines one or more Tasks that all share the same TaskSpec.
|
static class |
TaskGroup.SchedulingPolicy
How Tasks in the TaskGroup should be scheduled relative to each other.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
NAME_FIELD_NUMBER |
static int |
PARALLELISM_FIELD_NUMBER |
static int |
PERMISSIVE_SSH_FIELD_NUMBER |
static int |
REQUIRE_HOSTS_FILE_FIELD_NUMBER |
static int |
RUN_AS_NON_ROOT_FIELD_NUMBER |
static int |
SCHEDULING_POLICY_FIELD_NUMBER |
static int |
TASK_COUNT_FIELD_NUMBER |
static int |
TASK_COUNT_PER_NODE_FIELD_NUMBER |
static int |
TASK_ENVIRONMENTS_FIELD_NUMBER |
static int |
TASK_SPEC_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
static TaskGroup |
getDefaultInstance() |
TaskGroup |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
String |
getName()
Output only.
|
com.google.protobuf.ByteString |
getNameBytes()
Output only.
|
long |
getParallelism()
Max number of tasks that can run in parallel.
|
com.google.protobuf.Parser<TaskGroup> |
getParserForType() |
boolean |
getPermissiveSsh()
When true, Batch will configure SSH to allow passwordless login between
VMs running the Batch tasks in the same TaskGroup.
|
boolean |
getRequireHostsFile()
When true, Batch will populate a file with a list of all VMs assigned to
the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path
of that file.
|
boolean |
getRunAsNonRoot()
Optional.
|
TaskGroup.SchedulingPolicy |
getSchedulingPolicy()
Scheduling policy for Tasks in the TaskGroup.
|
int |
getSchedulingPolicyValue()
Scheduling policy for Tasks in the TaskGroup.
|
int |
getSerializedSize() |
long |
getTaskCount()
Number of Tasks in the TaskGroup.
|
long |
getTaskCountPerNode()
Max number of tasks that can be run on a VM at the same time.
|
Environment |
getTaskEnvironments(int index)
An array of environment variable mappings, which are passed to Tasks with
matching indices.
|
int |
getTaskEnvironmentsCount()
An array of environment variable mappings, which are passed to Tasks with
matching indices.
|
List<Environment> |
getTaskEnvironmentsList()
An array of environment variable mappings, which are passed to Tasks with
matching indices.
|
EnvironmentOrBuilder |
getTaskEnvironmentsOrBuilder(int index)
An array of environment variable mappings, which are passed to Tasks with
matching indices.
|
List<? extends EnvironmentOrBuilder> |
getTaskEnvironmentsOrBuilderList()
An array of environment variable mappings, which are passed to Tasks with
matching indices.
|
TaskSpec |
getTaskSpec()
Required.
|
TaskSpecOrBuilder |
getTaskSpecOrBuilder()
Required.
|
int |
hashCode() |
boolean |
hasTaskSpec()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static TaskGroup.Builder |
newBuilder() |
static TaskGroup.Builder |
newBuilder(TaskGroup prototype) |
TaskGroup.Builder |
newBuilderForType() |
protected TaskGroup.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static TaskGroup |
parseDelimitedFrom(InputStream input) |
static TaskGroup |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskGroup |
parseFrom(byte[] data) |
static TaskGroup |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskGroup |
parseFrom(ByteBuffer data) |
static TaskGroup |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskGroup |
parseFrom(com.google.protobuf.ByteString data) |
static TaskGroup |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskGroup |
parseFrom(com.google.protobuf.CodedInputStream input) |
static TaskGroup |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static TaskGroup |
parseFrom(InputStream input) |
static TaskGroup |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<TaskGroup> |
parser() |
TaskGroup.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int NAME_FIELD_NUMBER
public static final int TASK_SPEC_FIELD_NUMBER
public static final int TASK_COUNT_FIELD_NUMBER
public static final int PARALLELISM_FIELD_NUMBER
public static final int SCHEDULING_POLICY_FIELD_NUMBER
public static final int TASK_ENVIRONMENTS_FIELD_NUMBER
public static final int TASK_COUNT_PER_NODE_FIELD_NUMBER
public static final int REQUIRE_HOSTS_FILE_FIELD_NUMBER
public static final int PERMISSIVE_SSH_FIELD_NUMBER
public static final int RUN_AS_NON_ROOT_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String getName()
Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getName in interface TaskGroupOrBuilderpublic com.google.protobuf.ByteString getNameBytes()
Output only. TaskGroup name. The system generates this field based on parent Job name. For example: "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01".
string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getNameBytes in interface TaskGroupOrBuilderpublic boolean hasTaskSpec()
Required. Tasks in the group share the same task spec.
.google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
hasTaskSpec in interface TaskGroupOrBuilderpublic TaskSpec getTaskSpec()
Required. Tasks in the group share the same task spec.
.google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
getTaskSpec in interface TaskGroupOrBuilderpublic TaskSpecOrBuilder getTaskSpecOrBuilder()
Required. Tasks in the group share the same task spec.
.google.cloud.batch.v1.TaskSpec task_spec = 3 [(.google.api.field_behavior) = REQUIRED];
getTaskSpecOrBuilder in interface TaskGroupOrBuilderpublic long getTaskCount()
Number of Tasks in the TaskGroup. Default is 1.
int64 task_count = 4;getTaskCount in interface TaskGroupOrBuilderpublic long getParallelism()
Max number of tasks that can run in parallel. Default to min(task_count, parallel tasks per job limit). See: [Job Limits](https://cloud.google.com/batch/quotas#job_limits). Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
int64 parallelism = 5;getParallelism in interface TaskGroupOrBuilderpublic int getSchedulingPolicyValue()
Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.
.google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;getSchedulingPolicyValue in interface TaskGroupOrBuilderpublic TaskGroup.SchedulingPolicy getSchedulingPolicy()
Scheduling policy for Tasks in the TaskGroup. The default value is AS_SOON_AS_POSSIBLE.
.google.cloud.batch.v1.TaskGroup.SchedulingPolicy scheduling_policy = 6;getSchedulingPolicy in interface TaskGroupOrBuilderpublic List<Environment> getTaskEnvironmentsList()
An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
repeated .google.cloud.batch.v1.Environment task_environments = 9;getTaskEnvironmentsList in interface TaskGroupOrBuilderpublic List<? extends EnvironmentOrBuilder> getTaskEnvironmentsOrBuilderList()
An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
repeated .google.cloud.batch.v1.Environment task_environments = 9;getTaskEnvironmentsOrBuilderList in interface TaskGroupOrBuilderpublic int getTaskEnvironmentsCount()
An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
repeated .google.cloud.batch.v1.Environment task_environments = 9;getTaskEnvironmentsCount in interface TaskGroupOrBuilderpublic Environment getTaskEnvironments(int index)
An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
repeated .google.cloud.batch.v1.Environment task_environments = 9;getTaskEnvironments in interface TaskGroupOrBuilderpublic EnvironmentOrBuilder getTaskEnvironmentsOrBuilder(int index)
An array of environment variable mappings, which are passed to Tasks with matching indices. If task_environments is used then task_count should not be specified in the request (and will be ignored). Task count will be the length of task_environments. Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT environment variable, in addition to any environment variables set in task_environments, specifying the number of Tasks in the Task's parent TaskGroup, and the specific Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - 1).
repeated .google.cloud.batch.v1.Environment task_environments = 9;getTaskEnvironmentsOrBuilder in interface TaskGroupOrBuilderpublic long getTaskCountPerNode()
Max number of tasks that can be run on a VM at the same time. If not specified, the system will decide a value based on available compute resources on a VM and task requirements.
int64 task_count_per_node = 10;getTaskCountPerNode in interface TaskGroupOrBuilderpublic boolean getRequireHostsFile()
When true, Batch will populate a file with a list of all VMs assigned to the TaskGroup and set the BATCH_HOSTS_FILE environment variable to the path of that file. Defaults to false. The host file supports up to 1000 VMs.
bool require_hosts_file = 11;getRequireHostsFile in interface TaskGroupOrBuilderpublic boolean getPermissiveSsh()
When true, Batch will configure SSH to allow passwordless login between VMs running the Batch tasks in the same TaskGroup.
bool permissive_ssh = 12;getPermissiveSsh in interface TaskGroupOrBuilderpublic boolean getRunAsNonRoot()
Optional. If not set or set to false, Batch uses the root user to execute runnables. If set to true, Batch runs the runnables using a non-root user. Currently, the non-root user Batch used is generated by OS Login. For more information, see [About OS Login](https://cloud.google.com/compute/docs/oslogin).
bool run_as_non_root = 14 [(.google.api.field_behavior) = OPTIONAL];getRunAsNonRoot in interface TaskGroupOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static TaskGroup parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TaskGroup parseFrom(InputStream input) throws IOException
IOExceptionpublic static TaskGroup parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TaskGroup parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static TaskGroup parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TaskGroup parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static TaskGroup parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic TaskGroup.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static TaskGroup.Builder newBuilder()
public static TaskGroup.Builder newBuilder(TaskGroup prototype)
public TaskGroup.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected TaskGroup.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static TaskGroup getDefaultInstance()
public static com.google.protobuf.Parser<TaskGroup> parser()
public com.google.protobuf.Parser<TaskGroup> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public TaskGroup getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2025 Google LLC. All rights reserved.