|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcascading.pipe.Pipe
cascading.pipe.Group
public class Group
The base class for GroupBy and CoGroup.
| Field Summary | |
|---|---|
protected Fields |
declaredFields
Field declaredFields |
protected Map<String,Fields> |
groupFieldsMap
Field groupFieldsMap |
protected Map<String,Fields> |
sortFieldsMap
Field sortFieldsMap |
| Fields inherited from class cascading.pipe.Pipe |
|---|
previous |
| Constructor Summary | |
|---|---|
Group(Pipe... pipes)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe)
Constructor Group creates a new Group instance where grouping occurs on Fields.ALL fields. |
|
Group(Pipe[] pipes,
Fields groupFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe[] pipes,
Fields[] groupFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe[] pipes,
Fields[] groupFields,
Fields declaredFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(Pipe[] pipes,
Fields groupFields,
Fields sortFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe[] pipes,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
Fields sortFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
int repeat)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
int repeat,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
int repeat,
Fields declaredFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe pipe,
Fields groupFields,
int repeat,
Fields declaredFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields)
Constructor Group creates a new Group instance. |
|
Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe... pipes)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe[] pipes,
Fields groupFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe[] pipes,
Fields[] groupFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe[] pipes,
Fields[] groupFields,
Fields declaredFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe[] pipe,
Fields groupFields,
Fields sortFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe[] pipes,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe pipe,
Fields groupFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe pipe,
Fields groupFields,
Fields sortFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe pipe,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields)
Constructor Group creates a new Group instance. |
|
Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields,
CoGrouper coGrouper)
Constructor Group creates a new Group instance. |
|
| Method Summary | |
|---|---|
void |
collectReduceGrouping(Scope incomingScope,
Scope outgoingScope,
TupleEntry entry,
OutputCollector output)
Method makeReduceGrouping makes a group Tuple[] of the form [ ['grpValue', ...] [ sourceName, [ 'value', ...] ] ] Since this is a join, we must track from which source a given tuple is sourced from so we can cogroup properly at the reduce stage. |
boolean |
equals(Object object)
|
Fields |
getDeclaredFields()
Method getDeclaredFields returns the declaredFields of this Group object. |
Map<String,Fields> |
getGroupingSelectors()
Method getGroupingSelectors returns the groupingSelectors of this Group object. |
String |
getName()
Get the name of this pipe. |
Pipe[] |
getPrevious()
Get all the upstream pipes this pipe is connected to. |
Map<String,Fields> |
getSortingSelectors()
Method getSortingSelectors returns the sortingSelectors of this Group object. |
int |
hashCode()
|
boolean |
isSorted()
Method isSorted returns true if this Group instance is sorting values other than the group fields. |
boolean |
isSortReversed()
Method isSortReversed returns true if sorting is reversed. |
Iterator<Tuple> |
iterateReduceValues(JobConf jobConf,
Set<Scope> incomingScopes,
Scope outgoingScope,
WritableComparable key,
Iterator values)
Method makeReduceValues wrapps the incoming Hadoop value stream as an iterator over Tuple instance. |
Scope |
outgoingScopeFor(Set<Scope> incomingScopes)
Method outgoingScopeFor returns the Scope this FlowElement hands off to the next FlowElement. |
protected void |
printInternal(StringBuffer buffer,
Scope scope)
|
Fields |
resolveFields(Scope scope)
Method resolveFields returns the actual field names represented by the given Scope. |
String |
toString()
|
Tuple |
unwrapGrouping(Tuple tuple)
Method unwrapGrouping tests if the given grouping key Tuple should be unwrapped if this Group instance is sorting. |
| Methods inherited from class cascading.pipe.Pipe |
|---|
getHeads, pipes, print, resolveIncomingOperationFields |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final Map<String,Fields> groupFieldsMap
protected Map<String,Fields> sortFieldsMap
protected Fields declaredFields
| Constructor Detail |
|---|
public Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields)
lhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldsdeclaredFields - of type Fields
public Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields,
CoGrouper coGrouper)
lhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldsdeclaredFields - of type FieldscoGrouper - of type CoGrouper
public Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
CoGrouper coGrouper)
lhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldscoGrouper - of type CoGrouper
public Group(Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields)
lhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type Fieldspublic Group(Pipe... pipes)
pipes - of type Pipe...
public Group(Pipe[] pipes,
Fields[] groupFields)
pipes - of type Pipe[]groupFields - of type Fields[]
public Group(String groupName,
Pipe[] pipes,
Fields[] groupFields)
groupName - of type Stringpipes - of type Pipe[]groupFields - of type Fields[]
public Group(Pipe[] pipes,
Fields[] groupFields,
Fields declaredFields,
CoGrouper coGrouper)
pipes - of type Pipe[]groupFields - of type Fields[]declaredFields - of type FieldscoGrouper - of type CoGrouper
public Group(String groupName,
Pipe[] pipes,
Fields[] groupFields,
Fields declaredFields,
CoGrouper coGrouper)
groupName - of type Stringpipes - of type Pipe[]groupFields - of type Fields[]declaredFields - of type FieldscoGrouper - of type CoGrouper
public Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields)
groupName - of type Stringlhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldsdeclaredFields - of type Fields
public Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
Fields declaredFields,
CoGrouper coGrouper)
groupName - of type Stringlhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldsdeclaredFields - of type FieldscoGrouper - of type CoGrouper
public Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields,
CoGrouper coGrouper)
groupName - of type Stringlhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type FieldscoGrouper - of type CoGrouper
public Group(String groupName,
Pipe lhs,
Fields lhsGroupFields,
Pipe rhs,
Fields rhsGroupFields)
groupName - of type Stringlhs - of type PipelhsGroupFields - of type Fieldsrhs - of type PiperhsGroupFields - of type Fields
public Group(String groupName,
Pipe... pipes)
groupName - of type Stringpipes - of type Pipe...
public Group(Pipe pipe,
Fields groupFields,
int repeat,
Fields declaredFields)
pipe - of type PipegroupFields - of type Fieldsrepeat - of type intdeclaredFields - of type Fields
public Group(Pipe pipe,
Fields groupFields,
int repeat,
Fields declaredFields,
CoGrouper coGrouper)
pipe - of type PipegroupFields - of type Fieldsrepeat - of type intdeclaredFields - of type FieldscoGrouper - of type CoGrouper
public Group(Pipe pipe,
Fields groupFields,
int repeat,
CoGrouper coGrouper)
pipe - of type PipegroupFields - of type Fieldsrepeat - of type intcoGrouper - of type CoGrouper
public Group(Pipe pipe,
Fields groupFields,
int repeat)
pipe - of type PipegroupFields - of type Fieldsrepeat - of type intpublic Group(Pipe pipe)
Fields.ALL fields.
pipe - of type Pipe
public Group(Pipe pipe,
Fields groupFields)
pipe - of type PipegroupFields - of type Fields
public Group(String groupName,
Pipe pipe,
Fields groupFields)
groupName - of type Stringpipe - of type PipegroupFields - of type Fields
public Group(Pipe pipe,
Fields groupFields,
Fields sortFields)
pipe - of type PipegroupFields - of type FieldssortFields - of type Fields
public Group(String groupName,
Pipe pipe,
Fields groupFields,
Fields sortFields)
groupName - of type Stringpipe - of type PipegroupFields - of type FieldssortFields - of type Fields
public Group(Pipe pipe,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
pipe - of type PipegroupFields - of type FieldssortFields - of type FieldsreverseOrder - of type boolean
public Group(String groupName,
Pipe pipe,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
groupName - of type Stringpipe - of type PipegroupFields - of type FieldssortFields - of type FieldsreverseOrder - of type boolean
public Group(Pipe[] pipes,
Fields groupFields)
pipes - of type PipegroupFields - of type Fields
public Group(String groupName,
Pipe[] pipes,
Fields groupFields)
groupName - of type Stringpipes - of type PipegroupFields - of type Fields
public Group(Pipe[] pipes,
Fields groupFields,
Fields sortFields)
pipes - of type PipegroupFields - of type FieldssortFields - of type Fields
public Group(String groupName,
Pipe[] pipe,
Fields groupFields,
Fields sortFields)
groupName - of type Stringpipe - of type PipegroupFields - of type FieldssortFields - of type Fields
public Group(Pipe[] pipes,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
pipes - of type PipegroupFields - of type FieldssortFields - of type FieldsreverseOrder - of type boolean
public Group(String groupName,
Pipe[] pipes,
Fields groupFields,
Fields sortFields,
boolean reverseOrder)
groupName - of type Stringpipes - of type Pipe[]groupFields - of type FieldssortFields - of type FieldsreverseOrder - of type boolean| Method Detail |
|---|
public Fields getDeclaredFields()
public String getName()
Pipe
getName in class Pipepublic Pipe[] getPrevious()
Pipe
getPrevious in class Pipepublic Map<String,Fields> getGroupingSelectors()
public Map<String,Fields> getSortingSelectors()
public boolean isSorted()
public boolean isSortReversed()
public void collectReduceGrouping(Scope incomingScope,
Scope outgoingScope,
TupleEntry entry,
OutputCollector output)
throws IOException
incomingScope - of type ScopeoutgoingScope - of type Scopeentry - of type TupleEntryoutput - of type OutputCollector
IOException - thrown by OutputCollector on collectpublic Tuple unwrapGrouping(Tuple tuple)
tuple - of type Tuple
public Iterator<Tuple> iterateReduceValues(JobConf jobConf,
Set<Scope> incomingScopes,
Scope outgoingScope,
WritableComparable key,
Iterator values)
Tuple instance.
jobConf - of type JobConfincomingScopes - of type SetoutgoingScope - of type Scopekey - of type WritableComparablevalues - of type Iterator @return Iteratorpublic Scope outgoingScopeFor(Set<Scope> incomingScopes)
FlowElement
outgoingScopeFor in interface FlowElementoutgoingScopeFor in class PipeincomingScopes - of type SetFlowElement#outgoingScopeFor(Set) public Fields resolveFields(Scope scope)
FlowElement
resolveFields in interface FlowElementresolveFields in class Pipescope - of type Scope
FlowElement.resolveFields(Scope)public boolean equals(Object object)
equals in class Pipepublic int hashCode()
hashCode in class Pipepublic String toString()
toString in class Pipe
protected void printInternal(StringBuffer buffer,
Scope scope)
printInternal in class Pipe
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||