org.apache.hadoop.hive.ql.io
Interface RecordUpdater

All Known Implementing Classes:
OrcRecordUpdater

public interface RecordUpdater

API for supporting updating records.


Method Summary
 void close(boolean abort)
          Close this updater.
 void delete(long currentTransaction, long originalTransaction, long rowId)
          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.
 SerDeStats getStats()
          Returns the statistics information
 void insert(long currentTransaction, Object row)
          Insert a new record into the table.
 void update(long currentTransaction, long originalTransaction, long rowId, Object row)
          Update an old record with a new set of values.
 

Method Detail

insert

void insert(long currentTransaction,
            Object row)
            throws IOException
Insert a new record into the table.

Parameters:
currentTransaction - the transaction id of the current transaction.
row - the row of data to insert
Throws:
IOException

update

void update(long currentTransaction,
            long originalTransaction,
            long rowId,
            Object row)
            throws IOException
Update an old record with a new set of values.

Parameters:
currentTransaction - the current transaction id
originalTransaction - the row's original transaction id
rowId - the original row id
row - the new values for the row
Throws:
IOException

delete

void delete(long currentTransaction,
            long originalTransaction,
            long rowId)
            throws IOException
Delete a row from the table.

Parameters:
currentTransaction - the current transaction id
originalTransaction - the rows original transaction id
rowId - the original row id
Throws:
IOException

flush

void flush()
           throws IOException
Flush the current set of rows to the underlying file system, so that they are available to readers. Most implementations will need to write additional state information when this is called, so it should only be called during streaming when a transaction is finished, but the RecordUpdater can't be closed yet.

Throws:
IOException

close

void close(boolean abort)
           throws IOException
Close this updater. No further calls are legal after this.

Parameters:
abort - Can the data since the last flush be discarded?
Throws:
IOException

getStats

SerDeStats getStats()
Returns the statistics information

Returns:
SerDeStats


Copyright © 2014 The Apache Software Foundation. All rights reserved.