public class HDFSTransactionLog extends AbstractTransactionLog
AbstractTransactionLog.Entry
timestamp
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, isClosed
public 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
AbstractTransactionLog
TransactionEdit
objects.createWriter
in class AbstractTransactionLog
IOException
public String getName()
getName
in interface TransactionLog
getName
in class AbstractTransactionLog
public TransactionLogReader getReader() throws IOException
getReader
in interface TransactionLog
getReader
in class AbstractTransactionLog
IOException
Copyright © 2017 The Apache Software Foundation. All rights reserved.