@InterfaceAudience.Private public interface QJournalProtocol
QuorumJournalManager
and each JournalNode.
This is responsible for sending edits as well as coordinating
recovery of the nodes.| Modifier and Type | Field and Description |
|---|---|
static long |
versionID |
| Modifier and Type | Method and Description |
|---|---|
void |
acceptRecovery(RequestInfo reqInfo,
QJournalProtocolProtos.SegmentStateProto stateToAccept,
URL fromUrl)
Accept a proposed recovery for the given transaction ID.
|
void |
finalizeLogSegment(RequestInfo reqInfo,
long startTxId,
long endTxId)
Finalize the given log segment on the JournalNode.
|
void |
format(String journalId,
NamespaceInfo nsInfo)
Format the underlying storage for the given namespace.
|
QJournalProtocolProtos.GetEditLogManifestResponseProto |
getEditLogManifest(String jid,
long sinceTxId,
boolean forReading,
boolean inProgressOk) |
QJournalProtocolProtos.GetJournalStateResponseProto |
getJournalState(String journalId)
Get the current state of the journal, including the most recent
epoch number and the HTTP port.
|
void |
heartbeat(RequestInfo reqInfo)
Heartbeat.
|
boolean |
isFormatted(String journalId) |
void |
journal(RequestInfo reqInfo,
long segmentTxId,
long firstTxnId,
int numTxns,
byte[] records)
Journal edit records.
|
QJournalProtocolProtos.NewEpochResponseProto |
newEpoch(String journalId,
NamespaceInfo nsInfo,
long epoch)
Begin a new epoch.
|
QJournalProtocolProtos.PrepareRecoveryResponseProto |
prepareRecovery(RequestInfo reqInfo,
long segmentTxId)
Begin the recovery process for a given segment.
|
void |
purgeLogsOlderThan(RequestInfo requestInfo,
long minTxIdToKeep) |
void |
startLogSegment(RequestInfo reqInfo,
long txid)
Start writing to a new log segment on the JournalNode.
|
static final long versionID
boolean isFormatted(String journalId) throws IOException
IOExceptionQJournalProtocolProtos.GetJournalStateResponseProto getJournalState(String journalId) throws IOException
IOExceptionvoid format(String journalId, NamespaceInfo nsInfo) throws IOException
IOExceptionQJournalProtocolProtos.NewEpochResponseProto newEpoch(String journalId, NamespaceInfo nsInfo, long epoch) throws IOException
IOExceptionvoid journal(RequestInfo reqInfo, long segmentTxId, long firstTxnId, int numTxns, byte[] records) throws IOException
IOExceptionvoid heartbeat(RequestInfo reqInfo) throws IOException
IOExceptionvoid startLogSegment(RequestInfo reqInfo, long txid) throws IOException
finalizeLogSegment(RequestInfo, long, long).txid - the first txid in the new logIOExceptionvoid finalizeLogSegment(RequestInfo reqInfo, long startTxId, long endTxId) throws IOException
startTxId - the starting transaction ID of the logendTxId - the expected last transaction in the given logIOException - if no such segment existsvoid purgeLogsOlderThan(RequestInfo requestInfo, long minTxIdToKeep) throws IOException
IOExceptionLogsPurgeable.purgeLogsOlderThan(long)QJournalProtocolProtos.GetEditLogManifestResponseProto getEditLogManifest(String jid, long sinceTxId, boolean forReading, boolean inProgressOk) throws IOException
jid - the journal from which to enumerate editssinceTxId - the first transaction which the client cares aboutforReading - whether or not the caller intends to read from the edit
logsinProgressOk - whether or not to check the in-progress edit log
segmentIOExceptionQJournalProtocolProtos.PrepareRecoveryResponseProto prepareRecovery(RequestInfo reqInfo, long segmentTxId) throws IOException
IOExceptionvoid acceptRecovery(RequestInfo reqInfo, QJournalProtocolProtos.SegmentStateProto stateToAccept, URL fromUrl) throws IOException
IOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.