Class ReplicationBarrierFamilyFormat
java.lang.Object
org.apache.hadoop.hbase.replication.ReplicationBarrierFamilyFormat
Helper class for storing replication barriers in family 'rep_barrier' of meta table.
See SerialReplicationChecker on how to make use of the barriers.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final byte
static final byte[]
private static final byte
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addReplicationBarrier
(Put put, long openSeqNum) static void
addReplicationParent
(Put put, List<RegionInfo> parents) static byte[]
getParentsBytes
(List<RegionInfo> parents) private static long
getReplicationBarrierResult
(Connection conn, TableName tableName, byte[] row, byte[] encodedRegionName) private static ReplicationBarrierFamilyFormat.ReplicationBarrierResult
getReplicationBarrierResult
(Result result) static long[]
getReplicationBarriers
(Connection conn, byte[] regionName) static long[]
getReplicationBarriers
(Result result) getTableEncodedRegionNameAndLastBarrier
(Connection conn, TableName tableName) getTableEncodedRegionNamesForSerialReplication
(Connection conn, TableName tableName) static Put
makePutForReplicationBarrier
(RegionInfo regionInfo, long openSeqNum, long ts) private static List<byte[]>
parseParentsBytes
(byte[] bytes) private static void
writeRegionName
(ByteArrayOutputStream out, byte[] regionName)
-
Field Details
-
REPLICATION_PARENT_QUALIFIER
-
ESCAPE_BYTE
- See Also:
-
SEPARATED_BYTE
- See Also:
-
-
Constructor Details
-
ReplicationBarrierFamilyFormat
private ReplicationBarrierFamilyFormat()
-
-
Method Details
-
addReplicationBarrier
- Throws:
IOException
-
writeRegionName
-
getParentsBytes
-
parseParentsBytes
-
addReplicationParent
- Throws:
IOException
-
makePutForReplicationBarrier
public static Put makePutForReplicationBarrier(RegionInfo regionInfo, long openSeqNum, long ts) throws IOException - Throws:
IOException
-
getReplicationBarrier
-
getReplicationBarriers
-
getReplicationBarrierResult
private static ReplicationBarrierFamilyFormat.ReplicationBarrierResult getReplicationBarrierResult(Result result) -
getReplicationBarrierResult
public static ReplicationBarrierFamilyFormat.ReplicationBarrierResult getReplicationBarrierResult(Connection conn, TableName tableName, byte[] row, byte[] encodedRegionName) throws IOException - Throws:
IOException
-
getReplicationBarriers
- Throws:
IOException
-
getTableEncodedRegionNameAndLastBarrier
public static List<Pair<String,Long>> getTableEncodedRegionNameAndLastBarrier(Connection conn, TableName tableName) throws IOException - Throws:
IOException
-
getTableEncodedRegionNamesForSerialReplication
public static List<String> getTableEncodedRegionNamesForSerialReplication(Connection conn, TableName tableName) throws IOException - Throws:
IOException
-