How to do Async Http Call with Apache Beam (Java)?

前端 未结 2 1772
深忆病人
深忆病人 2020-12-22 02:19

Input PCollection is http requests, which is a bounded dataset. I want to make async http call (Java) in a ParDo , parse response and put results into output PCollection. My

2条回答
  •  盖世英雄少女心
    2020-12-22 03:14

    The issue that your hitting is that your outputting outside the context of a processElement or finishBundle call.

    You'll want to gather all your outputs in memory and output them eagerly during future processElement calls and at the end within finishBundle by blocking till all your calls finish.

提交回复
热议问题