Storm学习00--IComponent
来源:互联网 发布:手机处理数据作图软件 编辑:程序博客网 时间:2024/05/21 12:43
##IComponent
IComponent继承Serializable接口, 为topology中所有可能组件提供共同的方法。
interface IComponent extends Serializable
提供两个方法
/** * Common methods for all possible components in a topology. This interface is used * when defining topologies using the Java API. */public interface IComponent extends Serializable { /** * Declare the output schema for all the streams of this topology. * * @param declarer this is used to declare output stream ids, output fields, and whether or not each output stream is a direct stream */ void declareOutputFields(OutputFieldsDeclarer declarer); /** * Declare configuration specific to this component. Only a subset of the "topology.*" configs can * be overridden. The component configuration can be further overridden when constructing the * topology using {@link TopologyBuilder} * */ Map<String, Object> getComponentConfiguration();}
1.1 declareOutputFields(OutputFieldsDeclarer declarer)
此方法用于声明当前Spout的Tuple发送流。Stream流的定义是通过OutputFieldsDeclarer.declare方法完成的,其中的参数包括了发送的域Fields。
如: 在RandomSentenceSpout中重写了
@Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("word"));}
1.2 getComponentConfiguration();
&mesp;此方法用于声明针对当前组件的特殊的Configuration配置。
0 0
- Storm学习00--IComponent
- Storm学习00---Storm的设计思想
- Storm学习00---Storm的并发模型
- Storm学习00-Storm的配置文件各个选项及释义
- Storm学习
- Storm学习
- storm学习
- Storm学习
- Storm学习(一)Storm介绍
- Storm学习(一) Storm介绍
- Storm学习(一)Storm介绍
- Storm学习(一)Storm介绍
- Storm学习一: Storm简介
- storm学习(二):搭建storm集群环境
- storm学习一 storm基本概念整理
- storm学习小结一:storm概述
- storm学习-Storm消息机制【转】
- storm学习-Storm DRPC实战 【转】
- C++多线程框架--------- 消息队列
- stm32 boot设置
- C#简单窗体应用程序(一)
- CMD常用命令
- 【设计模式】-工厂三姐妹
- Storm学习00--IComponent
- Matlab图像处理--demo篇
- mysql数据库的备份与恢复
- Pycharm:一款好用的PythonIDE--转自伯乐在线
- bzoj3939 Cow Hopscotch
- 网页需要iframe标签时,如何优化SEO?
- Vijos1334_NASA的食物计划
- Github使用Git命令完成项目的上传、修改及合并分支
- Round 2008 1AA