7-6Keyed vs Non-Keyed Windows
The first thing to specify is whether your stream should be keyed or not. This has to be done before defining the window. Using the keyBy(...)
will split your infinite stream into logical keyed streams. If keyBy(...)
is not called, your stream is not keyed.
In the case of keyed streams, any attribute of your incoming events can be used as a key (more details here). Having a keyed stream will allow your windowed computation to be performed in parallel by multiple tasks, as each logical keyed stream can be processed independently from the rest. All elements referring to the same key will be sent to the same parallel task.
In case of non-keyed streams, your original stream will not be split into multiple logical streams and all the windowing logic will be performed by a single task, i.e. with parallelism of 1.
keyBy:可以多任务并行执行
not keyBy:只能单任务并行度为1执行
相关文章
- 通过cmd 使用 InstallUtil.exe 命令 操作 windows服务 Windows Service
- 用VS制作的windows服务安装包 安装完后如何让服务自动启动
- Windows 由于无法验证发布者,windows阻止控件安装怎么办
- VS连接Windows Mobile模拟器
- ROBOCOPY——Windows 的可靠文件复制
- Windows后门小计
- 了解WINDOWS API基本数据类型
- Windows下配置Java环境变量
- 如何在Windows下运行linux shell脚本
- linux 远程 windows 命令:rdesktop vs windows mstsc
- 获取Windows安装日期
- WINDOWS和Linux上安装php7 alpha 并安装 yaf
- MFC Windows 程序设计[298]之编辑框焦点处理例程(附源码 )
- MFC Windows 程序设计[174]之获取文件信息(附源码)
- MFC Windows 程序设计[六十六]之文件操作对话框(附源码)
- MFC Windows 程序设计[二十六]之线条之美(附源码)
- MFC Windows 程序设计[二十四]之windows目录展示(附源码)
- 有道云笔记在Windows 英文操作系统下字体显示模糊的解决方案
- Atitit.Java exe bat 作为windows系统服务程序运行
- Windows上使用vs编译x264的方法
- Windows系统下如何安装faiss-gpu
- WINDOWS.H already included. MFC apps must not #include <Windows.h>
- chromium在windows上的编译 构建 Checking out and Building Chromium for Windows
- Windows API一日一练(64) RegSetValueEx和RegDeleteValue函数
- Windows API一日一练(73)GetVersionEx函数
- C# 编写Windows Service(windows服务程序)
- Windows之VS Code安装
- 锁定Windows图标和设置