public final class Runnable extends GeneratedMessageV3 implements RunnableOrBuilder
Runnable describes instructions for executing a specific script or container
as part of a Task.
Protobuf type google.cloud.batch.v1alpha.Runnable
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
ALWAYS_RUN_FIELD_NUMBER
public static final int ALWAYS_RUN_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
BACKGROUND_FIELD_NUMBER
public static final int BACKGROUND_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
BARRIER_FIELD_NUMBER
public static final int BARRIER_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
CONTAINER_FIELD_NUMBER
public static final int CONTAINER_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
DISPLAY_NAME_FIELD_NUMBER
public static final int DISPLAY_NAME_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
ENVIRONMENT_FIELD_NUMBER
public static final int ENVIRONMENT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
IGNORE_EXIT_STATUS_FIELD_NUMBER
public static final int IGNORE_EXIT_STATUS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SCRIPT_FIELD_NUMBER
public static final int SCRIPT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
TIMEOUT_FIELD_NUMBER
public static final int TIMEOUT_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static Runnable getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static Runnable.Builder newBuilder()
newBuilder(Runnable prototype)
public static Runnable.Builder newBuilder(Runnable prototype)
Parameter |
Name |
Description |
prototype |
Runnable
|
public static Runnable parseDelimitedFrom(InputStream input)
public static Runnable parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static Runnable parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static Runnable parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static Runnable parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Runnable parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static Runnable parseFrom(CodedInputStream input)
public static Runnable parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static Runnable parseFrom(InputStream input)
public static Runnable parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static Runnable parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static Runnable parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<Runnable> parser()
Methods
containsLabels(String key)
public boolean containsLabels(String key)
Labels for this Runnable.
map<string, string> labels = 9;
Parameter |
Name |
Description |
key |
String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAlwaysRun()
public boolean getAlwaysRun()
By default, after a Runnable fails, no further Runnable are executed. This
flag indicates that this Runnable must be run even if the Task has already
failed. This is useful for Runnables that copy output files off of the VM
or for debugging.
The always_run flag does not override the Task's overall max_run_duration.
If the max_run_duration has expired then no further Runnables will execute,
not even always_run Runnables.
bool always_run = 5;
Returns |
Type |
Description |
boolean |
The alwaysRun.
|
getBackground()
public boolean getBackground()
Normally, a runnable that doesn't exit causes its task to fail. However,
you can set this field to true
to configure a background runnable.
Background runnables are allowed continue running in the background while
the task executes subsequent runnables. For example, background runnables
are useful for providing services to other runnables or providing
debugging-support tools like SSH servers.
Specifically, background runnables are killed automatically (if they have
not already exited) a short time after all foreground runnables have
completed. Even though this is likely to result in a non-zero exit status
for the background runnable, these automatic kills are not treated as task
failures.
bool background = 4;
Returns |
Type |
Description |
boolean |
The background.
|
getBarrier()
public Runnable.Barrier getBarrier()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
getBarrierOrBuilder()
public Runnable.BarrierOrBuilder getBarrierOrBuilder()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
getContainer()
public Runnable.Container getContainer()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;
getContainerOrBuilder()
public Runnable.ContainerOrBuilder getContainerOrBuilder()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;
getDefaultInstanceForType()
public Runnable getDefaultInstanceForType()
getDisplayName()
public String getDisplayName()
Optional. DisplayName is an optional field that can be provided by the
caller. If provided, it will be used in logs and other outputs to identify
the script, making it easier for users to understand the logs. If not
provided the index of the runnable will be used for outputs.
string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
String |
The displayName.
|
getDisplayNameBytes()
public ByteString getDisplayNameBytes()
Optional. DisplayName is an optional field that can be provided by the
caller. If provided, it will be used in logs and other outputs to identify
the script, making it easier for users to understand the logs. If not
provided the index of the runnable will be used for outputs.
string display_name = 10 [(.google.api.field_behavior) = OPTIONAL];
Returns |
Type |
Description |
ByteString |
The bytes for displayName.
|
getEnvironment()
public Environment getEnvironment()
Environment variables for this Runnable (overrides variables set for the
whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;
getEnvironmentOrBuilder()
public EnvironmentOrBuilder getEnvironmentOrBuilder()
Environment variables for this Runnable (overrides variables set for the
whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;
getExecutableCase()
public Runnable.ExecutableCase getExecutableCase()
getIgnoreExitStatus()
public boolean getIgnoreExitStatus()
Normally, a runnable that returns a non-zero exit status fails and causes
the task to fail. However, you can set this field to true
to allow the
task to continue executing its other runnables even if this runnable
fails.
bool ignore_exit_status = 3;
Returns |
Type |
Description |
boolean |
The ignoreExitStatus.
|
getLabels() (deprecated)
public Map<String,String> getLabels()
getLabelsCount()
public int getLabelsCount()
Labels for this Runnable.
map<string, string> labels = 9;
Returns |
Type |
Description |
int |
|
getLabelsMap()
public Map<String,String> getLabelsMap()
Labels for this Runnable.
map<string, string> labels = 9;
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
Labels for this Runnable.
map<string, string> labels = 9;
Returns |
Type |
Description |
String |
|
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
Labels for this Runnable.
map<string, string> labels = 9;
Parameter |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
String |
|
getParserForType()
public Parser<Runnable> getParserForType()
Overrides
getScript()
public Runnable.Script getScript()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;
getScriptOrBuilder()
public Runnable.ScriptOrBuilder getScriptOrBuilder()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getTimeout()
public Duration getTimeout()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;
Returns |
Type |
Description |
Duration |
The timeout.
|
getTimeoutOrBuilder()
public DurationOrBuilder getTimeoutOrBuilder()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;
hasBarrier()
public boolean hasBarrier()
Barrier runnable.
.google.cloud.batch.v1alpha.Runnable.Barrier barrier = 6;
Returns |
Type |
Description |
boolean |
Whether the barrier field is set.
|
hasContainer()
public boolean hasContainer()
Container runnable.
.google.cloud.batch.v1alpha.Runnable.Container container = 1;
Returns |
Type |
Description |
boolean |
Whether the container field is set.
|
hasEnvironment()
public boolean hasEnvironment()
Environment variables for this Runnable (overrides variables set for the
whole Task or TaskGroup).
.google.cloud.batch.v1alpha.Environment environment = 7;
Returns |
Type |
Description |
boolean |
Whether the environment field is set.
|
hasScript()
public boolean hasScript()
Script runnable.
.google.cloud.batch.v1alpha.Runnable.Script script = 2;
Returns |
Type |
Description |
boolean |
Whether the script field is set.
|
hasTimeout()
public boolean hasTimeout()
Timeout for this Runnable.
.google.protobuf.Duration timeout = 8;
Returns |
Type |
Description |
boolean |
Whether the timeout 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 Runnable.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected Runnable.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public Runnable.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides