V - the type of the values in the input PCollection, and the type of the elements
in the output PCollectionpublic class Values<V> extends PTransform<PCollection<? extends KV<?,V>>,PCollection<V>>
Values<V> takes a PCollection of KV<K, V>s and returns a PCollection<V> of the values.
Example of use:
PCollection<KV<String, Long>> wordCounts = ...;
PCollection<Long> counts = wordCounts.apply(Values.<Long>create());
Each output element has the same timestamp and is in the same windows as its corresponding
input element, and the output PCollection has the same WindowFn associated with it as the input.
See also Keys.
name| Modifier and Type | Method and Description |
|---|---|
static <V> Values<V> |
create()
Returns a
Values<V> PTransform. |
PCollection<V> |
expand(PCollection<? extends KV<?,V>> in)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validatepublic static <V> Values<V> create()
Values<V> PTransform.V - the type of the values in the input PCollection, and the type of the
elements in the output PCollectionpublic PCollection<V> expand(PCollection<? extends KV<?,V>> in)
PTransformPTransform should be expanded on the given
InputT.
NOTE: This method should not be called directly. Instead apply the PTransform should
be applied to the InputT using the apply method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand in class PTransform<PCollection<? extends KV<?,V>>,PCollection<V>>