- Tuple #31
- cascading.tuple.Tuple
- Data is represented as Tuple in Cascading
- Elements in a Tuple is represented by Fields #32
- ----- Methods
- size(): Tuple
- Used to create a Tuple of given size #31
- getObject(): Object
- Returns the element at a given position #32
- ----- Related
- getBoolean(), getString(), getFloat(), getDouble(), getInteger()
- Fields #32
- cascading.tuple.Fields
- Provides storage for field metadata : names, types, comparators & type coercion
- ----- Example
- Fields people = new Fields("first_name", "last_name")
- ----- Useful Field sets
- Fields.ALL #34
- A wild card that represents all the current available fields
- Fields.UNKNOWN
- Fields.ARGS
- ....
- Can be used as both 'declarators' and 'selectors' #34
- Data typing & coercion
- For implicit conversion of one type to another
- ----- Example
- pipe = new Coerce(new Fields("timestamp"), Long.class)
- Fields simple = new Fields ("age", Long.class);
- ----- Methods
- TupleEntry.getString()
Wednesday, October 12, 2016
Tuple, Fields & Data type coercion...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment