org.apache.hadoop.hive.ql.exec
Class MapOperator

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.Operator<MapredWork>
      extended by org.apache.hadoop.hive.ql.exec.MapOperator
All Implemented Interfaces:
Serializable, Node

public class MapOperator
extends Operator<MapredWork>
implements Serializable

Map operator. This triggers overall map side processing. This is a little different from regular operators in that it starts off by processing a Writable data structure from a Table (instead of a Hive Object).

See Also:
Serialized Form

Nested Class Summary
static class MapOperator.Counter
          Counter.
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator
Operator.OperatorFunc, Operator.ProgressCounter, Operator.State
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator
alias, beginTime, childOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, counterNames, counterNameToEnum, counters, done, fatalErrorCntr, groupKeyObject, id, inputObjInspectors, inputRows, isLogInfoEnabled, LOG, numInputRowsCntr, numOutputRowsCntr, operatorId, out, outputObjInspector, outputRows, parentOperators, reporter, state, statsMap, timeTakenCntr, totalTime
 
Constructor Summary
MapOperator()
           
 
Method Summary
 void cleanUpInputFileChangedOp()
           
 void closeOp(boolean abort)
          close extra child operators that are initialized but are not executed.
 String getName()
          Implements the getName function for the Node Interface.
 OperatorType getType()
          Return the type of the specific operator among the types in OperatorType.
 void initializeAsRoot(org.apache.hadoop.conf.Configuration hconf, MapredWork mrwork)
          Initializes this map op as the root of the tree.
 void initializeOp(org.apache.hadoop.conf.Configuration hconf)
          Operator specific initialization.
 void process(org.apache.hadoop.io.Writable value)
           
 void processOp(Object row, int tag)
          Process the row.
 void setChildren(org.apache.hadoop.conf.Configuration hconf)
           
 
Methods inherited from class org.apache.hadoop.hive.ql.exec.Operator
allInitializedParentsAreClosed, areAllParentsInitialized, assignCounterNameToEnum, augmentPlan, checkFatalErrors, cleanUpInputFileChanged, close, dump, dump, endGroup, fatalErrorMessage, forward, getChildOperators, getChildren, getColumnExprMap, getConf, getCounterNames, getCounterNameToEnum, getCounters, getDone, getExecContext, getGroupKeyObject, getIdentifier, getInputObjInspectors, getOperatorId, getParentOperators, getSchema, getStats, incrCounter, initEvaluators, initEvaluators, initEvaluatorsAndReturnStruct, initialize, initializeChildren, initializeCounters, initializeLocalWork, initOperatorId, jobClose, logStats, passExecContext, preorderMap, process, removeChild, removeChildAndAdoptItsChildren, removeParent, replaceChild, replaceParent, reset, resetId, resetLastEnumUsed, resetStats, setAlias, setChildOperators, setColumnExprMap, setConf, setCounterNames, setCounterNameToEnum, setDone, setExecContext, setGroupKeyObject, setId, setInputObjInspectors, setOperatorId, setOutputCollector, setParentOperators, setReporter, setSchema, startGroup, updateCounters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapOperator

public MapOperator()
Method Detail

initializeAsRoot

public void initializeAsRoot(org.apache.hadoop.conf.Configuration hconf,
                             MapredWork mrwork)
                      throws HiveException
Initializes this map op as the root of the tree. It sets JobConf & MapRedWork and starts initialization of the operator tree rooted at this op.

Parameters:
hconf -
mrwork -
Throws:
HiveException

setChildren

public void setChildren(org.apache.hadoop.conf.Configuration hconf)
                 throws HiveException
Throws:
HiveException

initializeOp

public void initializeOp(org.apache.hadoop.conf.Configuration hconf)
                  throws HiveException
Description copied from class: Operator
Operator specific initialization.

Overrides:
initializeOp in class Operator<MapredWork>
Throws:
HiveException

closeOp

public void closeOp(boolean abort)
             throws HiveException
close extra child operators that are initialized but are not executed.

Overrides:
closeOp in class Operator<MapredWork>
Throws:
HiveException

cleanUpInputFileChangedOp

public void cleanUpInputFileChangedOp()
                               throws HiveException
Overrides:
cleanUpInputFileChangedOp in class Operator<MapredWork>
Throws:
HiveException

process

public void process(org.apache.hadoop.io.Writable value)
             throws HiveException
Throws:
HiveException

processOp

public void processOp(Object row,
                      int tag)
               throws HiveException
Description copied from class: Operator
Process the row.

Specified by:
processOp in class Operator<MapredWork>
Parameters:
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.
Throws:
HiveException

getName

public String getName()
Description copied from class: Operator
Implements the getName function for the Node Interface.

Specified by:
getName in interface Node
Overrides:
getName in class Operator<MapredWork>
Returns:
the name of the operator

getType

public OperatorType getType()
Description copied from class: Operator
Return the type of the specific operator among the types in OperatorType.

Specified by:
getType in class Operator<MapredWork>
Returns:
OperatorType.*


Copyright © 2011 The Apache Software Foundation