|
||||||||||
| 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<T>
org.apache.hadoop.hive.ql.exec.TerminalOperator<ReduceSinkDesc>
org.apache.hadoop.hive.ql.exec.ReduceSinkOperator
public class ReduceSinkOperator
Reduce Sink Operator sends output to the reduce stage.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator |
|---|
Operator.OperatorFunc, Operator.State |
| Field Summary | |
|---|---|
protected ExprNodeEvaluator[] |
bucketEval
Evaluators for bucketing columns. |
protected Object[][] |
cachedKeys
This two dimensional array holds key data and a corresponding Union object which contains the tag identifying the aggregate expression for distinct columns. |
protected Object[] |
cachedValues
|
protected List<List<Integer>> |
distinctColIndices
|
protected ExprNodeEvaluator[] |
keyEval
The evaluators for the key columns. |
protected boolean |
keyIsText
|
protected ObjectInspector |
keyObjectInspector
|
protected Serializer |
keySerializer
|
protected HiveKey |
keyWritable
|
protected int |
numDistinctExprs
|
protected int |
numDistributionKeys
|
protected org.apache.hadoop.mapred.OutputCollector |
out
|
protected ExprNodeEvaluator[] |
partitionEval
The evaluators for the partition columns (CLUSTER BY or DISTRIBUTE BY in Hive language). |
protected Random |
random
|
protected TopNHash |
reducerHash
|
protected byte[] |
tagByte
|
protected ExprNodeEvaluator[] |
valueEval
The evaluators for the value columns. |
protected ObjectInspector |
valueObjectInspector
|
protected Serializer |
valueSerializer
|
| 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, LOG, operatorId, outputObjInspector, parentOperators, reporter, state, statsMap |
| Constructor Summary | |
|---|---|
ReduceSinkOperator()
|
|
| Method Summary | |
|---|---|
protected void |
closeOp(boolean abort)
Operator specific close routine. |
void |
collect(byte[] key,
byte[] value,
int hash)
|
protected void |
collect(org.apache.hadoop.io.BytesWritable keyWritable,
org.apache.hadoop.io.Writable valueWritable)
|
String[] |
getInputAliases()
|
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. |
protected static StructObjectInspector |
initEvaluatorsAndReturnStruct(ExprNodeEvaluator[] evals,
List<List<Integer>> distinctColIndices,
List<String> outputColNames,
int length,
ObjectInspector rowInspector)
Initializes array of ExprNodeEvaluator. |
protected void |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization. |
boolean |
opAllowedBeforeMapJoin()
|
void |
processOp(Object row,
int tag)
Process the row. |
void |
setInputAliases(String[] inputAliases)
|
void |
setOutputCollector(org.apache.hadoop.mapred.OutputCollector _out)
|
protected HiveKey |
toHiveKey(Object obj,
int tag,
Integer distLength)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient org.apache.hadoop.mapred.OutputCollector out
protected transient ExprNodeEvaluator[] keyEval
protected transient ExprNodeEvaluator[] valueEval
protected transient ExprNodeEvaluator[] partitionEval
protected transient ExprNodeEvaluator[] bucketEval
protected transient Serializer keySerializer
protected transient boolean keyIsText
protected transient Serializer valueSerializer
protected transient byte[] tagByte
protected transient int numDistributionKeys
protected transient int numDistinctExprs
protected transient TopNHash reducerHash
protected transient HiveKey keyWritable
protected transient ObjectInspector keyObjectInspector
protected transient ObjectInspector valueObjectInspector
protected transient Object[] cachedValues
protected transient List<List<Integer>> distinctColIndices
protected transient Object[][] cachedKeys
ExprNodeColumnEvaluator
protected transient Random random
| Constructor Detail |
|---|
public ReduceSinkOperator()
| Method Detail |
|---|
public void setInputAliases(String[] inputAliases)
public String[] getInputAliases()
public void setOutputCollector(org.apache.hadoop.mapred.OutputCollector _out)
setOutputCollector in class Operator<ReduceSinkDesc>
protected void initializeOp(org.apache.hadoop.conf.Configuration hconf)
throws HiveException
Operator
initializeOp in class Operator<ReduceSinkDesc>HiveException
protected static StructObjectInspector initEvaluatorsAndReturnStruct(ExprNodeEvaluator[] evals,
List<List<Integer>> distinctColIndices,
List<String> outputColNames,
int length,
ObjectInspector rowInspector)
throws HiveException
Operator.initEvaluatorsAndReturnStruct(ExprNodeEvaluator[], List, ObjectInspector)
HiveException
public void processOp(Object row,
int tag)
throws HiveException
Operator
processOp in class Operator<ReduceSinkDesc>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 HiveKey toHiveKey(Object obj,
int tag,
Integer distLength)
throws SerDeException
SerDeException
public void collect(byte[] key,
byte[] value,
int hash)
throws IOException
collect in interface TopNHash.BinaryCollectorIOException
protected void collect(org.apache.hadoop.io.BytesWritable keyWritable,
org.apache.hadoop.io.Writable valueWritable)
throws IOException
IOException
protected void closeOp(boolean abort)
throws HiveException
Operator
closeOp in class Operator<ReduceSinkDesc>HiveExceptionpublic String getName()
Operator
getName in interface NodegetName in class Operator<ReduceSinkDesc>public static String getOperatorName()
public OperatorType getType()
Operator
getType in class Operator<ReduceSinkDesc>public boolean opAllowedBeforeMapJoin()
opAllowedBeforeMapJoin in class Operator<ReduceSinkDesc>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||