@InterfaceAudience.Private @InterfaceStability.Stable public class JournalProtocolTranslatorPB extends Object implements ProtocolMetaInterface, JournalProtocol, Closeable
JournalProtocol interfaces to the RPC server implementing
JournalProtocolPB.versionID| Constructor and Description |
|---|
JournalProtocolTranslatorPB(JournalProtocolPB rpcProxy) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
FenceResponse |
fence(JournalInfo journalInfo,
long epoch,
String fencerInfo)
Request to fence any other journal writers.
|
boolean |
isMethodSupported(String methodName)
Checks whether the given method name is supported by the server.
|
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 Closeableclose in interface AutoCloseablepublic void journal(JournalInfo journalInfo, long epoch, long firstTxnId, int numTxns, byte[] records) throws 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 fencedIOExceptionpublic void startLogSegment(JournalInfo journalInfo, long epoch, long txid) throws 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 fencedIOExceptionpublic FenceResponse fence(JournalInfo journalInfo, long epoch, String fencerInfo) throws IOException
JournalProtocolfence in interface JournalProtocoljournalInfo - journal informationepoch - marks beginning a new journal writerfencerInfo - info about fencer for debugging purposesFencedException - if the resource has been fencedIOExceptionpublic boolean isMethodSupported(String methodName) throws IOException
ProtocolMetaInterfaceisMethodSupported in interface ProtocolMetaInterfacemethodName - The name of the methodIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.