最大値

Javadoc Javadoc


コレクション内の最大値を、グローバルまたはキーごとに計算するためのさまざまなトランスフォームを提供します。

例1DoublesPCollectionの最大値を取得します。

PCollection<Double> input = ...;
PCollection<Double> max = input.apply(Max.doublesGlobally());

例2:各固有キー(String型)に関連付けられたIntegersの最大値を計算します。

PCollection<KV<String, Integer>> input = ...;
PCollection<KV<String, Integer>> maxPerKey = input
     .apply(Max.integersPerKey());

例3:

例4: