|
||||||||||
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<fileSinkDesc>
org.apache.hadoop.hive.ql.exec.FileSinkOperator
public class FileSinkOperator
File Sink operator implementation
Nested Class Summary | |
---|---|
static interface |
FileSinkOperator.RecordWriter
|
static class |
FileSinkOperator.TableIdEnum
|
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.exec.Operator |
---|
Operator.OperatorFunc, Operator.ProgressCounter, Operator.State |
Field Summary | |
---|---|
protected boolean |
autoDelete
|
protected org.apache.hadoop.io.BytesWritable |
commonKey
|
protected org.apache.hadoop.fs.Path |
finalPath
|
protected org.apache.hadoop.fs.FileSystem |
fs
|
protected org.apache.hadoop.fs.Path |
outPath
|
protected FileSinkOperator.RecordWriter |
outWriter
|
protected Serializer |
serializer
|
protected FileSinkOperator.TableIdEnum |
tabIdEnum
|
Fields inherited from class org.apache.hadoop.hive.ql.exec.Operator |
---|
alias, beginTime, childOperators, childOperatorsArray, childOperatorsTag, colExprMap, conf, counterNames, counterNameToEnum, counters, done, fatalErrorCntr, id, inputObjInspectors, inputRows, LOG, numInputRowsCntr, numOutputRowsCntr, operatorId, out, outputObjInspector, outputRows, parentOperators, reporter, state, statsMap, timeTakenCntr, totalTime |
Constructor Summary | |
---|---|
FileSinkOperator()
|
Method Summary | |
---|---|
void |
closeOp(boolean abort)
Operator specific close routine. |
String |
getName()
Implements the getName function for the Node Interface. |
static FileSinkOperator.RecordWriter |
getRecordWriter(org.apache.hadoop.mapred.JobConf jc,
HiveOutputFormat<?,?> hiveOutputFormat,
Class<? extends org.apache.hadoop.io.Writable> valueClass,
boolean isCompressed,
Properties tableProp,
org.apache.hadoop.fs.Path outPath)
|
int |
getType()
Should be overridden to return the type of the specific operator among the types in OperatorType |
protected void |
initializeOp(org.apache.hadoop.conf.Configuration hconf)
Operator specific initialization. |
void |
jobClose(org.apache.hadoop.conf.Configuration hconf,
boolean success)
Unlike other operator interfaces which are called from map or reduce task, jobClose is called from the jobclient side once the job has completed |
void |
processOp(Object row,
int tag)
Process the row. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected transient FileSinkOperator.RecordWriter outWriter
protected transient org.apache.hadoop.fs.FileSystem fs
protected transient org.apache.hadoop.fs.Path outPath
protected transient org.apache.hadoop.fs.Path finalPath
protected transient Serializer serializer
protected transient org.apache.hadoop.io.BytesWritable commonKey
protected transient FileSinkOperator.TableIdEnum tabIdEnum
protected transient boolean autoDelete
Constructor Detail |
---|
public FileSinkOperator()
Method Detail |
---|
protected void initializeOp(org.apache.hadoop.conf.Configuration hconf) throws HiveException
Operator
initializeOp
in class Operator<fileSinkDesc>
HiveException
public static FileSinkOperator.RecordWriter getRecordWriter(org.apache.hadoop.mapred.JobConf jc, HiveOutputFormat<?,?> hiveOutputFormat, Class<? extends org.apache.hadoop.io.Writable> valueClass, boolean isCompressed, Properties tableProp, org.apache.hadoop.fs.Path outPath) throws IOException, HiveException
IOException
HiveException
public void processOp(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
public void closeOp(boolean abort) throws HiveException
Operator
closeOp
in class Operator<fileSinkDesc>
HiveException
public String getName()
Operator
getName
in interface Node
getName
in class Operator<fileSinkDesc>
public void jobClose(org.apache.hadoop.conf.Configuration hconf, boolean success) throws HiveException
Operator
jobClose
in class Operator<fileSinkDesc>
hconf
- Configuration with with which job was submittedsuccess
- whether the job was completed successfully or not
HiveException
public int getType()
Operator
getType
in class Operator<fileSinkDesc>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |