我正在用Java创建自定义IO连接器,该连接器以2.8.0 SDK的流模式运行。它从消息传递队列中读取以进行进一步的管道处理,类似于JMS IO。除自动缩放功能似乎不起作用外,其他所有方法均正常运行。对我来说奇怪的是,我已经实现了getSplitBacklogBytes()方法,但是就日志显示而言,它从未执行过。
我正在用修改后的单词计数示例进行测试,并通过以下方式执行:
--runner=DataflowRunner --autoscalingAlgorithm=THROUGHPUT_BASED --maxNumWorkers=4
“管道”选项和日志似乎表明自动缩放功能已正确设置。
PipelineOptions: Current Settings:
autoscalingAlgorithm: THROUGHPUT_BASED
maxNumWorkers: 4
numWorkers: 0
日志显示:
20:50:54:977 .. [INFO] .. - 2019-01-08T20:50:40.937Z: Autoscaling is enabled for job 2019-01-08_12_50_40-3227727519433807139. The number of workers will be between 1 and 4.
20:50:54:991 .. [INFO] .. - 2019-01-08T20:50:42.943Z: Autoscaling: Enabled for job 2019-01-08_12_50_40-3227727519433807139 between 1 and 4 worker processes.
20:50:55:052 .. [INFO] .. - 2019-01-08T20:50:49.186Z: Generating 4 persistent disks which will allow autoscaling from 1 to 4 workers.
20:50:55:053 .. [INFO] .. - 2019-01-08T20:50:49.493Z: Starting 1 workers...
要启用此功能,还有其他需要做的事情吗?还是无意中禁用了此功能?
源代码位于此处: https://github.com/SolaceLabs/solace-beam-integration/tree/development