@InterfaceAudience.Private @InterfaceStability.Evolving public class FSEditLog extends Object
Modifier and Type | Method and Description |
---|---|
RemoteEditLogManifest |
getEditLogManifest(long fromTxId)
Return a manifest of what finalized edit logs are available
|
JournalSet |
getJournalSet()
Used only by tests.
|
long |
getLastWrittenTxId()
Return the transaction ID of the last transaction written to the log.
|
void |
initJournalsForWrite() |
void |
initSharedJournalsForRead() |
boolean |
isOpenForRead() |
void |
logCloseFile(String path,
INodeFile newNode)
Add close lease record to edit log.
|
void |
logMkDir(String path,
INode newNode)
Add create directory record to edit log
|
void |
logOpenFile(String path,
INodeFileUnderConstruction newNode,
boolean toLogRpcIds)
Add open lease record to edit log.
|
void |
logSync()
Sync all modifications done by this thread.
|
void |
logUpdateBlocks(String path,
INodeFileUnderConstruction file,
boolean toLogRpcIds) |
void |
purgeLogsOlderThan(long minTxIdToKeep)
Archive any log files that are older than the given txid.
|
void |
selectInputStreams(Collection<EditLogInputStream> streams,
long fromTxId,
boolean inProgressOk,
boolean forReading)
Get a list of edit log input streams.
|
Collection<EditLogInputStream> |
selectInputStreams(long fromTxId,
long toAtLeastTxId) |
Collection<EditLogInputStream> |
selectInputStreams(long fromTxId,
long toAtLeastTxId,
MetaRecoveryContext recovery,
boolean inProgressOk)
Select a list of input streams to load
|
Collection<EditLogInputStream> |
selectInputStreams(long fromTxId,
long toAtLeastTxId,
MetaRecoveryContext recovery,
boolean inProgressOk,
boolean forReading)
Select a list of input streams.
|
public void initJournalsForWrite()
public void initSharedJournalsForRead()
public boolean isOpenForRead()
public long getLastWrittenTxId()
public void logSync()
public void logOpenFile(String path, INodeFileUnderConstruction newNode, boolean toLogRpcIds)
public void logCloseFile(String path, INodeFile newNode)
public void logUpdateBlocks(String path, INodeFileUnderConstruction file, boolean toLogRpcIds)
public JournalSet getJournalSet()
public RemoteEditLogManifest getEditLogManifest(long fromTxId) throws IOException
IOException
public void purgeLogsOlderThan(long minTxIdToKeep)
minTxIdToKeep
- the lowest transaction ID that should be retainedpublic void selectInputStreams(Collection<EditLogInputStream> streams, long fromTxId, boolean inProgressOk, boolean forReading) throws IOException
fromTxId
- the first transaction id we want to readinProgressOk
- whether or not in-progress streams should be returnedforReading
- whether or not the caller intends to read from the edit logsIOException
- if the underlying storage has an error or is otherwise
inaccessiblepublic Collection<EditLogInputStream> selectInputStreams(long fromTxId, long toAtLeastTxId) throws IOException
IOException
public Collection<EditLogInputStream> selectInputStreams(long fromTxId, long toAtLeastTxId, MetaRecoveryContext recovery, boolean inProgressOk) throws IOException
IOException
public Collection<EditLogInputStream> selectInputStreams(long fromTxId, long toAtLeastTxId, MetaRecoveryContext recovery, boolean inProgressOk, boolean forReading) throws IOException
fromTxId
- first transaction in the selected streamstoAtLeast
- the selected streams must contain this transactioninProgessOk
- set to true if in-progress streams are OKforReading
- whether or not to use the streams to load the edit logIOException
Copyright © 2013 Apache Software Foundation. All rights reserved.