【发布时间】:2018-11-03 19:11:38
【问题描述】:
尝试加入两个 Kstream,但出现类型不匹配错误,下面是代码 sn-p。
KStream<String, String> longCounts = netExpence.join(netIncome, (key1, key2) -> key1 + "/" + key2, JoinWindows.of(joinWindowSizeMs).until(windowRetentionTimeMs),stringSerde, stringSerde, stringSerde);
出现的错误是Type mismatch: cannot convert from String to R
这是加入 kstream 的语法join(KStream<K,VO> otherStream, ValueJoiner<? super V,? super VO,? extends VR> joiner, JoinWindows windows, Joined<K,V,VO> joined)
请解释一下ValueJoiner<? super V,? super VO,? extends VR> 的作用。谢谢
【问题讨论】:
标签: apache-kafka kafka-consumer-api kafka-producer-api apache-kafka-streams apache-kafka-connect