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.建立数据传输的缓冲区.在通信连接没有建立之前把发送的数据缓存起来.数据发送方可以在连接建立之前发送消息,而不需要等连接建立起来, ...
随机推荐
- 洛谷P3808 & P3796 AC自动机模板
题目:P3808:https://www.luogu.org/problemnew/show/P3808 P3796:https://www.luogu.org/problemnew/show/P37 ...
- IntelliJ IDEA :解决idea导入项目爆红
转:https://my.oschina.net/LevelCoder/blog/1802158 我们在导入一个新的项目到idea的时候,项目明明没有报错,但是会出现出了父包属于正常颜色外,其子包都会 ...
- [SpringMVC]定义多个前缀映射的问题
转自:https://penciltim.iteye.com/blog/501073 我在web.xml里面定义多个dispatch-servlet的前缀映射,像下面这样 <!-- Servle ...
- Prime Path(bfs)
http://poj.org/problem?id=3126 题意:给两个四位数n,m,将n变成m需要多少步,要求每次只能改变n的某一位数,即改变后的数与改变前的数只有一位不同,且每次改变后的数都是素 ...
- Quartz实现执行任务记录数据库,方便计算任务的执行次数以及成功次数
任务执行实体 /** * 任务执行情况详情 */ public class JobExecuteDetail implements Serializable{ /** * */ private sta ...
- Spring Data 自动生成
之前一直用的mybatis逆向自动生成,由于最近学习springdata,所以看了一下springdata的自动生成,基本与mybatis一致,不同的也许就是逆向生成代码(实体类,mapper等)和正 ...
- Android fragment的切换(解决REPLACE的低效)
在项目中切换Fragment,一直都是用replace()方法来替换Fragment.但是这样做有一个问题,每次切换的时候Fragment都会重新实列化,重新加载一次数据,这样做会非常消耗性能用用户的 ...
- C#关闭退出线程的几种方法
.Application.Exit(); //强制所有消息中止,退出所有的窗体,但是若有托管线程(非主线程),也无法干净地退出: .System.Environment.Exit(); //无论在主线 ...
- PAC学习理论:机器学习那些事
参考翻译,有大量删除和修改,如有异议,请拜访原文.一定要看英文原文!!!. 本文转载于:深度译文:机器学习那些事 英文[原题]A Few Useful Things to Know About Mac ...
- js 检查内容是否为空
var NoViods = document.getElementsByClassName("NoVoid"); ; i < NoViods.length; i++) { i ...