public class FileSinkOperator extends TerminalOperator<FileSinkDesc> implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
FileSinkOperator.FSPaths |
static interface |
FileSinkOperator.RecordWriter
RecordWriter.
|
static class |
FileSinkOperator.TableIdEnum
TableIdEnum.
|
Operator.OperatorFunc, Operator.ProgressCounter, Operator.State
Modifier and Type | Field and Description |
---|---|
protected boolean |
autoDelete |
protected java.lang.String |
childSpecPathDynLinkedPartitions |
protected BytesWritable |
commonKey |
protected java.util.List<java.lang.String> |
dpColNames |
protected DynamicPartitionCtx |
dpCtx |
protected int |
dpStartCol |
protected java.util.List<java.lang.String> |
dpVals |
protected java.util.List<java.lang.Object> |
dpWritables |
protected FileSystem |
fs |
protected HiveOutputFormat<?,?> |
hiveOutputFormat |
protected boolean |
isCompressed |
protected boolean |
isSkewedStoredAsSubDirectories |
protected JobConf |
jc |
protected ListBucketingCtx |
lbCtx |
protected int |
maxPartitions |
protected int |
numDynParts |
protected Path |
parent |
protected FileSinkOperator.RecordWriter[] |
rowOutWriters |
protected Serializer |
serializer |
protected Path |
specPath |
protected FileSinkOperator.TableIdEnum |
tabIdEnum |
protected java.util.HashMap<java.lang.String,FileSinkOperator.FSPaths> |
valToPaths |
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 and Description |
---|
FileSinkOperator() |
Modifier and Type | Method and Description |
---|---|
void |
augmentPlan()
Called during semantic analysis as operators are being added
in order to give them a chance to compute any additional plan information
needed.
|
void |
checkOutputSpecs(FileSystem ignored,
JobConf job) |
void |
closeOp(boolean abort)
Operator specific close routine.
|
protected void |
fatalErrorMessage(java.lang.StringBuilder errMsg,
long counterCode)
Get the fatal error message based on counter's code.
|
java.lang.String |
getName()
Implements the getName function for the Node Interface.
|
static java.lang.String |
getOperatorName() |
OperatorType |
getType()
Return the type of the specific operator among the
types in OperatorType.
|
protected void |
initializeOp(Configuration hconf)
Operator specific initialization.
|
void |
jobCloseOp(Configuration hconf,
boolean success,
JobCloseFeedBack feedBack) |
void |
processOp(java.lang.Object row,
int tag)
Process the row.
|
acceptLimitPushdown, allInitializedParentsAreClosed, areAllParentsInitialized, assignCounterNameToEnum, checkFatalErrors, cleanUpInputFileChanged, cleanUpInputFileChangedOp, clone, close, columnNamesRowResolvedCanBeObtained, dump, dump, endGroup, flush, forward, getAdditionalCounters, getChildOperators, getChildren, getColumnExprMap, getConf, getConfiguration, getCounterNames, getCounterNameToEnum, getCounters, getDone, getExecContext, getGroupKeyObject, getIdentifier, getInputObjInspectors, getNextCntr, getNumChild, getNumParent, getOperatorId, getParentOperators, getSchema, getStats, getWrappedCounterName, incrCounter, initEvaluators, initEvaluators, initEvaluatorsAndReturnStruct, initialize, initialize, initializeChildren, initializeCounters, initializeLocalWork, initOperatorId, isUseBucketizedHiveInputFormat, jobClose, logStats, opAllowedAfterMapJoin, opAllowedBeforeMapJoin, opAllowedBeforeSortMergeJoin, opAllowedConvertMapJoin, passExecContext, preorderMap, process, processGroup, removeChild, removeChildAndAdoptItsChildren, removeChildren, removeParent, replaceChild, replaceParent, reset, resetId, resetLastEnumUsed, resetStats, setAlias, setChildOperators, setColumnExprMap, setConf, setCounterNames, setCounterNameToEnum, setDone, setExecContext, setGroupKeyObject, setId, setInputObjInspectors, setOperatorId, setOutputCollector, setParentOperators, setReporter, setSchema, setUseBucketizedHiveInputFormat, startGroup, supportAutomaticSortMergeJoin, supportSkewJoinOptimization, supportUnionRemoveOptimization, toString, toString, updateCounters
protected transient java.util.HashMap<java.lang.String,FileSinkOperator.FSPaths> valToPaths
protected transient int numDynParts
protected transient java.util.List<java.lang.String> dpColNames
protected transient DynamicPartitionCtx dpCtx
protected transient boolean isCompressed
protected transient Path parent
protected transient HiveOutputFormat<?,?> hiveOutputFormat
protected transient Path specPath
protected transient java.lang.String childSpecPathDynLinkedPartitions
protected transient int dpStartCol
protected transient java.util.List<java.lang.String> dpVals
protected transient java.util.List<java.lang.Object> dpWritables
protected transient FileSinkOperator.RecordWriter[] rowOutWriters
protected transient int maxPartitions
protected transient ListBucketingCtx lbCtx
protected transient boolean isSkewedStoredAsSubDirectories
protected transient FileSystem fs
protected transient Serializer serializer
protected transient BytesWritable commonKey
protected transient FileSinkOperator.TableIdEnum tabIdEnum
protected transient boolean autoDelete
protected transient JobConf jc
protected void initializeOp(Configuration hconf) throws HiveException
Operator
initializeOp
in class Operator<FileSinkDesc>
HiveException
public void processOp(java.lang.Object row, int tag) throws HiveException
Operator
processOp
in class Operator<FileSinkDesc>
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 fatalErrorMessage(java.lang.StringBuilder errMsg, long counterCode)
Operator
fatalErrorMessage
in class Operator<FileSinkDesc>
errMsg
- error message should be appended to this output parameter.counterCode
- input counter code.public void closeOp(boolean abort) throws HiveException
Operator
closeOp
in class Operator<FileSinkDesc>
HiveException
public java.lang.String getName()
Operator
getName
in interface Node
getName
in class Operator<FileSinkDesc>
public static java.lang.String getOperatorName()
public void jobCloseOp(Configuration hconf, boolean success, JobCloseFeedBack feedBack) throws HiveException
jobCloseOp
in class Operator<FileSinkDesc>
HiveException
public OperatorType getType()
Operator
getType
in class Operator<FileSinkDesc>
public void augmentPlan()
Operator
augmentPlan
in class Operator<FileSinkDesc>
public void checkOutputSpecs(FileSystem ignored, JobConf job) throws java.io.IOException
java.io.IOException
Copyright © 2012 The Apache Software Foundation