1,
org.apache.flink.streaming.api.operators; AbstractStreamOperator public void processWatermark1(Watermark mark) throws Exception {
input1Watermark = mark.getTimestamp();
long newMin = Math.min(input1Watermark, input2Watermark);
if (newMin > combinedWatermark) {
combinedWatermark = newMin;
processWatermark(new Watermark(combinedWatermark));
}
} public void processWatermark2(Watermark mark) throws Exception {
input2Watermark = mark.getTimestamp();
long newMin = Math.min(input1Watermark, input2Watermark);
if (newMin > combinedWatermark) {
combinedWatermark = newMin;
processWatermark(new Watermark(combinedWatermark));
}
} 2,
http://vinoyang.com/2016/10/29/flink-streaming-window-operator-analysis/ 3, kakfa中多个partition提取 watermark
private static class PeriodicWatermarkEmitter<KPH> implements ProcessingTimeCallback 
public void onProcessingTime(long timestamp) throws Exception {

   long minAcrossAll = Long.MAX_VALUE;
boolean isEffectiveMinAggregation = false;
for (KafkaTopicPartitionState<?> state : allPartitions) { // we access the current watermark for the periodic assigners under the state
// lock, to prevent concurrent modification to any internal variables
final long curr;
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (state) {
curr = ((KafkaTopicPartitionStateWithPeriodicWatermarks<?, ?>) state).getCurrentWatermarkTimestamp();
} minAcrossAll = Math.min(minAcrossAll, curr);
isEffectiveMinAggregation = true;
} // emit next watermark, if there is one
if (isEffectiveMinAggregation && minAcrossAll > lastWatermarkTimestamp) {
lastWatermarkTimestamp = minAcrossAll;
emitter.emitWatermark(new Watermark(minAcrossAll));
} // schedule the next watermark
timerService.registerTimer(timerService.getCurrentProcessingTime() + interval, this);
}

多个inputstream的情况下,watermark的值怎么赋值? kakfa中多个partition提取 watermark的更多相关文章

  1. 关于datagridview中checkbox列在选中行的情况下无法操作值

    这几天做项目的时候碰到了个小问题,在datagridview中实现对checkbox列的全选和反选功能.代码如下              //全选              if (dataGrid ...

  2. Java中只有按值传递,没有按引用传递!(两种参数情况下都是值传递)

    今天,我在一本面试书上看到了关于java的一个参数传递的问题: 写道 java中对象作为参数传递给一个方法,到底是值传递,还是引用传递? 我毫无疑问的回答:“引用传递!”,并且还觉得自己对java的这 ...

  3. 知道一个数组某个index对应的值 不知道下标的情况下删除该值

    for (index,item) in Arr.enumerated() { if item == item { Arr.remove(at: index) } } 更好的方法是用数组的filter尾 ...

  4. 【心得】在脱离TFS的情况下,如何解除TFS绑定?

    我们知道在有TFS的情况下,在文件-源代码管理-高级中可以解除TFS绑定. 但是如果我们出差去了,拿着笔记本电脑,打开解决方案的时候,会总是提示无法连接TFS,并且在源代码管理处尝试解除的时候也提示无 ...

  5. 如何在关闭ssh连接的情况下,让进程继续运行?

    #screen 1 回车后进入Screen子界面,此时putty标题栏会指示处于子界面状态,然后运行你的程序 #应用程序名 1 然后按下Ctrl+A后抬起,然后按下d键,此时切换回主界面,Putty的 ...

  6. NGINX转发代理情况下,获取客户单真实IP

    编译时加上http_realip_module 模块 realip模块生效的前提是:直接连接nginx的ip是在set_real_ip_from中指定的. 原机配置: set_real_ip_from ...

  7. 条目二十一《总是让比较函数在等值情况下返回false》

    条目二十一<总是让比较函数在等值情况下返回false> 这条目对序列容器是不适合的,因为序列容器就是通过等值判断来比较的. 对于关联容器来说,比较是等价比较,所以要注意等值的时候,比较子的 ...

  8. 编写高质量代码改善C#程序的157个建议——建议16:元素数量可变的情况下不应使用数组

    建议16:元素数量可变的情况下不应使用数组 在C#中,数组一旦被创建,长度就不能改变.如果我们需要一个动态且可变长度的集合,就应该使用ArrayList或List<T>来创建. 而数组本身 ...

  9. mysql什么情况下会触发表锁

    锁是计算机协调多个进程或线程并发访问某一资源的机制.在数据库中,除传统的计算资源(如CPU.RAM.I/O等)的争用以外,数据也是一种供许多用户共享的资源.如何保证数据并发访问的一致性.有效性是所有数 ...

随机推荐

  1. .NET网址

    1.爱整理:http://www.aizhengli.com/

  2. where 1=1和 0=1 的作用

    where 1=1; 这个条件始终为True,在不定数量查询条件情况下,1=1可以很方便的规范语句. 一.不用where 1=1 在多条件查询中的困扰 举个例子,如果您做查询页面,并且,可查询的选项有 ...

  3. 简化版的SpringMVC框架的实现思路

    在SpringMVC基本统一Java web开发技术栈的环境下, 这是一个有点过时的话题了. SpringMVC的特点主要在于注解型的RequestMapping和参数机制非常灵活, 另外得益于Spr ...

  4. Ubuntu x86-64汇编(2)

    开发工具链 汇编编译器: yasm连接器: ld载入工具: os自带Debug工具:  ddd yasm安装 .tar.gz cd yasm-/ ./configure --prefix=/opt/y ...

  5. MYSQL多行合并成一行多列

    ), VALUE )) INSERT INTO # VALUES (,,'), (,,'), (,,'), (,,'), (,,'), (,,'), (,,') SELECT code,MIN(nam ...

  6. ubuntu中查看各种设备和资源的命令汇总

    一.系统信息     1.查看内核信息:                                           $uname -a     2.查看操作系统版本:             ...

  7. Swift打印Debug日志,实现Release下不打印

    OC内,我们往往做log打印时,会考虑一个Debug环境下打印,Release下控制不打印,以节约性能消耗. OC我们可以这样做: 在pch文件内,定义如下: //打印日志 #ifdef DEBUG ...

  8. 树莓派进阶之路 (020) - 基于24位AD转换模块HX711的重量称量实验

    参考文档:http://www.geek-workshop.com/thread-2315-1-1.html 参考文档:https://wenku.baidu.com/view/e5d5e4e2652 ...

  9. A. Candy Bags

    A. Candy Bags http://codeforces.com/problemset/problem/334/A   time limit per test 1 second memory l ...

  10. librbd 分析

    一.概述