|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.replication.regionserver.Replication
public class Replication
Gateway to Replication. Used by HRegionServer
.
Constructor Summary | |
---|---|
Replication()
Empty constructor |
|
Replication(Server server,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path logDir,
org.apache.hadoop.fs.Path oldLogDir)
Instantiate the replication management (if rep is enabled). |
Method Summary | |
---|---|
static void |
decorateMasterConfiguration(org.apache.hadoop.conf.Configuration conf)
This method modifies the master's configuration in order to inject replication-related features |
ReplicationSourceManager |
getReplicationManager()
Get the replication sources manager |
WALActionsListener |
getWALActionsListener()
Returns a WALObserver for the service. |
void |
initialize(Server server,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path logDir,
org.apache.hadoop.fs.Path oldLogDir)
Initializes the replication service object. |
static boolean |
isReplication(org.apache.hadoop.conf.Configuration c)
|
void |
join()
Join with the replication threads |
void |
logCloseRequested()
The WAL is about to close. |
void |
logRollRequested()
A request was made that the WAL be rolled. |
void |
postLogArchive(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL has been archived. |
void |
postLogRoll(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL has been rolled. |
void |
preLogArchive(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL is going to be archived. |
void |
preLogRoll(org.apache.hadoop.fs.Path oldPath,
org.apache.hadoop.fs.Path newPath)
The WAL is going to be rolled. |
void |
replicateLogEntries(HLog.Entry[] entries)
Carry on the list of log entries down to the sink |
void |
startReplicationService()
If replication is enabled and this cluster is a master, it starts |
void |
stopReplicationService()
Stops replication service. |
void |
visitLogEntryBeforeWrite(HRegionInfo info,
HLogKey logKey,
WALEdit logEdit)
Called before each write. |
void |
visitLogEntryBeforeWrite(HTableDescriptor htd,
HLogKey logKey,
WALEdit logEdit)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Replication(Server server, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path logDir, org.apache.hadoop.fs.Path oldLogDir) throws IOException
server
- Hosting serverfs
- handle to the filesystemlogDir
- oldLogDir
- directory where logs are archived
IOException
public Replication()
Method Detail |
---|
public void initialize(Server server, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path logDir, org.apache.hadoop.fs.Path oldLogDir) throws IOException
ReplicationService
initialize
in interface ReplicationService
IOException
public static boolean isReplication(org.apache.hadoop.conf.Configuration c)
c
- Configuration to look at
public WALActionsListener getWALActionsListener()
ReplicationSourceService
getWALActionsListener
in interface ReplicationSourceService
public void stopReplicationService()
stopReplicationService
in interface ReplicationService
public void join()
public void replicateLogEntries(HLog.Entry[] entries) throws IOException
replicateLogEntries
in interface ReplicationSinkService
entries
- list of entries to replicate
IOException
public void startReplicationService() throws IOException
startReplicationService
in interface ReplicationService
IOException
public ReplicationSourceManager getReplicationManager()
public void visitLogEntryBeforeWrite(HRegionInfo info, HLogKey logKey, WALEdit logEdit)
WALActionsListener
visitLogEntryBeforeWrite
in interface WALActionsListener
public void visitLogEntryBeforeWrite(HTableDescriptor htd, HLogKey logKey, WALEdit logEdit)
visitLogEntryBeforeWrite
in interface WALActionsListener
public void preLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
preLogRoll
in interface WALActionsListener
oldPath
- the path to the old hlognewPath
- the path to the new hlog
IOException
public void postLogRoll(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
postLogRoll
in interface WALActionsListener
oldPath
- the path to the old hlognewPath
- the path to the new hlog
IOException
public void preLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
preLogArchive
in interface WALActionsListener
oldPath
- the path to the old hlognewPath
- the path to the new hlog
IOException
public void postLogArchive(org.apache.hadoop.fs.Path oldPath, org.apache.hadoop.fs.Path newPath) throws IOException
WALActionsListener
postLogArchive
in interface WALActionsListener
oldPath
- the path to the old hlognewPath
- the path to the new hlog
IOException
public static void decorateMasterConfiguration(org.apache.hadoop.conf.Configuration conf)
conf
- public void logRollRequested()
WALActionsListener
logRollRequested
in interface WALActionsListener
public void logCloseRequested()
WALActionsListener
logCloseRequested
in interface WALActionsListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |