org.apache.crunch.lib
Class Channels
java.lang.Object
org.apache.crunch.lib.Channels
public class Channels
- extends Object
Utilities for splitting Pair
instances emitted by DoFn
into
separate PCollection
instances. A typical motivation for this might
be to separate standard output from error output of a DoFn.
- Author:
- Brandon Inman
Method Summary |
static
|
split(PCollection<Pair<T,U>> pCollection)
Splits a PCollection of any Pair of objects into a Pair of
PCollection}, to allow for the output of a DoFn to be handled using
separate channels. |
static
|
split(PCollection<Pair<T,U>> pCollection,
PType<T> firstPType,
PType<U> secondPType)
Splits a PCollection of any Pair of objects into a Pair of
PCollection}, to allow for the output of a DoFn to be handled using
separate channels. |
Channels
public Channels()
split
public static <T,U> Pair<PCollection<T>,PCollection<U>> split(PCollection<Pair<T,U>> pCollection)
- Splits a
PCollection
of any Pair
of objects into a Pair of
PCollection}, to allow for the output of a DoFn to be handled using
separate channels.
- Parameters:
pCollection
- The PCollection
to split
split
public static <T,U> Pair<PCollection<T>,PCollection<U>> split(PCollection<Pair<T,U>> pCollection,
PType<T> firstPType,
PType<U> secondPType)
- Splits a
PCollection
of any Pair
of objects into a Pair of
PCollection}, to allow for the output of a DoFn to be handled using
separate channels.
- Parameters:
pCollection
- The PCollection
to splitfirstPType
- The PType
for the first collectionsecondPType
- The PType
for the second collection
- Returns:
Pair
of PCollection
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.