public class Shard extends Object
PCollectionis balanced across reducers and output files.
|Constructor and Description|
|Modifier and Type||Method and Description|
public static <T> PCollection<T> shard(PCollection<T> pc, int numPartitions)
PCollection<T>that has the same contents as its input argument but will be written to a fixed number of output files. This is useful for map-only jobs that process lots of input files but only write out a small amount of input per task.
numPartitions- The number of output partitions to create
PCollection<T>with the same contents as the input
Copyright © 2017 The Apache Software Foundation. All rights reserved.