Flume NG有4个主要的组件:
Event表示在Flume各个Agent之间传递的数据流
Source表示从外部源接收Event数据流,然后传递给Channel
Channel表示对从Source传递的Event数据流的临时存储
Sink表示从Channel中接收存储的Event数据流,并传递给下游的Source或者终点仓库
这篇看一下Event接口表示的数据流。Source, Channel, Sink操作的数据流都是基于Event接口的封装。
public interface Event {
/**
* Returns a map of name-value pairs describing the data stored in the body.
*/
public Map<String, String> getHeaders();
/**
* Set the event headers
* @param headers Map of headers to replace the current headers.
*/
public void setHeaders(Map<String, String> headers);
/**
* Returns the raw byte array of the data contained in this event.
*/
publ