【问题标题】:Left join in the hazelcast jet左加入榛树喷气机
【发布时间】:2026-01-29 12:50:01
【问题描述】:

我在我的应用程序中使用 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>, 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

【问题讨论】:

    标签: java hazelcast-jet


    【解决方案1】:

    在 Hazelcast Jet 中手动完成连接。您可以进行哈希连接或联合组,请参阅以下示例:https://github.com/hazelcast/hazelcast-jet/tree/master/examples#joins

    【讨论】: