|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<java.lang.String,java.lang.Object>
backtype.storm.Config
public class Config
Topology configs are specified as a plain old map. This class provides a convenient way to create a topology config map by providing setter methods for all the configs that can be set. It also makes it easier to do things like add serializations.
This class also provides constants for all the configurations possible on a Storm cluster and Storm topology. Default values for these configs can be found in defaults.yaml.
Note that you may put other configurations in any of the configs. Storm will ignore anything it doesn't recognize, but your topologies are free to make use of them by reading them in the prepare method of Bolts or the open method of Spouts. .
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.AbstractMap |
---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
DEV_ZOOKEEPER_PATH
The path to use as the zookeeper dir when running a zookeeper server via "storm dev-zookeeper". |
static java.lang.String |
DRPC_INVOCATIONS_PORT
This port on Storm DRPC is used by DRPC topologies to receive function invocations and send results back. |
static java.lang.String |
DRPC_PORT
This port is used by Storm DRPC for receiving DPRC requests from clients. |
static java.lang.String |
DRPC_REQUEST_TIMEOUT_SECS
The timeout on DRPC requests within the DRPC server. |
static java.lang.String |
DRPC_SERVERS
List of DRPC servers so that the DRPCSpout knows who to talk to. |
static java.lang.String |
JAVA_LIBRARY_PATH
This value is passed to spawned JVMs (e.g., Nimbus, Supervisor, and Workers) for the java.library.path value. |
static java.lang.String |
NIMBUS_CHILDOPTS
This parameter is used by the storm-deploy project to configure the jvm options for the nimbus daemon. |
static java.lang.String |
NIMBUS_CLEANUP_INBOX_FREQ_SECS
How often nimbus should wake the cleanup thread to clean the inbox. |
static java.lang.String |
NIMBUS_FILE_COPY_EXPIRATION_SECS
During upload/download with the master, how long an upload or download connection is idle before nimbus considers it dead and drops the connection. |
static java.lang.String |
NIMBUS_HOST
The host that the master server is running on. |
static java.lang.String |
NIMBUS_INBOX_JAR_EXPIRATION_SECS
The length of time a jar file lives in the inbox before being deleted by the cleanup thread. |
static java.lang.String |
NIMBUS_MONITOR_FREQ_SECS
How often nimbus should wake up to check heartbeats and do reassignments. |
static java.lang.String |
NIMBUS_REASSIGN
Whether or not nimbus should reassign tasks if it detects that a task goes down. |
static java.lang.String |
NIMBUS_SUPERVISOR_TIMEOUT_SECS
How long before a supervisor can go without heartbeating before nimbus considers it dead and stops assigning new work to it. |
static java.lang.String |
NIMBUS_TASK_LAUNCH_SECS
A special timeout used when a task is initially launched. |
static java.lang.String |
NIMBUS_TASK_TIMEOUT_SECS
How long without heartbeating a task can go before nimbus will consider the task dead and reassign it to another location. |
static java.lang.String |
NIMBUS_THRIFT_PORT
Which port the Thrift interface of Nimbus should run on. |
static java.lang.String |
STORM_CLUSTER_MODE
The mode this Storm cluster is running in. |
static java.lang.String |
STORM_ID
The id assigned to a running topology. |
static java.lang.String |
STORM_LOCAL_DIR
A directory on the local filesystem used by Storm for any local filesystem usage it needs. |
static java.lang.String |
STORM_LOCAL_HOSTNAME
The hostname the supervisors/workers should report to nimbus. |
static java.lang.String |
STORM_LOCAL_MODE_ZMQ
Whether or not to use ZeroMQ for messaging in local mode. |
static java.lang.String |
STORM_SCHEDULER
A global task scheduler used to assign topologies's tasks to supervisors' wokers. |
static java.lang.String |
STORM_ZOOKEEPER_AUTH_PAYLOAD
A string representing the payload for Zookeeper authentication. |
static java.lang.String |
STORM_ZOOKEEPER_AUTH_SCHEME
The Zookeeper authentication scheme to use, e.g. |
static java.lang.String |
STORM_ZOOKEEPER_CONNECTION_TIMEOUT
The connection timeout for clients to ZooKeeper. |
static java.lang.String |
STORM_ZOOKEEPER_PORT
The port Storm will use to connect to each of the ZooKeeper servers. |
static java.lang.String |
STORM_ZOOKEEPER_RETRY_INTERVAL
The interval between retries of a Zookeeper operation. |
static java.lang.String |
STORM_ZOOKEEPER_RETRY_TIMES
The number of times to retry a Zookeeper operation. |
static java.lang.String |
STORM_ZOOKEEPER_ROOT
The root location at which Storm stores data in ZooKeeper. |
static java.lang.String |
STORM_ZOOKEEPER_SERVERS
A list of hosts of ZooKeeper servers used to manage the cluster. |
static java.lang.String |
STORM_ZOOKEEPER_SESSION_TIMEOUT
The session timeout for clients to ZooKeeper. |
static java.lang.String |
SUPERVISOR_CHILDOPTS
This parameter is used by the storm-deploy project to configure the jvm options for the supervisor daemon. |
static java.lang.String |
SUPERVISOR_ENABLE
Whether or not the supervisor should launch workers assigned to it. |
static java.lang.String |
SUPERVISOR_HEARTBEAT_FREQUENCY_SECS
how often the supervisor sends a heartbeat to the master. |
static java.lang.String |
SUPERVISOR_MONITOR_FREQUENCY_SECS
How often the supervisor checks the worker heartbeats to see if any of them need to be restarted. |
static java.lang.String |
SUPERVISOR_SCHEDULER_META
the metadata configed on the supervisor |
static java.lang.String |
SUPERVISOR_SLOTS_PORTS
A list of ports that can run workers on this supervisor. |
static java.lang.String |
SUPERVISOR_WORKER_START_TIMEOUT_SECS
How long a worker can go without heartbeating during the initial launch before the supervisor tries to restart the worker process. |
static java.lang.String |
SUPERVISOR_WORKER_TIMEOUT_SECS
How long a worker can go without heartbeating before the supervisor tries to restart the worker process. |
static java.lang.String |
TASK_HEARTBEAT_FREQUENCY_SECS
How often a task should heartbeat its status to the master. |
static java.lang.String |
TASK_REFRESH_POLL_SECS
How often a task should sync its connections with other tasks (if a task is reassigned, the other tasks sending messages to it need to refresh their connections). |
static java.lang.String |
TOPOLOGY_ACKER_EXECUTORS
How many executors to spawn for ackers. |
static java.lang.String |
TOPOLOGY_AUTO_TASK_HOOKS
A list of task hooks that are automatically added to every spout and bolt in the topology. |
static java.lang.String |
TOPOLOGY_DEBUG
When set to true, Storm will log every message that's emitted. |
static java.lang.String |
TOPOLOGY_DISRUPTOR_WAIT_STRATEGY
Configure the wait strategy used for internal queuing. |
static java.lang.String |
TOPOLOGY_ENABLE_MESSAGE_TIMEOUTS
True if Storm should timeout messages or not. |
static java.lang.String |
TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE
The size of the Disruptor receive queue for each executor. |
static java.lang.String |
TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE
The size of the Disruptor send queue for each executor. |
static java.lang.String |
TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION
Whether or not to use Java serialization in a topology. |
static java.lang.String |
TOPOLOGY_KRYO_DECORATORS
A list of classes that customize storm's kryo instance during start-up. |
static java.lang.String |
TOPOLOGY_KRYO_REGISTER
A list of serialization registrations for Kryo ( http://code.google.com/p/kryo/ ), the underlying serialization framework for Storm. |
static java.lang.String |
TOPOLOGY_MAX_SPOUT_PENDING
The maximum number of tuples that can be pending on a spout task at any given time. |
static java.lang.String |
TOPOLOGY_MAX_TASK_PARALLELISM
The maximum parallelism allowed for a component in this topology. |
static java.lang.String |
TOPOLOGY_MESSAGE_TIMEOUT_SECS
The maximum amount of time given to the topology to fully process a message emitted by a spout. |
static java.lang.String |
TOPOLOGY_NAME
Name of the topology. |
static java.lang.String |
TOPOLOGY_OPTIMIZE
Whether or not the master should optimize topologies by running multiple tasks in a single thread where appropriate. |
static java.lang.String |
TOPOLOGY_RECEIVER_BUFFER_SIZE
The maximum number of messages to batch from the thread receiving off the network to the executor queues. |
static java.lang.String |
TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS
Whether or not Storm should skip the loading of kryo registrations for which it does not know the class or have the serializer implementation. |
static java.lang.String |
TOPOLOGY_SLEEP_SPOUT_WAIT_STRATEGY_TIME_MS
The amount of milliseconds the SleepEmptyEmitStrategy should sleep for. |
static java.lang.String |
TOPOLOGY_SPOUT_WAIT_STRATEGY
A class that implements a strategy for what to do when a spout needs to wait. |
static java.lang.String |
TOPOLOGY_STATE_SYNCHRONIZATION_TIMEOUT_SECS
The maximum amount of time a component gives a source of state to synchronize before it requests synchronization again. |
static java.lang.String |
TOPOLOGY_STATS_SAMPLE_RATE
The percentage of tuples to sample to produce stats for a task. |
static java.lang.String |
TOPOLOGY_TASKS
How many instances to create for a spout/bolt. |
static java.lang.String |
TOPOLOGY_TICK_TUPLE_FREQ_SECS
How often a tick tuple from the "__system" component and "__tick" stream should be sent to tasks. |
static java.lang.String |
TOPOLOGY_TRANSACTIONAL_ID
This config is available for TransactionalSpouts, and contains the id ( a String) for the transactional topology. |
static java.lang.String |
TOPOLOGY_TRANSFER_BUFFER_SIZE
The size of the Disruptor transfer queue for each worker. |
static java.lang.String |
TOPOLOGY_WORKER_CHILDOPTS
Topology-specific options for the worker child process. |
static java.lang.String |
TOPOLOGY_WORKER_SHARED_THREAD_POOL_SIZE
The size of the shared thread pool for worker tasks to make use of. |
static java.lang.String |
TOPOLOGY_WORKERS
How many processes should be spawned around the cluster to execute this topology. |
static java.lang.String |
TRANSACTIONAL_ZOOKEEPER_PORT
The port to use to connect to the transactional zookeeper servers. |
static java.lang.String |
TRANSACTIONAL_ZOOKEEPER_ROOT
The root directory in ZooKeeper for metadata about TransactionalSpouts. |
static java.lang.String |
TRANSACTIONAL_ZOOKEEPER_SERVERS
The list of zookeeper servers in which to keep the transactional state. |
static java.lang.String |
UI_CHILDOPTS
Childopts for Storm UI Java process. |
static java.lang.String |
UI_PORT
Storm UI binds to this port. |
static java.lang.String |
WORKER_CHILDOPTS
The jvm opts provided to workers launched by this supervisor. |
static java.lang.String |
WORKER_HEARTBEAT_FREQUENCY_SECS
How often this worker should heartbeat to the supervisor. |
static java.lang.String |
ZMQ_LINGER_MILLIS
How long a connection should retry sending messages to a target host when the connection is closed. |
static java.lang.String |
ZMQ_THREADS
The number of threads that should be used by the zeromq context in each worker process. |
Constructor Summary | |
---|---|
Config()
|
Method Summary | |
---|---|
void |
registerDecorator(java.lang.Class<? extends IKryoDecorator> klass)
|
void |
registerSerialization(java.lang.Class klass)
|
void |
registerSerialization(java.lang.Class klass,
java.lang.Class<? extends Serializer> serializerClass)
|
void |
setDebug(boolean isOn)
|
void |
setFallBackOnJavaSerialization(boolean fallback)
|
void |
setMaxSpoutPending(int max)
|
void |
setMaxTaskParallelism(int max)
|
void |
setMessageTimeoutSecs(int secs)
|
void |
setNumAckers(int numExecutors)
|
void |
setNumWorkers(int workers)
|
void |
setOptimize(boolean isOn)
|
void |
setSkipMissingKryoRegistrations(boolean skip)
|
void |
setStatsSampleRate(double rate)
|
Methods inherited from class java.util.HashMap |
---|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
---|
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Field Detail |
---|
public static java.lang.String STORM_ZOOKEEPER_SERVERS
public static java.lang.String STORM_ZOOKEEPER_PORT
public static java.lang.String STORM_LOCAL_DIR
public static java.lang.String STORM_SCHEDULER
public static java.lang.String STORM_CLUSTER_MODE
public static java.lang.String STORM_LOCAL_HOSTNAME
InetAddress.getLocalHost().getCanonicalHostName()
.
You should set this config when you dont have a DNS which supervisors/workers
can utilize to find each other based on hostname got from calls to
InetAddress.getLocalHost().getCanonicalHostName()
.
public static java.lang.String STORM_LOCAL_MODE_ZMQ
public static java.lang.String STORM_ZOOKEEPER_ROOT
public static java.lang.String STORM_ZOOKEEPER_SESSION_TIMEOUT
public static java.lang.String STORM_ZOOKEEPER_CONNECTION_TIMEOUT
public static java.lang.String STORM_ZOOKEEPER_RETRY_TIMES
public static java.lang.String STORM_ZOOKEEPER_RETRY_INTERVAL
public static java.lang.String STORM_ZOOKEEPER_AUTH_SCHEME
public static java.lang.String STORM_ZOOKEEPER_AUTH_PAYLOAD
public static java.lang.String STORM_ID
public static java.lang.String NIMBUS_HOST
public static java.lang.String NIMBUS_THRIFT_PORT
public static java.lang.String NIMBUS_CHILDOPTS
public static java.lang.String NIMBUS_TASK_TIMEOUT_SECS
public static java.lang.String NIMBUS_MONITOR_FREQ_SECS
public static java.lang.String NIMBUS_CLEANUP_INBOX_FREQ_SECS
NIMBUS_INBOX_JAR_EXPIRATION_SECS
public static java.lang.String NIMBUS_INBOX_JAR_EXPIRATION_SECS
NIMBUS_CLEANUP_FREQ_SECS
public static java.lang.String NIMBUS_SUPERVISOR_TIMEOUT_SECS
public static java.lang.String NIMBUS_TASK_LAUNCH_SECS
A separate timeout exists for launch because there can be quite a bit of overhead to launching new JVM's and configuring them.
public static java.lang.String NIMBUS_REASSIGN
public static java.lang.String NIMBUS_FILE_COPY_EXPIRATION_SECS
public static java.lang.String UI_PORT
public static java.lang.String UI_CHILDOPTS
public static java.lang.String DRPC_SERVERS
public static java.lang.String DRPC_PORT
public static java.lang.String DRPC_INVOCATIONS_PORT
public static java.lang.String DRPC_REQUEST_TIMEOUT_SECS
public static java.lang.String SUPERVISOR_SCHEDULER_META
public static java.lang.String SUPERVISOR_SLOTS_PORTS
public static java.lang.String SUPERVISOR_CHILDOPTS
public static java.lang.String SUPERVISOR_WORKER_TIMEOUT_SECS
public static java.lang.String SUPERVISOR_WORKER_START_TIMEOUT_SECS
public static java.lang.String SUPERVISOR_ENABLE
public static java.lang.String SUPERVISOR_HEARTBEAT_FREQUENCY_SECS
public static java.lang.String SUPERVISOR_MONITOR_FREQUENCY_SECS
public static java.lang.String WORKER_CHILDOPTS
public static java.lang.String WORKER_HEARTBEAT_FREQUENCY_SECS
public static java.lang.String TASK_HEARTBEAT_FREQUENCY_SECS
public static java.lang.String TASK_REFRESH_POLL_SECS
public static java.lang.String TOPOLOGY_ENABLE_MESSAGE_TIMEOUTS
public static java.lang.String TOPOLOGY_DEBUG
public static java.lang.String TOPOLOGY_OPTIMIZE
public static java.lang.String TOPOLOGY_WORKERS
public static java.lang.String TOPOLOGY_TASKS
public static java.lang.String TOPOLOGY_ACKER_EXECUTORS
If this is set to 0, then Storm will immediately ack tuples as soon as they come off the spout, effectively disabling reliability.
public static java.lang.String TOPOLOGY_MESSAGE_TIMEOUT_SECS
public static java.lang.String TOPOLOGY_KRYO_REGISTER
public static java.lang.String TOPOLOGY_KRYO_DECORATORS
public static java.lang.String TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS
public static java.lang.String TOPOLOGY_MAX_TASK_PARALLELISM
public static java.lang.String TOPOLOGY_MAX_SPOUT_PENDING
public static java.lang.String TOPOLOGY_SPOUT_WAIT_STRATEGY
public static java.lang.String TOPOLOGY_SLEEP_SPOUT_WAIT_STRATEGY_TIME_MS
public static java.lang.String TOPOLOGY_STATE_SYNCHRONIZATION_TIMEOUT_SECS
public static java.lang.String TOPOLOGY_STATS_SAMPLE_RATE
public static java.lang.String TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION
public static java.lang.String TOPOLOGY_WORKER_CHILDOPTS
public static java.lang.String TOPOLOGY_TRANSACTIONAL_ID
public static java.lang.String TOPOLOGY_AUTO_TASK_HOOKS
public static java.lang.String TOPOLOGY_EXECUTOR_RECEIVE_BUFFER_SIZE
public static java.lang.String TOPOLOGY_RECEIVER_BUFFER_SIZE
public static java.lang.String TOPOLOGY_EXECUTOR_SEND_BUFFER_SIZE
public static java.lang.String TOPOLOGY_TRANSFER_BUFFER_SIZE
public static java.lang.String TOPOLOGY_TICK_TUPLE_FREQ_SECS
public static java.lang.String TOPOLOGY_DISRUPTOR_WAIT_STRATEGY
public static java.lang.String TOPOLOGY_WORKER_SHARED_THREAD_POOL_SIZE
public static java.lang.String TOPOLOGY_NAME
public static java.lang.String TRANSACTIONAL_ZOOKEEPER_ROOT
public static java.lang.String TRANSACTIONAL_ZOOKEEPER_SERVERS
public static java.lang.String TRANSACTIONAL_ZOOKEEPER_PORT
public static java.lang.String ZMQ_THREADS
public static java.lang.String ZMQ_LINGER_MILLIS
public static java.lang.String JAVA_LIBRARY_PATH
public static java.lang.String DEV_ZOOKEEPER_PATH
Constructor Detail |
---|
public Config()
Method Detail |
---|
public void setDebug(boolean isOn)
public void setOptimize(boolean isOn)
public void setNumWorkers(int workers)
public void setNumAckers(int numExecutors)
public void setMessageTimeoutSecs(int secs)
public void registerSerialization(java.lang.Class klass)
public void registerSerialization(java.lang.Class klass, java.lang.Class<? extends Serializer> serializerClass)
public void registerDecorator(java.lang.Class<? extends IKryoDecorator> klass)
public void setSkipMissingKryoRegistrations(boolean skip)
public void setMaxTaskParallelism(int max)
public void setMaxSpoutPending(int max)
public void setStatsSampleRate(double rate)
public void setFallBackOnJavaSerialization(boolean fallback)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |