public class HDFSTransactionLog extends AbstractTransactionLog
AbstractTransactionLog.Entrytimestamp| Constructor and Description |
|---|
HDFSTransactionLog(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration hConf,
org.apache.hadoop.fs.Path logPath,
long timestamp,
MetricsCollector metricsCollector)
Creates a new HDFS-backed write-ahead log for storing transaction state.
|
| Modifier and Type | Method and Description |
|---|---|
protected TransactionLogWriter |
createWriter()
Returns a log writer to be used for appending any new
TransactionEdit objects. |
String |
getName() |
TransactionLogReader |
getReader() |
append, append, close, getTimestamp, init, isClosedpublic HDFSTransactionLog(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration hConf,
org.apache.hadoop.fs.Path logPath,
long timestamp,
MetricsCollector metricsCollector)
fs - Open FileSystem instance for opening log files in HDFS.hConf - HDFS cluster configuration.logPath - Path to the log file.protected TransactionLogWriter createWriter() throws IOException
AbstractTransactionLogTransactionEdit objects.createWriter in class AbstractTransactionLogIOExceptionpublic String getName()
getName in interface TransactionLoggetName in class AbstractTransactionLogpublic TransactionLogReader getReader() throws IOException
getReader in interface TransactionLoggetReader in class AbstractTransactionLogIOExceptionCopyright © 2016 The Apache Software Foundation. All rights reserved.