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.建立数据传输的缓冲区.在通信连接没有建立之前把发送的数据缓存起来.数据发送方可以在连接建立之前发送消息,而不需要等连接建立起来, ...
随机推荐
- Java数据结构2——深入JCF
Java集合框架(JCF)参考C++的STL实现的在日常Java开发工作很常用的数据结构容器,有技术追求的人除了要会简单使用JCF之外,也要知道其底层的实现机制,知道它是如何实现的,为什么这样实现.就 ...
- 洛谷 P2668 & P2540 [ noip 2015 ] 斗地主 —— 搜索+贪心
题目:https://www.luogu.org/problemnew/show/P2668 https://www.luogu.org/problemnew/show/P2540 首先,如果没有 ...
- Java -JVM:JVM百科
ylbtech-Java -JVM:JVM百科 JVM是Java Virtual Machine(Java虚拟机)的缩写,JVM是一种用于计算设备的规范,它是一个虚构出来的计算机,是通过在实际的计算机 ...
- Django day08 多表操作 (二) 添加表记录
一: 一对多 1. 一对多新增 两种方式: publish = 对象 publish_id = id 1. publish_id 和 publish 的区别就是: 1)publish_id 可 ...
- Python 33(1) UDP协议 数据报协议 socketsever模块
一:基于UDP协议通信的套接字 基于UDP协议 只要是套接字,在开发的过程中一定要有服务端和客户端. UDP协议说的就是数据报协议,也就是说,基于UDP协议来发数据,每发一个数据,都是带有报头的数据 ...
- C# 取两位小数
double s=0.55555;result=s.ToString("#0.00");//点后面几个0就保留几位 如果要四舍五入的话,用这个double dbdata = 0.5 ...
- B - Alyona and mex(构造)
Problem description Alyona's mother wants to present an array of n non-negative integers to Alyona. ...
- 解决QQ未启用状态,QQ留言图标未启用
最近由于腾讯升级QQ一些东西,导致QQ图标成未启用状态:如图 解决方法,到腾讯此站点登陆一下即可, http://wp.qq.com/set.html 另外设置 没有保存按钮,如果选择完全公开,到自己 ...
- 多文件上传ajax jquery
jquery的ajaxSubmit()和多文件上传 <%@ page language="java" import="java.util.*" pageE ...
- Windows 环境下 Docker 使用及配置
原文引用: https://www.cnblogs.com/moashen/p/8067612.html 我们可以使用以下两种方式在Windows环境下使用docker: 1. 直接安装: Docke ...