java.io.Closeable, java.lang.AutoCloseable, JournalProtocol, org.apache.hadoop.ipc.ProtocolMetaInterface@Private @Stable public class JournalProtocolTranslatorPB extends java.lang.Object implements org.apache.hadoop.ipc.ProtocolMetaInterface, JournalProtocol, java.io.Closeable
JournalProtocol interfaces to the RPC server implementing
JournalProtocolPB.versionID| Constructor | Description |
|---|---|
JournalProtocolTranslatorPB(JournalProtocolPB rpcProxy) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
FenceResponse |
fence(JournalInfo journalInfo,
long epoch,
java.lang.String fencerInfo) |
Request to fence any other journal writers.
|
boolean |
isMethodSupported(java.lang.String methodName) |
|
void |
journal(JournalInfo journalInfo,
long epoch,
long firstTxnId,
int numTxns,
byte[] records) |
Journal edit records.
|
void |
startLogSegment(JournalInfo journalInfo,
long epoch,
long txid) |
Notify the BackupNode that the NameNode has rolled its edit logs
and is now writing a new log segment.
|
public JournalProtocolTranslatorPB(JournalProtocolPB rpcProxy)
public void close()
close in interface java.lang.AutoCloseableclose in interface java.io.Closeablepublic void journal(JournalInfo journalInfo, long epoch, long firstTxnId, int numTxns, byte[] records) throws java.io.IOException
JournalProtocolEditLogBackupOutputStream in order to synchronize meta-data
changes with the backup namespace image.journal in interface JournalProtocoljournalInfo - journal informationepoch - marks beginning a new journal writerfirstTxnId - the first transaction of this batchnumTxns - number of transactionsrecords - byte array containing serialized journal recordsFencedException - if the resource has been fencedjava.io.IOExceptionpublic FenceResponse fence(JournalInfo journalInfo, long epoch, java.lang.String fencerInfo) throws java.io.IOException
JournalProtocolfence in interface JournalProtocoljournalInfo - journal informationepoch - marks beginning a new journal writerfencerInfo - info about fencer for debugging purposesFencedException - if the resource has been fencedjava.io.IOExceptionpublic void startLogSegment(JournalInfo journalInfo, long epoch, long txid) throws java.io.IOException
JournalProtocolstartLogSegment in interface JournalProtocoljournalInfo - journal informationepoch - marks beginning a new journal writertxid - the first txid in the new logFencedException - if the resource has been fencedjava.io.IOExceptionpublic boolean isMethodSupported(java.lang.String methodName)
throws java.io.IOException
isMethodSupported in interface org.apache.hadoop.ipc.ProtocolMetaInterfacejava.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.