Partition.PartitionFn (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

Interface Partition.PartitionFn<T>

  • Type Parameters:
    T - the type of the elements being partitioned
    All Superinterfaces:
    Enclosing class:

    public static interface Partition.PartitionFn<T>
    extends Serializable
    A function object that chooses an output partition for an element.
    • Method Detail

      • partitionFor

        int partitionFor(T elem,
                         int numPartitions)
        Chooses the partition into which to put the given element.
        elem - the element to be partitioned
        numPartitions - the total number of partitions (>= 1)
        index of the selected partition (in the range [0..numPartitions-1])

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

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

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