Aggregator (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.transforms

Interface Aggregator<InputT,OutputT>

  • Type Parameters:
    InputT - the type of input values
    OutputT - the type of output values


    public interface Aggregator<InputT,OutputT>
    An Aggregator<InputT> enables monitoring of values of type InputT, to be combined across all bundles.

    Aggregators are created by calling DoFn.createAggregator(java.lang.String, com.google.cloud.dataflow.sdk.transforms.Combine.CombineFn<? super AggInputT, ?, AggOutputT>), typically from the DoFn constructor. Elements can be added to the Aggregator by calling addValue(InputT).

    Aggregators are visible in the monitoring UI, when the pipeline is run using DataflowPipelineRunner or BlockingDataflowPipelineRunner, along with their current value. Aggregators may not become visible until the system begins executing the ParDo transform that created them and/or their initial value is changed.

    Example:

     class MyDoFn extends DoFn {
       private Aggregator myAggregator;
    
       public MyDoFn() {
         myAggregator = createAggregator("myAggregator", new Sum.SumIntegerFn());
       }


이 페이지가 도움이 되었나요? 평가를 부탁드립니다.

다음에 대한 의견 보내기...

도움이 필요하시나요? 지원 페이지를 방문하세요.