Package com.google.cloud.batch.v1
Class TaskGroup
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.batch.v1.TaskGroup
-
- All Implemented Interfaces:
TaskGroupOrBuilder
,com.google.protobuf.Message
,com.google.protobuf.MessageLite
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Serializable
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 typegoogle.cloud.batch.v1.TaskGroup
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
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
-
-
Field Summary
Fields Modifier and Type Field 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
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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.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(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 TaskGroup
parseFrom(ByteBuffer data)
static TaskGroup
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<TaskGroup>
parser()
TaskGroup.Builder
toBuilder()
void
writeTo(com.google.protobuf.CodedOutputStream output)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
NAME_FIELD_NUMBER
public static final int NAME_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TASK_SPEC_FIELD_NUMBER
public static final int TASK_SPEC_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TASK_COUNT_FIELD_NUMBER
public static final int TASK_COUNT_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PARALLELISM_FIELD_NUMBER
public static final int PARALLELISM_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SCHEDULING_POLICY_FIELD_NUMBER
public static final int SCHEDULING_POLICY_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TASK_ENVIRONMENTS_FIELD_NUMBER
public static final int TASK_ENVIRONMENTS_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TASK_COUNT_PER_NODE_FIELD_NUMBER
public static final int TASK_COUNT_PER_NODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
REQUIRE_HOSTS_FILE_FIELD_NUMBER
public static final int REQUIRE_HOSTS_FILE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
PERMISSIVE_SSH_FIELD_NUMBER
public static final int PERMISSIVE_SSH_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3
-
getName
public 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];
- Specified by:
getName
in interfaceTaskGroupOrBuilder
- Returns:
- The name.
-
getNameBytes
public 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];
- Specified by:
getNameBytes
in interfaceTaskGroupOrBuilder
- Returns:
- The bytes for name.
-
hasTaskSpec
public 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];
- Specified by:
hasTaskSpec
in interfaceTaskGroupOrBuilder
- Returns:
- Whether the taskSpec field is set.
-
getTaskSpec
public 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];
- Specified by:
getTaskSpec
in interfaceTaskGroupOrBuilder
- Returns:
- The taskSpec.
-
getTaskSpecOrBuilder
public 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];
- Specified by:
getTaskSpecOrBuilder
in interfaceTaskGroupOrBuilder
-
getTaskCount
public long getTaskCount()
Number of Tasks in the TaskGroup. Default is 1.
int64 task_count = 4;
- Specified by:
getTaskCount
in interfaceTaskGroupOrBuilder
- Returns:
- The taskCount.
-
getParallelism
public long getParallelism()
Max number of tasks that can run in parallel. Default to min(task_count, 1000). Field parallelism must be 1 if the scheduling_policy is IN_ORDER.
int64 parallelism = 5;
- Specified by:
getParallelism
in interfaceTaskGroupOrBuilder
- Returns:
- The parallelism.
-
getSchedulingPolicyValue
public 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;
- Specified by:
getSchedulingPolicyValue
in interfaceTaskGroupOrBuilder
- Returns:
- The enum numeric value on the wire for schedulingPolicy.
-
getSchedulingPolicy
public 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;
- Specified by:
getSchedulingPolicy
in interfaceTaskGroupOrBuilder
- Returns:
- The schedulingPolicy.
-
getTaskEnvironmentsList
public 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;
- Specified by:
getTaskEnvironmentsList
in interfaceTaskGroupOrBuilder
-
getTaskEnvironmentsOrBuilderList
public 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;
- Specified by:
getTaskEnvironmentsOrBuilderList
in interfaceTaskGroupOrBuilder
-
getTaskEnvironmentsCount
public 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;
- Specified by:
getTaskEnvironmentsCount
in interfaceTaskGroupOrBuilder
-
getTaskEnvironments
public 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;
- Specified by:
getTaskEnvironments
in interfaceTaskGroupOrBuilder
-
getTaskEnvironmentsOrBuilder
public 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;
- Specified by:
getTaskEnvironmentsOrBuilder
in interfaceTaskGroupOrBuilder
-
getTaskCountPerNode
public 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;
- Specified by:
getTaskCountPerNode
in interfaceTaskGroupOrBuilder
- Returns:
- The taskCountPerNode.
-
getRequireHostsFile
public 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.
bool require_hosts_file = 11;
- Specified by:
getRequireHostsFile
in interfaceTaskGroupOrBuilder
- Returns:
- The requireHostsFile.
-
getPermissiveSsh
public 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;
- Specified by:
getPermissiveSsh
in interfaceTaskGroupOrBuilder
- Returns:
- The permissiveSsh.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TaskGroup parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TaskGroup parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskGroup parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TaskGroup parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TaskGroup parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskGroup parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TaskGroup parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public TaskGroup.Builder newBuilderForType()
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TaskGroup.Builder newBuilder()
-
newBuilder
public static TaskGroup.Builder newBuilder(TaskGroup prototype)
-
toBuilder
public TaskGroup.Builder toBuilder()
- Specified by:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TaskGroup.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TaskGroup getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TaskGroup> parser()
-
getParserForType
public com.google.protobuf.Parser<TaskGroup> getParserForType()
- Specified by:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TaskGroup getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-