java.io.Closeable, java.lang.AutoCloseableEditLogFileInputStream@Private
@Evolving
public abstract class EditLogInputStream
extends java.lang.Object
implements java.io.Closeable
EditLogOutputStream.| Constructor | Description |
|---|---|
EditLogInputStream() |
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
close() |
Close the stream.
|
java.lang.String |
getCurrentStreamName() |
Returns the name of the currently active underlying stream.
|
abstract long |
getFirstTxId() |
|
abstract long |
getLastTxId() |
|
abstract java.lang.String |
getName() |
|
abstract long |
getPosition() |
Get the "position" of in the stream.
|
abstract int |
getVersion(boolean verifyVersion) |
Get the layout version of the data in the stream.
|
abstract boolean |
isInProgress() |
Return true if this stream is in progress, false if it is finalized.
|
abstract boolean |
isLocalLog() |
Returns true if we are currently reading the log from a local disk or an
even faster data source (e.g.
|
abstract long |
length() |
Return the size of the current edits log or -1 if unknown.
|
protected abstract FSEditLogOp |
nextOp() |
Get the next operation from the stream storage.
|
protected FSEditLogOp |
nextValidOp() |
Get the next valid operation from the stream storage.
|
FSEditLogOp |
readOp() |
Read an operation from the stream
|
void |
resync() |
Position the stream so that a valid operation can be read from it with
readOp().
|
protected long |
scanNextOp() |
Go through the next operation from the stream storage.
|
abstract void |
setMaxOpSize(int maxOpSize) |
Set the maximum opcode size in bytes.
|
boolean |
skipUntil(long txid) |
Skip edit log operations up to a given transaction ID, or until the
end of the edit log is reached.
|
java.lang.String |
toString() |
public java.lang.String getCurrentStreamName()
public abstract java.lang.String getName()
public abstract long getFirstTxId()
public abstract long getLastTxId()
public abstract void close()
throws java.io.IOException
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablejava.io.IOException - if an error occurred while closingpublic FSEditLogOp readOp() throws java.io.IOException
java.io.IOException - if there is an error reading from the streampublic void resync()
protected abstract FSEditLogOp nextOp() throws java.io.IOException
java.io.IOException - if there is an error reading from the streamprotected long scanNextOp()
throws java.io.IOException
java.io.IOExceptionprotected FSEditLogOp nextValidOp()
public boolean skipUntil(long txid)
throws java.io.IOException
txid - The transaction ID to read up until.java.io.IOExceptionpublic abstract int getVersion(boolean verifyVersion)
throws java.io.IOException
java.io.IOException - if there is an error reading the versionpublic abstract long getPosition()
public abstract long length()
throws java.io.IOException
java.io.IOExceptionpublic abstract boolean isInProgress()
public abstract void setMaxOpSize(int maxOpSize)
public abstract boolean isLocalLog()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.