Class ServiceConfig.DispatcherConfig
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
org.tensorflow.proto.data.experimental.ServiceConfig.DispatcherConfig
- All Implemented Interfaces:
Message, MessageLite, MessageLiteOrBuilder, MessageOrBuilder, Serializable, ServiceConfig.DispatcherConfigOrBuilder
- Enclosing class:
ServiceConfig
public static final class ServiceConfig.DispatcherConfig
extends GeneratedMessageV3
implements ServiceConfig.DispatcherConfigOrBuilder
Configuration for a tf.data service DispatchServer. Next id: 13Protobuf type
tensorflow.data.experimental.DispatcherConfig- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfiguration for a tf.data service DispatchServer.Nested classes/interfaces inherited from class GeneratedMessageV3
GeneratedMessageV3.BuilderParent, GeneratedMessageV3.ExtendableBuilder<MessageType, BuilderType>, GeneratedMessageV3.ExtendableMessage<MessageType>, GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType>, GeneratedMessageV3.FieldAccessorTable, GeneratedMessageV3.UnusedPrivateParameterNested classes/interfaces inherited from class AbstractMessageLite
AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class GeneratedMessageV3
alwaysUseFieldBuilders, unknownFieldsFields inherited from class AbstractMessage
memoizedSizeFields inherited from class AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanlongHow long to wait before garbage-collecting a client that hasn't heartbeated to the dispatcher.(Optional.) tf.data service deployment mode.int(Optional.) tf.data service deployment mode.static final Descriptors.DescriptorbooleanWhether to run in fault tolerant mode, where dispatcher state is saved across restarts.booleanWhether dynamically sharded jobs should be eligible for garbage collection.longHow often the dispatcher should scan through to delete old and unused jobs.longHow long a job needs to be unused before it becomes a candidate for garbage collection.longgetPort()The port for the dispatcher to bind to.The protocol for the dispatcher to use when connecting to workers.The protocol for the dispatcher to use when connecting to workers.intfinal UnknownFieldSetA work directory to use for storing dispatcher state, and for recovering during restarts.A work directory to use for storing dispatcher state, and for recovering during restarts.getWorkerAddresses(int index) (Optional.)getWorkerAddressesBytes(int index) (Optional.)int(Optional.)(Optional.)longThe maximum number of snapshots that a worker can concurrently process at a given point in time.longHow long to wait for a worker to heartbeat before considering it missing.inthashCode()protected GeneratedMessageV3.FieldAccessorTablefinal booleannewBuilder(ServiceConfig.DispatcherConfig prototype) protected ServiceConfig.DispatcherConfig.Builderprotected ObjectparseDelimitedFrom(InputStream input) parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) parseFrom(byte[] data) parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) parseFrom(ByteString data) parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) parseFrom(CodedInputStream input) parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) parseFrom(InputStream input) parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) parseFrom(ByteBuffer data) parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) static Parser<ServiceConfig.DispatcherConfig> parser()voidwriteTo(CodedOutputStream output) Methods inherited from class GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTagMethods inherited from class AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringMethods inherited from class AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
-
Field Details
-
PORT_FIELD_NUMBER
public static final int PORT_FIELD_NUMBER- See Also:
-
PROTOCOL_FIELD_NUMBER
public static final int PROTOCOL_FIELD_NUMBER- See Also:
-
WORK_DIR_FIELD_NUMBER
public static final int WORK_DIR_FIELD_NUMBER- See Also:
-
FAULT_TOLERANT_MODE_FIELD_NUMBER
public static final int FAULT_TOLERANT_MODE_FIELD_NUMBER- See Also:
-
WORKER_ADDRESSES_FIELD_NUMBER
public static final int WORKER_ADDRESSES_FIELD_NUMBER- See Also:
-
DEPLOYMENT_MODE_FIELD_NUMBER
public static final int DEPLOYMENT_MODE_FIELD_NUMBER- See Also:
-
JOB_GC_CHECK_INTERVAL_MS_FIELD_NUMBER
public static final int JOB_GC_CHECK_INTERVAL_MS_FIELD_NUMBER- See Also:
-
JOB_GC_TIMEOUT_MS_FIELD_NUMBER
public static final int JOB_GC_TIMEOUT_MS_FIELD_NUMBER- See Also:
-
GC_DYNAMIC_SHARDING_JOBS_FIELD_NUMBER
public static final int GC_DYNAMIC_SHARDING_JOBS_FIELD_NUMBER- See Also:
-
CLIENT_TIMEOUT_MS_FIELD_NUMBER
public static final int CLIENT_TIMEOUT_MS_FIELD_NUMBER- See Also:
-
WORKER_TIMEOUT_MS_FIELD_NUMBER
public static final int WORKER_TIMEOUT_MS_FIELD_NUMBER- See Also:
-
WORKER_MAX_CONCURRENT_SNAPSHOTS_FIELD_NUMBER
public static final int WORKER_MAX_CONCURRENT_SNAPSHOTS_FIELD_NUMBER- See Also:
-
-
Method Details
-
newInstance
- Overrides:
newInstancein classGeneratedMessageV3
-
getUnknownFields
- Specified by:
getUnknownFieldsin interfaceMessageOrBuilder- Overrides:
getUnknownFieldsin classGeneratedMessageV3
-
getDescriptor
-
internalGetFieldAccessorTable
- Specified by:
internalGetFieldAccessorTablein classGeneratedMessageV3
-
getPort
public long getPort()The port for the dispatcher to bind to. A value of 0 indicates that the dispatcher may bind to any available port.
int64 port = 1;- Specified by:
getPortin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The port.
-
getProtocol
The protocol for the dispatcher to use when connecting to workers.
string protocol = 2;- Specified by:
getProtocolin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The protocol.
-
getProtocolBytes
The protocol for the dispatcher to use when connecting to workers.
string protocol = 2;- Specified by:
getProtocolBytesin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The bytes for protocol.
-
getWorkDir
A work directory to use for storing dispatcher state, and for recovering during restarts. The empty string indicates not to use any work directory.
string work_dir = 3;- Specified by:
getWorkDirin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The workDir.
-
getWorkDirBytes
A work directory to use for storing dispatcher state, and for recovering during restarts. The empty string indicates not to use any work directory.
string work_dir = 3;- Specified by:
getWorkDirBytesin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The bytes for workDir.
-
getFaultTolerantMode
public boolean getFaultTolerantMode()Whether to run in fault tolerant mode, where dispatcher state is saved across restarts. Requires that `work_dir` is nonempty.
bool fault_tolerant_mode = 4;- Specified by:
getFaultTolerantModein interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The faultTolerantMode.
-
getWorkerAddressesList
(Optional.) If the job uses auto-sharding, it needs to specify a fixed list of worker addresses that will register with the dispatcher. The worker addresses should be in the format "host" or "host:port", where "port" is an integer, named port, or %port% to match any port.
repeated string worker_addresses = 7;- Specified by:
getWorkerAddressesListin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- A list containing the workerAddresses.
-
getWorkerAddressesCount
public int getWorkerAddressesCount()(Optional.) If the job uses auto-sharding, it needs to specify a fixed list of worker addresses that will register with the dispatcher. The worker addresses should be in the format "host" or "host:port", where "port" is an integer, named port, or %port% to match any port.
repeated string worker_addresses = 7;- Specified by:
getWorkerAddressesCountin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The count of workerAddresses.
-
getWorkerAddresses
(Optional.) If the job uses auto-sharding, it needs to specify a fixed list of worker addresses that will register with the dispatcher. The worker addresses should be in the format "host" or "host:port", where "port" is an integer, named port, or %port% to match any port.
repeated string worker_addresses = 7;- Specified by:
getWorkerAddressesin interfaceServiceConfig.DispatcherConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The workerAddresses at the given index.
-
getWorkerAddressesBytes
(Optional.) If the job uses auto-sharding, it needs to specify a fixed list of worker addresses that will register with the dispatcher. The worker addresses should be in the format "host" or "host:port", where "port" is an integer, named port, or %port% to match any port.
repeated string worker_addresses = 7;- Specified by:
getWorkerAddressesBytesin interfaceServiceConfig.DispatcherConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the workerAddresses at the given index.
-
getDeploymentModeValue
public int getDeploymentModeValue()(Optional.) tf.data service deployment mode. Supported values are "REMOTE", "COLOCATED", and "HYBRID". If unspecified, it is assumed to be "REMOTE".
.tensorflow.data.DeploymentMode deployment_mode = 9;- Specified by:
getDeploymentModeValuein interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The enum numeric value on the wire for deploymentMode.
-
getDeploymentMode
(Optional.) tf.data service deployment mode. Supported values are "REMOTE", "COLOCATED", and "HYBRID". If unspecified, it is assumed to be "REMOTE".
.tensorflow.data.DeploymentMode deployment_mode = 9;- Specified by:
getDeploymentModein interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The deploymentMode.
-
getJobGcCheckIntervalMs
public long getJobGcCheckIntervalMs()How often the dispatcher should scan through to delete old and unused jobs. A value of 0 indicates that the decision should be left up to the runtime.
int64 job_gc_check_interval_ms = 5;- Specified by:
getJobGcCheckIntervalMsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The jobGcCheckIntervalMs.
-
getJobGcTimeoutMs
public long getJobGcTimeoutMs()How long a job needs to be unused before it becomes a candidate for garbage collection. A value of -1 indicates that jobs should never be garbage collected. A value of 0 indicates that the decision should be left up to the runtime. Note: This does not apply to dynamic sharding unless users explicitly opt-in by enabling `gc_dynamic_sharding_jobs` below.
int64 job_gc_timeout_ms = 6;- Specified by:
getJobGcTimeoutMsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The jobGcTimeoutMs.
-
getGcDynamicShardingJobs
public boolean getGcDynamicShardingJobs()Whether dynamically sharded jobs should be eligible for garbage collection. These jobs are not garbage collected by default, since if a job is garbage collected and then re-created, it will revisit all data from the start. If revisiting data is acceptible and you want automatic reclamation of iterator memory, set `gc_dynamic_sharding_jobs` to `true`.
bool gc_dynamic_sharding_jobs = 11;- Specified by:
getGcDynamicShardingJobsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The gcDynamicShardingJobs.
-
getClientTimeoutMs
public long getClientTimeoutMs()How long to wait before garbage-collecting a client that hasn't heartbeated to the dispatcher. A value of 0 indicates that the timeout should be left to the runtime.
int64 client_timeout_ms = 8;- Specified by:
getClientTimeoutMsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The clientTimeoutMs.
-
getWorkerTimeoutMs
public long getWorkerTimeoutMs()How long to wait for a worker to heartbeat before considering it missing. A value of 0 indicates that the timeout should be left to the runtime.
int64 worker_timeout_ms = 10;- Specified by:
getWorkerTimeoutMsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The workerTimeoutMs.
-
getWorkerMaxConcurrentSnapshots
public long getWorkerMaxConcurrentSnapshots()The maximum number of snapshots that a worker can concurrently process at a given point in time. This is a tradeoff between worker resource usage and snapshot wall time. A value of 0 indicates that the decision should be left up to the runtime.
int64 worker_max_concurrent_snapshots = 12;- Specified by:
getWorkerMaxConcurrentSnapshotsin interfaceServiceConfig.DispatcherConfigOrBuilder- Returns:
- The workerMaxConcurrentSnapshots.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfaceMessageLiteOrBuilder- Overrides:
isInitializedin classGeneratedMessageV3
-
writeTo
- Specified by:
writeToin interfaceMessageLite- Overrides:
writeToin classGeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfaceMessageLite- Overrides:
getSerializedSizein classGeneratedMessageV3
-
equals
- Specified by:
equalsin interfaceMessage- Overrides:
equalsin classAbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceMessage- Overrides:
hashCodein classAbstractMessage
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(ByteBuffer data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(ByteString data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(byte[] data) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException - Throws:
InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static ServiceConfig.DispatcherConfig parseDelimitedFrom(InputStream input) throws IOException - Throws:
IOException
-
parseDelimitedFrom
public static ServiceConfig.DispatcherConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static ServiceConfig.DispatcherConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfaceMessage- Specified by:
newBuilderForTypein interfaceMessageLite
-
newBuilder
-
newBuilder
public static ServiceConfig.DispatcherConfig.Builder newBuilder(ServiceConfig.DispatcherConfig prototype) -
toBuilder
- Specified by:
toBuilderin interfaceMessage- Specified by:
toBuilderin interfaceMessageLite
-
newBuilderForType
protected ServiceConfig.DispatcherConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent) - Specified by:
newBuilderForTypein classGeneratedMessageV3
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfaceMessage- Specified by:
getParserForTypein interfaceMessageLite- Overrides:
getParserForTypein classGeneratedMessageV3
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfaceMessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfaceMessageOrBuilder
-