org.apache.hadoop.hive.ql.io.orc
Class OrcRecordUpdater

java.lang.Object
  extended by org.apache.hadoop.hive.ql.io.orc.OrcRecordUpdater
All Implemented Interfaces:
RecordUpdater

public class OrcRecordUpdater
extends Object
implements RecordUpdater

A RecordUpdater where the files are stored as ORC.


Nested Class Summary
static class OrcRecordUpdater.OrcOptions
          An extension to AcidOutputFormat that allows users to add additional options.
 
Field Summary
static String ACID_FORMAT
           
static String ACID_KEY_INDEX_NAME
           
static String ACID_STATS
           
static int ORC_ACID_VERSION
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACID_KEY_INDEX_NAME

public static final String ACID_KEY_INDEX_NAME
See Also:
Constant Field Values

ACID_FORMAT

public static final String ACID_FORMAT
See Also:
Constant Field Values

ACID_STATS

public static final String ACID_STATS
See Also:
Constant Field Values

ORC_ACID_VERSION

public static final int ORC_ACID_VERSION
See Also:
Constant Field Values
Method Detail

insert

public void insert(long currentTransaction,
                   Object row)
            throws IOException
Description copied from interface: RecordUpdater
Insert a new record into the table.

Specified by:
insert in interface RecordUpdater
Parameters:
currentTransaction - the transaction id of the current transaction.
row - the row of data to insert
Throws:
IOException

update

public void update(long currentTransaction,
                   long originalTransaction,
                   long rowId,
                   Object row)
            throws IOException
Description copied from interface: RecordUpdater
Update an old record with a new set of values.

Specified by:
update in interface RecordUpdater
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

public void delete(long currentTransaction,
                   long originalTransaction,
                   long rowId)
            throws IOException
Description copied from interface: RecordUpdater
Delete a row from the table.

Specified by:
delete in interface RecordUpdater
Parameters:
currentTransaction - the current transaction id
originalTransaction - the rows original transaction id
rowId - the original row id
Throws:
IOException

flush

public void flush()
           throws IOException
Description copied from interface: RecordUpdater
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.

Specified by:
flush in interface RecordUpdater
Throws:
IOException

close

public void close(boolean abort)
           throws IOException
Description copied from interface: RecordUpdater
Close this updater. No further calls are legal after this.

Specified by:
close in interface RecordUpdater
Parameters:
abort - Can the data since the last flush be discarded?
Throws:
IOException

getStats

public SerDeStats getStats()
Description copied from interface: RecordUpdater
Returns the statistics information

Specified by:
getStats in interface RecordUpdater
Returns:
SerDeStats


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