How to pass external configuration properties to storm topology?
How to pass external configuration properties to storm topology?
I want to pass some custom configuration properties to storm topology that are not part of storm yaml, how can I pass it.
https://stackoverflow.com/questions/18061332/storm-topology-configuration
------------------------------------------------------------------------------------------------------------------------------------------------------
you can use following ways to get the external configuration inside the topplogy
1:
pass the arguments like this
storm jar storm-jar topology-name -c sKey=sValue -c key1=value1 -c key2=value2 >/tmp/storm.txt
2:
Create a simple java resource file (properties files) and pass it as arguments to your topology main class, in main method read the properties from the main file
and build the storm configuration object using conf.put()
3:
create separate yaml file read it through the Utils method provided by storm api,look for more documentation https://nathanmarz.github.io/storm/doc/backtype/storm/utils/Utils.html
Utils.findAndReadConfigFile()
--------------------------
You can use
Config conf = new Config();
conf.put(key, val);
conf.put(key1, val1);
e.g redis config, etc.
and then you can use this in prepare method of bolts(in case of trident in functions/ filters, etc).
Hope this helps.
How to pass external configuration properties to storm topology?的更多相关文章
- External Configuration Store Pattern 外部配置存储模式
Move configuration information out of the application deployment package to a centralized location. ...
- STORM_0005_第一个非常简单的storm topology的提交运行
配置好storm之后就可以开始在eclipse里面写topology了. 下面是我在网上搜到的一个简单的例子,我按照自己的理解注释了一下. 第一步,创建mvn工程 这是pom.xml文件 <pr ...
- Storm Topology Parallelism
Understanding the Parallelism of a Storm Topology What makes a running topology: worker processes, e ...
- java.lang.ClassNotFoundException: org.apache.storm.topology.IRichSpout
java.lang.NoClassDefFoundError: org/apache/storm/topology/IRichSpout at java.lang.Class.getDeclaredM ...
- Caused by: java.lang.ClassNotFoundException: backtype.storm.topology.IRichSpout
1:初次运行Strom程序出现如下所示的错误,贴一下,方便脑补,也希望帮助到看到的小伙伴: 错误如下所示,主要问题是刚开始使用maven获取jar包的时候需要写<scope>provide ...
- Storm Topology 提交 总结---Kettle On Storm 实现
一,目的 在学习的过程中,需要用到 PDI---一个开源的ETL软件.主要是用它来设计一些转换流程来处理数据.但是,在PDI中设计好的 transformation 是在本地的执行引擎中执行的,(参考 ...
- Storm本地启动拓扑报错:Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/storm/topology/IRichSpout
问题描述: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/storm/topology ...
- SpringBoot(三) Core Features: External Configuration(配置文件)
码云: external-configuration 可以使用属性文件,YAML文件,环境变量和命令行参数来外部化配置 一.属性值可以直接注入到bean 系统属性值不可以 // application ...
- Storm Topology及分组原理
Storm的通信机制,需要满足如下一些条件以满足Storm的语义. 1.建立数据传输的缓冲区.在通信连接没有建立之前把发送的数据缓存起来.数据发送方可以在连接建立之前发送消息,而不需要等连接建立起来, ...
随机推荐
- openStack enscaption
- Eqs(枚举+ hash)
http://poj.org/problem?id=1840 题意:给出系数a1,a2,a3,a4,a5,求满足方程的解有多少组. 思路:有a1x13+ a2x23+ a3x33+ a4x43+ a5 ...
- es6入门6--数组拓展运算符,Array.from()基本用法
本文只是作为ES6入门第九章学习笔记,在整理知识点的同时,会加入部分个人思考与解答,若想知道更详细的介绍,还请阅读阮一峰大神的ES6入门 一.拓展运算符 ES6中新增了拓展运算(...)三个点,它的作 ...
- 深入理解Redis(一)——高级键管理与数据结构
引语 这个章节主要讲解了三部分内容: 如何设计并管理Redis的键以及与其关联的数据结构: 了解并使用Redis客户端对象映射器: 介绍如何利用大O标记来评估Redis性能. 键与数据结构 键 我们先 ...
- struts2OGNL表达式(三)
OGNL表达式 OGNL对象试图导航语言.${user.addr.name}这种写法就叫对象试图导航.Struts框架使用OGNL作为默认的表达式语言 OGNL不仅仅可以试图导航,支持比EL表达式更加 ...
- reduce多种方法计算数组中某个值的出现次数
先来了解下reduce用法 arr.reduce(callback[, initialValue]) callback执行数组中每个值的函数,包含四个参数: accumulator 累计器累计回调的返 ...
- 如何通过putty软件远程登录并且控制linux平台
准备备工作: 下载putty远程登录软件,图标如下 打开linux主机. Linux主机准备条件: 1 配置IP ,如果大家使用虚拟机的话建议通过vm1或者vm8进行与本地真实机进行连接,同时注意要避 ...
- Md2All版本更新记录
Md2All版本更新记录 版本号:V2.8.2更新日期:2018-06-281:结合云图床,解决了Latex公式复制到公众号时有可能报“图片粘贴失败的问题”;2:结合云图床,解决了Latex公式复制到 ...
- akka框架——异步非阻塞高并发处理框架
akka actor, akka cluster akka是一系列框架,包括akka-actor, akka-remote, akka-cluster, akka-stream等,分别具有高并发处理模 ...
- Visual Studio UI Automation 学习(二)
今天恰好有时间,继续学习了一下UI Automation的知识.看了两篇博客,对UI Automation有了进一步的了解. https://blog.csdn.net/qq_37546891/art ...