public class RowContainer<ROW extends List<Object>> extends Object implements AbstractRowContainer<ROW>, AbstractRowContainer.RowIterator<ROW>
AbstractRowContainer.RowIterator<ROW>| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
RowContainer(org.apache.hadoop.conf.Configuration jc,
org.apache.hadoop.mapred.Reporter reporter) |
RowContainer(int bs,
org.apache.hadoop.conf.Configuration jc,
org.apache.hadoop.mapred.Reporter reporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRow(ROW t)
add a row into the RowContainer
|
void |
clearRows()
Remove all elements in the RowContainer.
|
protected void |
close() |
void |
copyToDFSDirecory(org.apache.hadoop.fs.FileSystem destFs,
org.apache.hadoop.fs.Path destPath) |
protected boolean |
endOfCurrentReadBlock() |
ROW |
first() |
protected int |
getAddCursor() |
protected int |
getBlockSize() |
protected int |
getCurrentReadBlockSize() |
protected org.apache.hadoop.mapred.InputSplit[] |
getInputSplits() |
protected int |
getLastActualSplit() |
int |
getNumFlushedBlocks() |
protected ROW |
getReadBlockRow(int rowOffset) |
protected FileSinkOperator.RecordWriter |
getRecordWriter() |
boolean |
hasRows() |
boolean |
isSingleRow() |
ROW |
next() |
protected boolean |
nextBlock(int readIntoOffset) |
protected void |
resetCurrentReadBlockToFirstReadBlock() |
protected void |
resetReadBlocks() |
int |
rowCount()
Get the number of elements in the RowContainer.
|
AbstractRowContainer.RowIterator<ROW> |
rowIter() |
void |
setKeyObject(List<Object> dummyKey) |
protected org.apache.hadoop.mapred.RecordReader |
setReaderAtSplit(int splitNum) |
void |
setSerDe(AbstractSerDe sd,
ObjectInspector oi) |
void |
setTableDesc(TableDesc tblDesc) |
protected void |
setupWriter() |
protected void |
setWriteBlockAsReadBlock() |
protected boolean |
willSpill() |
public RowContainer(org.apache.hadoop.conf.Configuration jc,
org.apache.hadoop.mapred.Reporter reporter)
throws HiveException
HiveExceptionpublic RowContainer(int bs,
org.apache.hadoop.conf.Configuration jc,
org.apache.hadoop.mapred.Reporter reporter)
throws HiveException
HiveExceptionpublic void setSerDe(AbstractSerDe sd, ObjectInspector oi)
public void addRow(ROW t) throws HiveException
AbstractRowContaineraddRow in interface AbstractRowContainer<ROW extends List<Object>>t - rowHiveExceptionpublic AbstractRowContainer.RowIterator<ROW> rowIter()
rowIter in interface AbstractRowContainer<ROW extends List<Object>>public ROW first() throws HiveException
first in interface AbstractRowContainer.RowIterator<ROW extends List<Object>>HiveExceptionpublic ROW next() throws HiveException
next in interface AbstractRowContainer.RowIterator<ROW extends List<Object>>HiveExceptionpublic boolean hasRows()
hasRows in interface AbstractRowContainer<ROW extends List<Object>>public boolean isSingleRow()
isSingleRow in interface AbstractRowContainer<ROW extends List<Object>>public int rowCount()
rowCount in interface AbstractRowContainer<ROW extends List<Object>>protected boolean nextBlock(int readIntoOffset)
throws HiveException
HiveExceptionpublic void copyToDFSDirecory(org.apache.hadoop.fs.FileSystem destFs,
org.apache.hadoop.fs.Path destPath)
throws IOException,
HiveException
IOExceptionHiveExceptionpublic void clearRows()
throws HiveException
clearRows in interface AbstractRowContainer<ROW extends List<Object>>HiveExceptionpublic void setTableDesc(TableDesc tblDesc)
protected int getAddCursor()
protected final boolean willSpill()
protected int getBlockSize()
protected void setupWriter()
throws HiveException
HiveExceptionprotected FileSinkOperator.RecordWriter getRecordWriter()
protected org.apache.hadoop.mapred.InputSplit[] getInputSplits()
protected boolean endOfCurrentReadBlock()
protected int getCurrentReadBlockSize()
protected void setWriteBlockAsReadBlock()
protected org.apache.hadoop.mapred.RecordReader setReaderAtSplit(int splitNum)
throws IOException
IOExceptionprotected ROW getReadBlockRow(int rowOffset)
protected void resetCurrentReadBlockToFirstReadBlock()
protected void resetReadBlocks()
protected void close()
throws HiveException
HiveExceptionprotected int getLastActualSplit()
public int getNumFlushedBlocks()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.