@InterfaceAudience.Private public class ReplicationProtbufUtil extends java.lang.Object
| Constructor and Description |
|---|
ReplicationProtbufUtil() |
| Modifier and Type | Method and Description |
|---|---|
static Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> |
buildReplicateWALEntryRequest(WAL.Entry[] entries)
Create a new ReplicateWALEntryRequest from a list of WAL entries
|
static Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> |
buildReplicateWALEntryRequest(WAL.Entry[] entries,
byte[] encodedRegionName,
java.lang.String replicationClusterId,
Path sourceBaseNamespaceDir,
Path sourceHFileArchiveDir)
Create a new ReplicateWALEntryRequest from a list of HLog entries
|
static void |
replicateWALEntry(AdminProtos.AdminService.BlockingInterface admin,
WAL.Entry[] entries,
java.lang.String replicationClusterId,
Path sourceBaseNamespaceDir,
Path sourceHFileArchiveDir)
A helper to replicate a list of WAL entries using admin protocol.
|
public static void replicateWALEntry(AdminProtos.AdminService.BlockingInterface admin, WAL.Entry[] entries, java.lang.String replicationClusterId, Path sourceBaseNamespaceDir, Path sourceHFileArchiveDir) throws java.io.IOException
admin - Admin serviceentries - Array of WAL entries to be replicatedreplicationClusterId - Id which will uniquely identify source cluster FS client
configurations in the replication configuration directorysourceBaseNamespaceDir - Path to source cluster base namespace directorysourceHFileArchiveDir - Path to the source cluster hfile archive directoryjava.io.IOExceptionpublic static Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> buildReplicateWALEntryRequest(WAL.Entry[] entries)
entries - the WAL entries to be replicatedpublic static Pair<AdminProtos.ReplicateWALEntryRequest,CellScanner> buildReplicateWALEntryRequest(WAL.Entry[] entries, byte[] encodedRegionName, java.lang.String replicationClusterId, Path sourceBaseNamespaceDir, Path sourceHFileArchiveDir)
entries - the HLog entries to be replicatedencodedRegionName - alternative region name to use if not nullreplicationClusterId - Id which will uniquely identify source cluster FS client
configurations in the replication configuration directorysourceBaseNamespaceDir - Path to source cluster base namespace directorysourceHFileArchiveDir - Path to the source cluster hfile archive directory