This project has retired. For details please refer to its
Attic page.
FirstElementPObject (Apache Crunch 0.9.0 API)
org.apache.crunch.materialize.pobject
Class FirstElementPObject<T>
java.lang.Object
org.apache.crunch.materialize.pobject.PObjectImpl<T,T>
org.apache.crunch.materialize.pobject.FirstElementPObject<T>
- Type Parameters:
T - The value type of this PObject.
- All Implemented Interfaces:
- PObject<T>
public class FirstElementPObject<T>
- extends PObjectImpl<T,T>
A concrete implementation of PObjectImpl that uses the first element in the backing
PCollection as the PObject value.
|
Method Summary |
T |
process(Iterable<T> input)
Transforms the provided Iterable, obtained from the backing PCollection,
into the value encapsulated by this PObject. |
FirstElementPObject
public FirstElementPObject(PCollection<T> collect)
- Constructs a new instance of this
PObject implementation.
- Parameters:
collect - The backing PCollection for this PObject.
process
public T process(Iterable<T> input)
- Transforms the provided Iterable, obtained from the backing
PCollection,
into the value encapsulated by this PObject.
- Specified by:
process in class PObjectImpl<T,T>
- Parameters:
input - An Iterable whose elements correspond to those of the backing PCollection.
- Returns:
- The value of this
PObject.
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.