Flink问题1】的更多相关文章

配置环境 包括 JAVA_HOME jobmanager.rpc.address jobmanager.heap.mb 和 taskmanager.heap.mb taskmanager.numberOfTaskSlots taskmanager.tmp.dirs slaves文件 启动关闭bin/start-cluster.shbin/stop-cluster.sh   初步使用 public static void main(String[] args) throws Exception {…
Flink resource manager的作用如图,   FlinkResourceManager /** * * <h1>Worker allocation steps</h1> * * <ol> * <li>The resource manager decides to request more workers. This can happen in order * to fill the initial pool, or as a result o…
Apache Flink闻名已久,一直没有亲自尝试一把,这两天看了文档,发现在real-time streaming方面,Flink提供了更多高阶的实用函数. 用Apache Flink实现WordCount 下载Apache Flink 0.10.1 启动local模式 bin/start-local.sh 运行scala-shell bin/start-scala-shell.sh remote localhost 6123 Flink中JobManager的默认监听端口是6123 word…
InstanceManager用于管理JobManager申请到的taskManager和slots资源 /** * Simple manager that keeps track of which TaskManager are available and alive. */ public class InstanceManager { // ------------------------------------------------------------------------ //…
  参考, http://wuchong.me/blog/2016/05/25/flink-internals-window-mechanism/ http://wuchong.me/blog/2016/06/06/flink-internals-session-window/    WindowOperator window operator通过WindowAssigner和Trigger来实现它的逻辑 当一个element到达时,通过KeySelector先assign一个key,并且通过W…
org.apache.flink.streaming.api.windowing.triggers;   Trigger public abstract class Trigger<T, W extends Window> implements Serializable { /** * Called for every element that gets added to a pane. The result of this will determine * whether the pane…
如果要考虑易用性和效率,使用rocksDB来替代普通内存的kv是有必要的 有了rocksdb,可以range查询,可以支持columnfamily,可以各种压缩 但是rocksdb本身是一个库,是跑在RocksDBStateBackend中的 所以taskmanager挂掉后,数据还是没了, 所以RocksDBStateBackend仍然需要类似HDFS这样的分布式存储来存储snapshot   kv state需要由rockdb来管理,这是和内存或file backend最大的不同 Abstr…
在Flink – Checkpoint 没有描述了整个checkpoint的流程,但是对于如何生成snapshot和恢复snapshot的过程,并没有详细描述,这里补充   StreamOperator /** * Basic interface for stream operators. Implementers would implement one of * {@link org.apache.flink.streaming.api.operators.OneInputStreamOper…
  public class StreamTaskState implements Serializable, Closeable { private static final long serialVersionUID = 1L; private StateHandle<?> operatorState; private StateHandle<Serializable> functionState; private HashMap<String, KvStateSnaps…
Where did we come from? With the 0.9.0-milestone1 release, Apache Flink added an API to process relational data with SQL-like expressions called the Table API. The central concept of this API is a Table, a structured data set or stream on which relat…