|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hive.ql.exec.Operator<GroupByDesc>
org.apache.hadoop.hive.ql.exec.GroupByOperator
public class GroupByOperator
GroupBy operator implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator |
|---|
Operator.OperatorFunc, Operator.State |
| Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator |
|---|
alias, childOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, done, groupKeyObject, groupKeyOI, HIVECOUNTERCREATEDFILES, HIVECOUNTERFATAL, id, inputObjInspectors, isLogInfoEnabled, operatorId, out, outputObjInspector, parentOperators, reporter, state, statsMap |
| Constructor Summary | |
|---|---|
GroupByOperator()
|
|
| Method Summary | |
|---|---|
boolean |
acceptLimitPushdown()
we can push the limit above GBY (running in Reducer), since that will generate single row for each group. |
void |
closeOp(boolean abort)
We need to forward all the aggregations to children. |
void |
endGroup()
|
void |
flush()
Forward all aggregations to children. |
protected void |
forward(Object[] keys,
GenericUDAFEvaluator.AggregationBuffer[] aggs)
Forward a record of keys and aggregation results. |
List<String> |
genColLists(HashMap<Operator<? extends OperatorDesc>,OpParseContext> opParseCtx)
|
String |
getName()
Implements the getName function for the Node Interface. |
static String |
getOperatorName()
|
OperatorType |
getType()
Return the type of the specific operator among the types in OperatorType. |
static javolution.util.FastBitSet |
groupingSet2BitSet(int value)
|
protected void |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization. |
protected GenericUDAFEvaluator.AggregationBuffer[] |
newAggregations()
|
void |
processOp(Object row,
int tag)
Process the row. |
protected void |
resetAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs)
|
void |
startGroup()
|
protected void |
updateAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs,
Object row,
ObjectInspector rowInspector,
boolean hashAggr,
boolean newEntryForHashAggr,
Object[][] lastInvoke)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient ExprNodeEvaluator[] keyFields
protected transient ObjectInspector[] keyObjectInspectors
protected transient ExprNodeEvaluator[][] aggregationParameterFields
protected transient ObjectInspector[][] aggregationParameterObjectInspectors
protected transient ObjectInspector[][] aggregationParameterStandardObjectInspectors
protected transient Object[][] aggregationParameterObjects
protected transient boolean[] aggregationIsDistinct
protected transient Map<Integer,Set<Integer>> distinctKeyAggrs
protected transient Map<Integer,Set<Integer>> nonDistinctKeyAggrs
protected transient List<Integer> nonDistinctAggrs
protected transient ArrayList<ObjectInspector> objectInspectors
protected transient KeyWrapper currentKeys
protected transient KeyWrapper newKeys
protected transient GenericUDAFEvaluator.AggregationBuffer[] aggregations
protected transient Object[][] aggregationsParametersLastInvoke
protected transient HashMap<KeyWrapper,GenericUDAFEvaluator.AggregationBuffer[]> hashAggregations
protected transient HashSet<KeyWrapper> keysCurrentGroup
protected transient boolean hashAggr
protected transient ObjectInspector[] currentKeyObjectInspectors
public static MemoryMXBean memoryMXBean
protected long maxMemory
protected float memoryThreshold
protected transient long maxHashTblMemory
protected transient int numEntriesHashTable
| Constructor Detail |
|---|
public GroupByOperator()
| Method Detail |
|---|
public static javolution.util.FastBitSet groupingSet2BitSet(int value)
protected void initializeOp(org.apache.hadoop.conf.Configuration hconf)
throws HiveException
Operator
initializeOp in class Operator<GroupByDesc>HiveException
protected GenericUDAFEvaluator.AggregationBuffer[] newAggregations()
throws HiveException
HiveException
protected void resetAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs)
throws HiveException
HiveException
protected void updateAggregations(GenericUDAFEvaluator.AggregationBuffer[] aggs,
Object row,
ObjectInspector rowInspector,
boolean hashAggr,
boolean newEntryForHashAggr,
Object[][] lastInvoke)
throws HiveException
HiveException
public void startGroup()
throws HiveException
startGroup in class Operator<GroupByDesc>HiveException
public void endGroup()
throws HiveException
endGroup in class Operator<GroupByDesc>HiveException
public void processOp(Object row,
int tag)
throws HiveException
Operator
processOp in class Operator<GroupByDesc>row - The object representing the row.tag - The tag of the row usually means which parent this row comes from.
Rows with the same tag should have exactly the same rowInspector
all the time.
HiveException
protected void forward(Object[] keys,
GenericUDAFEvaluator.AggregationBuffer[] aggs)
throws HiveException
keys - The keys in the record
HiveException
public void flush()
throws HiveException
flush in class Operator<GroupByDesc>HiveException
public void closeOp(boolean abort)
throws HiveException
closeOp in class Operator<GroupByDesc>HiveExceptionpublic List<String> genColLists(HashMap<Operator<? extends OperatorDesc>,OpParseContext> opParseCtx)
public String getName()
Operator
getName in interface NodegetName in class Operator<GroupByDesc>public static String getOperatorName()
public OperatorType getType()
Operator
getType in class Operator<GroupByDesc>public boolean acceptLimitPushdown()
acceptLimitPushdown in class Operator<GroupByDesc>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||