storm官方文档----配置文件说明

来源:互联网 发布:centos nginx rtmp 编辑:程序博客网 时间:2024/04/29 07:19

源地址:http://storm.apache.org/documentation/Configuration.html

 

storm由丰富的configure选项, 用来调整nibus、supervisor、以及运行时topologies的行为。某些配置选项是系统配置,例如topology基础配置,修改某个topology的这些选项有可能影响到所有topologies,而某些选项只是涉及到每个topology自身的配置,这就可以根据需要修改了。

 

每个配置选项在Storm代码库中的defaults.yaml文件中都有它的默认值。你可以通过定义Nimbus和supervisor的classpath下storm.yaml文件进行覆盖默认配置。最后, 可以定义topology-specific配置,这样你就可以使用StormSubmitter类提交topology时一块提交这个配置文件。然而, topology-specific配置仅能覆盖前缀为“TOPOLOGY”的配置选项。

 

从Storm 0.7.0开始,你可以覆盖每一个bolt或者每个spout自己特有的配置选项。这些配置如下所示:

         1、"topology.debug"

         2、"topology.max.spout.pending"

         3、"topology.max.task.parallelism"

         4、"topology.kryo.register":这个选项和其他选项的作用方式有点不同, 因为序列对topology中的所有组件都是可用的。 更多信息可以查看序列化。

 

Java API 允许你使用两种方式制定组件的特定配置选项:

         1、 内部方式: 在任何spout或者bolt中覆盖getComponentConfiguration,然后返回component-specific配置映射。

         2、 外部方式: TopologyBuilder类中setSpout方法和setBolt方法会返回带有addConfiguration以及addConfigurations方法的对象,这个对象可以用来覆盖组件的配置选项。

 

配置选项值的推荐顺序是: defaults.yaml < storm.yaml < topology specific configuration <internal component specific configuration < external component specificconfiguration

 资料:

  Config:所有配置选项的列表, 也是创建特定topology配置的帮助类

  defaults.yaml:所有配置的默认值

  配置storm集群:说明了如何创建和配置storm集群

  在生产集群上运行topologies:列出对运行集群上topologies有用的配置

  本地模式:列出对使用本地模式有用的配置



下面为defaults.yaml内容:

# Licensed to the Apache Software Foundation (ASF) under one# or more contributor license agreements.  See the NOTICE file# distributed with this work for additional information# regarding copyright ownership.  The ASF licenses this file# to you under the Apache License, Version 2.0 (the# "License"); you may not use this file except in compliance# with the License.  You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.########### These all have default values as shown########### Additional configuration goes into storm.yamljava.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"### storm.* configs are general configurations# the local dir is where jars are keptstorm.local.dir: "storm-local"storm.log4j2.conf.dir: "log4j2"storm.zookeeper.servers:    - "localhost"storm.zookeeper.port: 2181storm.zookeeper.root: "/storm"storm.zookeeper.session.timeout: 20000storm.zookeeper.connection.timeout: 15000storm.zookeeper.retry.times: 5storm.zookeeper.retry.interval: 1000storm.zookeeper.retry.intervalceiling.millis: 30000storm.zookeeper.auth.user: nullstorm.zookeeper.auth.password: nullstorm.exhibitor.port: 8080storm.exhibitor.poll.uripath: "/exhibitor/v1/cluster/list"storm.cluster.mode: "distributed" # can be distributed or localstorm.local.mode.zmq: falsestorm.thrift.transport: "org.apache.storm.security.auth.SimpleTransportPlugin"storm.principal.tolocal: "org.apache.storm.security.auth.DefaultPrincipalToLocal"storm.group.mapping.service: "org.apache.storm.security.auth.ShellBasedGroupsMapping"storm.group.mapping.service.params: nullstorm.messaging.transport: "org.apache.storm.messaging.netty.Context"storm.nimbus.retry.times: 5storm.nimbus.retry.interval.millis: 2000storm.nimbus.retry.intervalceiling.millis: 60000storm.auth.simple-white-list.users: []storm.auth.simple-acl.users: []storm.auth.simple-acl.users.commands: []storm.auth.simple-acl.admins: []storm.cluster.state.store: "org.apache.storm.cluster_state.zookeeper_state_factory"storm.meta.serialization.delegate: "org.apache.storm.serialization.GzipThriftSerializationDelegate"storm.codedistributor.class: "org.apache.storm.codedistributor.LocalFileSystemCodeDistributor"storm.workers.artifacts.dir: "workers-artifacts"storm.health.check.dir: "healthchecks"storm.health.check.timeout.ms: 5000### nimbus.* configs are for the masternimbus.seeds : ["localhost"]nimbus.thrift.port: 6627nimbus.thrift.threads: 64nimbus.thrift.max_buffer_size: 1048576nimbus.childopts: "-Xmx1024m"nimbus.task.timeout.secs: 30nimbus.supervisor.timeout.secs: 60nimbus.monitor.freq.secs: 10nimbus.cleanup.inbox.freq.secs: 600nimbus.inbox.jar.expiration.secs: 3600nimbus.code.sync.freq.secs: 120nimbus.task.launch.secs: 120nimbus.file.copy.expiration.secs: 600nimbus.topology.validator: "org.apache.storm.nimbus.DefaultTopologyValidator"topology.min.replication.count: 1topology.max.replication.wait.time.sec: 60nimbus.credential.renewers.freq.secs: 600nimbus.impersonation.authorizer: "org.apache.storm.security.auth.authorizer.ImpersonationAuthorizer"nimbus.queue.size: 100000scheduler.display.resource: false### ui.* configs are for the masterui.host: 0.0.0.0ui.port: 8080ui.childopts: "-Xmx768m"ui.actions.enabled: trueui.filter: nullui.filter.params: nullui.users: nullui.header.buffer.bytes: 4096ui.http.creds.plugin: org.apache.storm.security.auth.DefaultHttpCredentialsPluginlogviewer.port: 8000logviewer.childopts: "-Xmx128m"logviewer.cleanup.age.mins: 10080logviewer.appender.name: "A1"logviewer.max.sum.worker.logs.size.mb: 4096logviewer.max.per.worker.logs.size.mb: 2048logs.users: nulldrpc.port: 3772drpc.worker.threads: 64drpc.max_buffer_size: 1048576drpc.queue.size: 128drpc.invocations.port: 3773drpc.invocations.threads: 64drpc.request.timeout.secs: 600drpc.childopts: "-Xmx768m"drpc.http.port: 3774drpc.https.port: -1drpc.https.keystore.password: ""drpc.https.keystore.type: "JKS"drpc.http.creds.plugin: org.apache.storm.security.auth.DefaultHttpCredentialsPlugindrpc.authorizer.acl.filename: "drpc-auth-acl.yaml"drpc.authorizer.acl.strict: falsetransactional.zookeeper.root: "/transactional"transactional.zookeeper.servers: nulltransactional.zookeeper.port: null## blobstore configssupervisor.blobstore.class: "org.apache.storm.blobstore.NimbusBlobStore"supervisor.blobstore.download.thread.count: 5supervisor.blobstore.download.max_retries: 3supervisor.localizer.cache.target.size.mb: 10240supervisor.localizer.cleanup.interval.ms: 600000nimbus.blobstore.class: "org.apache.storm.blobstore.LocalFsBlobStore"nimbus.blobstore.expiration.secs: 600storm.blobstore.inputstream.buffer.size.bytes: 65536client.blobstore.class: "org.apache.storm.blobstore.NimbusBlobStore"storm.blobstore.replication.factor: 3### supervisor.* configs are for node supervisors# Define the amount of workers that can be run on this machine. Each worker is assigned a port to use for communicationsupervisor.slots.ports:    - 6700    - 6701    - 6702    - 6703supervisor.childopts: "-Xmx256m"supervisor.run.worker.as.user: false#how long supervisor will wait to ensure that a worker process is startedsupervisor.worker.start.timeout.secs: 120#how long between heartbeats until supervisor considers that worker dead and tries to restart itsupervisor.worker.timeout.secs: 30#how many seconds to sleep for before shutting down threads on workersupervisor.worker.shutdown.sleep.secs: 1#how frequently the supervisor checks on the status of the processes it's monitoring and restarts if necessarysupervisor.monitor.frequency.secs: 3#how frequently the supervisor heartbeats to the cluster state (for nimbus)supervisor.heartbeat.frequency.secs: 5supervisor.enable: truesupervisor.supervisors: []supervisor.supervisors.commands: []supervisor.memory.capacity.mb: 3072.0#By convention 1 cpu core should be about 100, but this can be adjusted if needed# using 100 makes it simple to set the desired value to the capacity measurement# for single threaded boltssupervisor.cpu.capacity: 400.0### worker.* configs are for task workersworker.heap.memory.mb: 768worker.childopts: "-Xmx%HEAP-MEM%m -XX:+PrintGCDetails -Xloggc:artifacts/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=1M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=artifacts/heapdump"worker.gc.childopts: ""# Unlocking commercial features requires a special license from Oracle.# See http://www.oracle.com/technetwork/java/javase/terms/products/index.html# For this reason, profiler features are disabled by default.worker.profiler.enabled: falseworker.profiler.childopts: "-XX:+UnlockCommercialFeatures -XX:+FlightRecorder"worker.profiler.command: "flight.bash"worker.heartbeat.frequency.secs: 1# check whether dynamic log levels can be reset from DEBUG to INFO in workersworker.log.level.reset.poll.secs: 30# control how many worker receiver threads we need per workertopology.worker.receiver.thread.count: 1task.heartbeat.frequency.secs: 3task.refresh.poll.secs: 10task.credentials.poll.secs: 30# now should be null by defaulttopology.backpressure.enable: truebackpressure.disruptor.high.watermark: 0.9backpressure.disruptor.low.watermark: 0.4zmq.threads: 1zmq.linger.millis: 5000zmq.hwm: 0storm.messaging.netty.server_worker_threads: 1storm.messaging.netty.client_worker_threads: 1storm.messaging.netty.buffer_size: 5242880 #5MB buffer# Since nimbus.task.launch.secs and supervisor.worker.start.timeout.secs are 120, other workers should also wait at least that long before giving up on connecting to the other worker. The reconnection period need also be bigger than storm.zookeeper.session.timeout(default is 20s), so that we can abort the reconnection when the target worker is dead.storm.messaging.netty.max_retries: 300storm.messaging.netty.max_wait_ms: 1000storm.messaging.netty.min_wait_ms: 100# If the Netty messaging layer is busy(netty internal buffer not writable), the Netty client will try to batch message as more as possible up to the size of storm.messaging.netty.transfer.batch.size bytes, otherwise it will try to flush message as soon as possible to reduce latency.storm.messaging.netty.transfer.batch.size: 262144# Sets the backlog value to specify when the channel binds to a local addressstorm.messaging.netty.socket.backlog: 500# By default, the Netty SASL authentication is set to false.  Users can override and set it true for a specific topology.storm.messaging.netty.authentication: false# Default plugin to use for automatic network topology discoverystorm.network.topography.plugin: org.apache.storm.networktopography.DefaultRackDNSToSwitchMapping# default number of seconds group mapping service will cache user groupstorm.group.mapping.service.cache.duration.secs: 120### topology.* configs are for specific executing stormstopology.enable.message.timeouts: truetopology.debug: falsetopology.workers: 1topology.acker.executors: nulltopology.eventlogger.executors: 0topology.tasks: null# maximum amount of time a message has to complete before it's considered failedtopology.message.timeout.secs: 30topology.multilang.serializer: "org.apache.storm.multilang.JsonSerializer"topology.shellbolt.max.pending: 100topology.skip.missing.kryo.registrations: falsetopology.max.task.parallelism: nulltopology.max.spout.pending: nulltopology.state.synchronization.timeout.secs: 60topology.stats.sample.rate: 0.05topology.builtin.metrics.bucket.size.secs: 60topology.fall.back.on.java.serialization: truetopology.worker.childopts: nulltopology.worker.logwriter.childopts: "-Xmx64m"topology.executor.receive.buffer.size: 1024 #batchedtopology.executor.send.buffer.size: 1024 #individual messagestopology.transfer.buffer.size: 1024 # batchedtopology.tick.tuple.freq.secs: nulltopology.worker.shared.thread.pool.size: 4topology.spout.wait.strategy: "org.apache.storm.spout.SleepSpoutWaitStrategy"topology.sleep.spout.wait.strategy.time.ms: 1topology.error.throttle.interval.secs: 10topology.max.error.report.per.interval: 5topology.kryo.factory: "org.apache.storm.serialization.DefaultKryoFactory"topology.tuple.serializer: "org.apache.storm.serialization.types.ListDelegateSerializer"topology.trident.batch.emit.interval.millis: 500topology.testing.always.try.serialize: falsetopology.classpath: nulltopology.environment: nulltopology.bolts.outgoing.overflow.buffer.enable: falsetopology.disruptor.wait.timeout.millis: 1000topology.disruptor.batch.size: 100topology.disruptor.batch.timeout.millis: 1topology.disable.loadaware: falsetopology.state.checkpoint.interval.ms: 1000# Configs for Resource Aware Scheduler# topology priority describing the importance of the topology in decreasing importance starting from 0 (i.e. 0 is the highest priority and the priority importance decreases as the priority number increases).# Recommended range of 0-29 but no hard limit set.topology.priority: 29topology.component.resources.onheap.memory.mb: 128.0topology.component.resources.offheap.memory.mb: 0.0topology.component.cpu.pcore.percent: 10.0topology.worker.max.heap.size.mb: 768.0topology.scheduler.strategy: "org.apache.storm.scheduler.resource.strategies.scheduling.DefaultResourceAwareStrategy"resource.aware.scheduler.eviction.strategy: "org.apache.storm.scheduler.resource.strategies.eviction.DefaultEvictionStrategy"resource.aware.scheduler.priority.strategy: "org.apache.storm.scheduler.resource.strategies.priority.DefaultSchedulingPriorityStrategy"dev.zookeeper.path: "/tmp/dev-storm-zookeeper"pacemaker.host: "localhost"pacemaker.port: 6699pacemaker.base.threads: 10pacemaker.max.threads: 50pacemaker.thread.timeout: 10pacemaker.childopts: "-Xmx1024m"pacemaker.auth.method: "NONE"pacemaker.kerberos.users: []#default storm daemon metrics reporter pluginsstorm.daemon.metrics.reporter.plugins:- "org.apache.storm.daemon.metrics.reporters.JmxPreparableReporter"


0 0
原创粉丝点击