public class HDFSTransactionLogReaderV2 extends Object implements TransactionLogReader
TransactionLogReader that can read v2 version of Transaction logs. The logs are expected to
 have commit markers that indicates the size of the batch of TransactionEdits (follows the marker),
 that were synced together. If the expected number of TransactionEdits are not present then that set of
 TransactionEdits are discarded.| Constructor and Description | 
|---|
HDFSTransactionLogReaderV2(org.apache.hadoop.io.SequenceFile.Reader reader)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
close()  | 
TransactionEdit | 
next()
Returns the next  
TransactionEdit from the log file, based on the current position, or null
 if the end of the file has been reached. | 
TransactionEdit | 
next(TransactionEdit reuse)
Populates  
reuse with the next TransactionEdit, based on the reader's current position in the
 log file. | 
public HDFSTransactionLogReaderV2(org.apache.hadoop.io.SequenceFile.Reader reader)
public void close()
           throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic TransactionEdit next() throws IOException
TransactionLogReaderTransactionEdit from the log file, based on the current position, or null
 if the end of the file has been reached.next in interface TransactionLogReaderIOExceptionpublic TransactionEdit next(TransactionEdit reuse) throws IOException
TransactionLogReaderreuse with the next TransactionEdit, based on the reader's current position in the
 log file.next in interface TransactionLogReaderreuse - The TransactionEdit instance to populate with the log entry data.TransactionEdit instance, or null if the end of the file has been reached.IOException - If an error is encountered reading the log data.Copyright © 2016 The Apache Software Foundation. All rights reserved.