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.apache.commons.logging.Log |
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 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(SerDe 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
HiveException
public RowContainer(int bs, org.apache.hadoop.conf.Configuration jc, org.apache.hadoop.mapred.Reporter reporter) throws HiveException
HiveException
public void setSerDe(SerDe sd, ObjectInspector oi)
public void addRow(ROW t) throws HiveException
AbstractRowContainer
addRow
in interface AbstractRowContainer<ROW extends List<Object>>
t
- rowHiveException
public 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>>
HiveException
public ROW next() throws HiveException
next
in interface AbstractRowContainer.RowIterator<ROW extends List<Object>>
HiveException
public 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
HiveException
public void copyToDFSDirecory(org.apache.hadoop.fs.FileSystem destFs, org.apache.hadoop.fs.Path destPath) throws IOException, HiveException
IOException
HiveException
public void clearRows() throws HiveException
clearRows
in interface AbstractRowContainer<ROW extends List<Object>>
HiveException
public void setTableDesc(TableDesc tblDesc)
protected int getAddCursor()
protected final boolean willSpill()
protected int getBlockSize()
protected void setupWriter() throws HiveException
HiveException
protected 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
IOException
protected ROW getReadBlockRow(int rowOffset)
protected void resetCurrentReadBlockToFirstReadBlock()
protected void resetReadBlocks()
protected void close() throws HiveException
HiveException
Copyright © 2017 The Apache Software Foundation. All rights reserved.