@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 Closeable
close
in interface AutoCloseable
public void journal(JournalInfo journalInfo, long epoch, long firstTxnId, int numTxns, byte[] records) throws IOException
JournalProtocol
EditLogBackupOutputStream
in order to synchronize meta-data
changes with the backup namespace image.journal
in interface JournalProtocol
journalInfo
- 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 fencedIOException
public void startLogSegment(JournalInfo journalInfo, long epoch, long txid) throws IOException
JournalProtocol
startLogSegment
in interface JournalProtocol
journalInfo
- journal informationepoch
- marks beginning a new journal writertxid
- the first txid in the new logFencedException
- if the resource has been fencedIOException
public FenceResponse fence(JournalInfo journalInfo, long epoch, String fencerInfo) throws IOException
JournalProtocol
fence
in interface JournalProtocol
journalInfo
- journal informationepoch
- marks beginning a new journal writerfencerInfo
- info about fencer for debugging purposesFencedException
- if the resource has been fencedIOException
public boolean isMethodSupported(String methodName) throws IOException
ProtocolMetaInterface
isMethodSupported
in interface ProtocolMetaInterface
methodName
- The name of the methodIOException
Copyright © 2013 Apache Software Foundation. All rights reserved.