【发布时间】:2018-04-11 05:09:21
【问题描述】:
我使用的是 Flink 1.4.2,我有一个场景需要使用两个键。 例如
KeyedStream<UsageStatistics, Tuple> keyedStream = stream.keyBy("clusterId", "ssid");
usageCounts = keyedStream.process(new CustomProcessFunction(windowSize,queryableStateName));
值描述会
ValueStateDescriptor<SsidTotalUsage> descriptor = new ValueStateDescriptor(queryableStateName, SsidTotalUsage.class);
descriptor.setQueryable(queryableStateName);
谁能建议我使用可查询状态客户端获取 flink 中多个键的状态?
QueryableClient 下面对于单个键“clusterId”运行良好。
kvState = queryableStateClient.getKvState(JobID.fromHexString(jobId), queryableStateName, clusterId, BasicTypeInfo.STRING_TYPE_INFO, descriptor);
多个键的 type_info 应该是什么?任何与此相关的建议/示例或参考都会非常有帮助?
【问题讨论】:
标签: apache-flink flink-streaming