问题描述
我在我的应用程序中使用 Hazelcast Jet。
// value1
BatchStageWithKey<Map<String,Object>,Object> indianCustomerJson = value
.filter(model -> model.nationName().equals("india"))
.map(model -> JsonUtil.mapFrom(model.getJson_value()))
.groupingKey(p_json -> p_json.get("id"));
// value2
BatchStageWithKey<Map<String,Object> usaCustomerJson = value
.filter(model -> model.nationName().equals("usa"))
.map(model -> JsonUtil.mapFrom(model.getJson_value()))
.groupingKey(j_json -> j_json.get("id"));
这里我有两个 BatchStageWithKey 结果。
现在我想做左连接
from indianCustomerJson left join usaCustomerJson
基于 BatchStageKey
解决方法
连接是在 Hazelcast Jet 中手动完成的。您可以进行散列连接或共同组,请参阅以下示例:https://github.com/hazelcast/hazelcast-jet/tree/master/examples#joins