public class OrcRecordUpdater extends Object implements RecordUpdater
row coming in (as in insert(long, Object)
for example), is a struct like <RecordIdentifier, f1, ... fn> but what is written to the file
* is <op, owid, writerId, rowid, cwid, <f1, ... fn>> (see createEventObjectInspector(ObjectInspector))
So there are OIs here to make the translation.| Modifier and Type | Field and Description |
|---|---|
static Collection |
ALL_ACID_ROW_NAMES |
static int |
ROW |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean abort)
Close this updater.
|
void |
delete(long currentWriteId,
Object row)
Delete a row from the table.
|
void |
flush()
Flush the current set of rows to the underlying file system, so that
they are available to readers.
|
long |
getBufferedRowCount()
Returns the number of rows in memory before flush().
|
org.apache.hadoop.fs.Path |
getDeleteFilePath() |
SerDeStats |
getStats()
Returns the statistics information
|
org.apache.hadoop.fs.Path |
getUpdatedFilePath()
Returns the path of the file this updater wrote to
|
void |
insert(long currentWriteId,
Object row)
Insert a new record into the table.
|
String |
toString() |
void |
update(long currentWriteId,
Object row)
Update an old record with a new set of values.
|
public static final int ROW
public static final Collection ALL_ACID_ROW_NAMES
public void insert(long currentWriteId,
Object row)
throws IOException
RecordUpdaterinsert in interface RecordUpdatercurrentWriteId - the table write id of the current transaction.row - the row of data to insertIOExceptionpublic void update(long currentWriteId,
Object row)
throws IOException
RecordUpdaterupdate in interface RecordUpdatercurrentWriteId - the current write idrow - the new values for the rowIOExceptionpublic void delete(long currentWriteId,
Object row)
throws IOException
RecordUpdaterdelete in interface RecordUpdatercurrentWriteId - the current write idIOExceptionpublic void flush()
throws IOException
RecordUpdaterflush in interface RecordUpdaterIOExceptionpublic void close(boolean abort)
throws IOException
RecordUpdaterclose in interface RecordUpdaterabort - Can the data since the last flush be discarded?IOExceptionpublic SerDeStats getStats()
RecordUpdatergetStats in interface RecordUpdaterpublic long getBufferedRowCount()
RecordUpdatergetBufferedRowCount in interface RecordUpdaterpublic org.apache.hadoop.fs.Path getUpdatedFilePath()
RecordUpdatergetUpdatedFilePath in interface RecordUpdaterpublic org.apache.hadoop.fs.Path getDeleteFilePath()
Copyright © 2024 The Apache Software Foundation. All rights reserved.