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

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

 

资料:

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

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

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

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

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



下面为defaults.yaml内容:

[plain]  view plain copy print ?
  1. # Licensed to the Apache Software Foundation (ASF) under one  
  2. # or more contributor license agreements.  See the NOTICE file  
  3. # distributed with this work for additional information  
  4. # regarding copyright ownership.  The ASF licenses this file  
  5. # to you under the Apache License, Version 2.0 (the  
  6. # "License"); you may not use this file except in compliance  
  7. # with the License.  You may obtain a copy of the License at  
  8. #  
  9. # http://www.apache.org/licenses/LICENSE-2.0  
  10. #  
  11. # Unless required by applicable law or agreed to in writing, software  
  12. # distributed under the License is distributed on an "AS IS" BASIS,  
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
  14. # See the License for the specific language governing permissions and  
  15. # limitations under the License.  
  16.   
  17.   
  18. ########### These all have default values as shown  
  19. ########### Additional configuration goes into storm.yaml  
  20.   
  21. java.library.path: "/usr/local/lib:/opt/local/lib:/usr/lib"  
  22.   
  23. ### storm.* configs are general configurations  
  24. # the local dir is where jars are kept  
  25. storm.local.dir: "storm-local"  
  26. storm.zookeeper.servers:  
  27.     - "localhost"  
  28. storm.zookeeper.port: 2181  
  29. storm.zookeeper.root: "/storm"  
  30. storm.zookeeper.session.timeout: 20000  
  31. storm.zookeeper.connection.timeout: 15000  
  32. storm.zookeeper.retry.times: 5  
  33. storm.zookeeper.retry.interval: 1000  
  34. storm.zookeeper.retry.intervalceiling.millis: 30000  
  35. storm.zookeeper.auth.user: null  
  36. storm.zookeeper.auth.password: null  
  37. storm.cluster.mode: "distributed" # can be distributed or local  
  38. storm.local.mode.zmq: false  
  39. storm.thrift.transport: "backtype.storm.security.auth.SimpleTransportPlugin"  
  40. storm.principal.tolocal: "backtype.storm.security.auth.DefaultPrincipalToLocal"  
  41. storm.group.mapping.service: "backtype.storm.security.auth.ShellBasedGroupsMapping"  
  42. storm.messaging.transport: "backtype.storm.messaging.netty.Context"  
  43. storm.nimbus.retry.times: 5  
  44. storm.nimbus.retry.interval.millis: 2000  
  45. storm.nimbus.retry.intervalceiling.millis: 60000  
  46. storm.auth.simple-white-list.users: []  
  47. storm.auth.simple-acl.users: []  
  48. storm.auth.simple-acl.users.commands: []  
  49. storm.auth.simple-acl.admins: []  
  50. storm.meta.serialization.delegate: "backtype.storm.serialization.DefaultSerializationDelegate"  
  51.   
  52. ### nimbus.* configs are for the master  
  53. nimbus.host: "localhost"  
  54. nimbus.thrift.port: 6627  
  55. nimbus.thrift.threads: 64  
  56. nimbus.thrift.max_buffer_size: 1048576  
  57. nimbus.childopts: "-Xmx1024m"  
  58. nimbus.task.timeout.secs: 30  
  59. nimbus.supervisor.timeout.secs: 60  
  60. nimbus.monitor.freq.secs: 10  
  61. nimbus.cleanup.inbox.freq.secs: 600  
  62. nimbus.inbox.jar.expiration.secs: 3600  
  63. nimbus.task.launch.secs: 120  
  64. nimbus.reassign: true  
  65. nimbus.file.copy.expiration.secs: 600  
  66. nimbus.topology.validator: "backtype.storm.nimbus.DefaultTopologyValidator"  
  67. nimbus.credential.renewers.freq.secs: 600  
  68.   
  69. ### ui.* configs are for the master  
  70. ui.port: 8080  
  71. ui.childopts: "-Xmx768m"  
  72. ui.actions.enabled: true  
  73. ui.filter: null  
  74. ui.filter.params: null  
  75. ui.users: null  
  76. ui.header.buffer.bytes: 4096  
  77. ui.http.creds.plugin: backtype.storm.security.auth.DefaultHttpCredentialsPlugin  
  78.   
  79. logviewer.port: 8000  
  80. logviewer.childopts: "-Xmx128m"  
  81. logviewer.cleanup.age.mins: 10080  
  82. logviewer.appender.name: "A1"  
  83.   
  84. logs.users: null  
  85.   
  86. drpc.port: 3772  
  87. drpc.worker.threads: 64  
  88. drpc.max_buffer_size: 1048576  
  89. drpc.queue.size: 128  
  90. drpc.invocations.port: 3773  
  91. drpc.invocations.threads: 64  
  92. drpc.request.timeout.secs: 600  
  93. drpc.childopts: "-Xmx768m"  
  94. drpc.http.port: 3774  
  95. drpc.https.port: -1  
  96. drpc.https.keystore.password: ""  
  97. drpc.https.keystore.type: "JKS"  
  98. drpc.http.creds.plugin: backtype.storm.security.auth.DefaultHttpCredentialsPlugin  
  99. drpc.authorizer.acl.filename: "drpc-auth-acl.yaml"  
  100. drpc.authorizer.acl.strict: false  
  101.   
  102. transactional.zookeeper.root: "/transactional"  
  103. transactional.zookeeper.servers: null  
  104. transactional.zookeeper.port: null  
  105.   
  106. ### supervisor.* configs are for node supervisors  
  107. # Define the amount of workers that can be run on this machine. Each worker is assigned a port to use for communication  
  108. supervisor.slots.ports:  
  109.     - 6700  
  110.     - 6701  
  111.     - 6702  
  112.     - 6703  
  113. supervisor.childopts: "-Xmx256m"  
  114. supervisor.run.worker.as.user: false  
  115. #how long supervisor will wait to ensure that a worker process is started  
  116. supervisor.worker.start.timeout.secs: 120  
  117. #how long between heartbeats until supervisor considers that worker dead and tries to restart it  
  118. supervisor.worker.timeout.secs: 30  
  119. #how frequently the supervisor checks on the status of the processes it's monitoring and restarts if necessary  
  120. supervisor.monitor.frequency.secs: 3  
  121. #how frequently the supervisor heartbeats to the cluster state (for nimbus)  
  122. supervisor.heartbeat.frequency.secs: 5  
  123. supervisor.enable: true  
  124. supervisor.supervisors: []  
  125. supervisor.supervisors.commands: []  
  126.   
  127.   
  128. ### worker.* configs are for task workers  
  129. worker.childopts: "-Xmx768m"  
  130. worker.gc.childopts: ""  
  131. worker.heartbeat.frequency.secs: 1  
  132.   
  133. # control how many worker receiver threads we need per worker  
  134. topology.worker.receiver.thread.count: 1  
  135.   
  136. task.heartbeat.frequency.secs: 3  
  137. task.refresh.poll.secs: 10  
  138. task.credentials.poll.secs: 30  
  139.   
  140. zmq.threads: 1  
  141. zmq.linger.millis: 5000  
  142. zmq.hwm: 0  
  143.   
  144.   
  145. storm.messaging.netty.server_worker_threads: 1  
  146. storm.messaging.netty.client_worker_threads: 1  
  147. storm.messaging.netty.buffer_size: 5242880 #5MB buffer  
  148. # 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.  
  149. storm.messaging.netty.max_retries: 300  
  150. storm.messaging.netty.max_wait_ms: 1000  
  151. storm.messaging.netty.min_wait_ms: 100  
  152.   
  153. # 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.  
  154. storm.messaging.netty.transfer.batch.size: 262144  
  155.   
  156. # We check with this interval that whether the Netty channel is writable and try to write pending messages if it is.  
  157. storm.messaging.netty.flush.check.interval.ms: 10  
  158.   
  159. # By default, the Netty SASL authentication is set to false.  Users can override and set it true for a specific topology.  
  160. storm.messaging.netty.authentication: false  
  161.   
  162. # default number of seconds group mapping service will cache user group  
  163. storm.group.mapping.service.cache.duration.secs: 120  
  164.   
  165. ### topology.* configs are for specific executing storms  
  166. topology.enable.message.timeouts: true  
  167. topology.debug: false  
  168. topology.workers: 1  
  169. topology.acker.executors: null  
  170. topology.tasks: null  
  171. # maximum amount of time a message has to complete before it's considered failed  
  172. topology.message.timeout.secs: 30  
  173. topology.multilang.serializer: "backtype.storm.multilang.JsonSerializer"  
  174. topology.skip.missing.kryo.registrations: false  
  175. topology.max.task.parallelism: null  
  176. topology.max.spout.pending: null  
  177. topology.state.synchronization.timeout.secs: 60  
  178. topology.stats.sample.rate: 0.05  
  179. topology.builtin.metrics.bucket.size.secs: 60  
  180. topology.fall.back.on.java.serialization: true  
  181. topology.worker.childopts: null  
  182. topology.executor.receive.buffer.size: 1024 #batched  
  183. topology.executor.send.buffer.size: 1024 #individual messages  
  184. topology.receiver.buffer.size: 8 # setting it too high causes a lot of problems (heartbeat thread gets starved, throughput plummets)  
  185. topology.transfer.buffer.size: 1024 # batched  
  186. topology.tick.tuple.freq.secs: null  
  187. topology.worker.shared.thread.pool.size: 4  
  188. topology.disruptor.wait.strategy: "com.lmax.disruptor.BlockingWaitStrategy"  
  189. topology.spout.wait.strategy: "backtype.storm.spout.SleepSpoutWaitStrategy"  
  190. topology.sleep.spout.wait.strategy.time.ms: 1  
  191. topology.error.throttle.interval.secs: 10  
  192. topology.max.error.report.per.interval: 5  
  193. topology.kryo.factory: "backtype.storm.serialization.DefaultKryoFactory"  
  194. topology.tuple.serializer: "backtype.storm.serialization.types.ListDelegateSerializer"  
  195. topology.trident.batch.emit.interval.millis: 500  
  196. topology.testing.always.try.serialize: false  
  197. topology.classpath: null  
  198. topology.environment: null  
  199.   
  200. dev.zookeeper.path: "/tmp/dev-storm-zookeeper"  
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值