kgeisz commented on code in PR #7417:
URL: https://github.com/apache/hbase/pull/7417#discussion_r2491977223
##########
hbase-it/src/test/java/org/apache/hadoop/hbase/backup/IntegrationTestBackupRestoreBase.java:
##########
@@ -468,19 +494,97 @@ private void verifyBackupWALFiles(Path walPartitionDir)
throws IOException {
assertEquals("The WAL partition directory should only have files that
start with 'wal_file'",
"wal_file", splitName[0]);
assertEquals(
- "The timestamp in the WAL file's name should match the date for the
WAL partition directory",
+ "The timestamp in the WAL file's name should match the "
+ + "date for the WAL partition directory",
walPartitionDir.getName(),
BackupUtils.formatToDateString(Long.parseLong(splitName[1])));
}
}
+ /**
+ * Checks if all timestamps in a map with ServerName and timestamp
key-values pairs are past the
+ * provided timestamp threshold.
+ * @param timestamps Map with ServerName and timestamp key-value pairs
+ * @param threshold Timestamp to check all timestamp values in the map
against
+ * @return True if all timestamps values in the map have met or are path the
timestamp threshold;
+ * False otherwise
+ */
+ private boolean areAllTimestampsPastThreshold(Map<ServerName, Long>
timestamps, long threshold,
+ TableName tableName) {
+ boolean haveAllTimestampsReachedThreshold = true;
+ LOG.info("Checking if each region server in the replication check point "
+ + "has caught up to the latest Put on {}", tableName.getNameAsString());
+ for (Map.Entry<ServerName, Long> entry : timestamps.entrySet()) {
+ LOG.info("host={}, checkpoint timestamp={}, latest put timestamp={},
caught up={}",
Review Comment:
Debug is good. I changed it.
##########
hbase-it/src/test/java/org/apache/hadoop/hbase/backup/IntegrationTestBackupRestoreBase.java:
##########
@@ -468,19 +494,97 @@ private void verifyBackupWALFiles(Path walPartitionDir)
throws IOException {
assertEquals("The WAL partition directory should only have files that
start with 'wal_file'",
"wal_file", splitName[0]);
assertEquals(
- "The timestamp in the WAL file's name should match the date for the
WAL partition directory",
+ "The timestamp in the WAL file's name should match the "
+ + "date for the WAL partition directory",
walPartitionDir.getName(),
BackupUtils.formatToDateString(Long.parseLong(splitName[1])));
}
}
+ /**
+ * Checks if all timestamps in a map with ServerName and timestamp
key-values pairs are past the
+ * provided timestamp threshold.
+ * @param timestamps Map with ServerName and timestamp key-value pairs
+ * @param threshold Timestamp to check all timestamp values in the map
against
+ * @return True if all timestamps values in the map have met or are path the
timestamp threshold;
+ * False otherwise
+ */
+ private boolean areAllTimestampsPastThreshold(Map<ServerName, Long>
timestamps, long threshold,
+ TableName tableName) {
+ boolean haveAllTimestampsReachedThreshold = true;
+ LOG.info("Checking if each region server in the replication check point "
+ + "has caught up to the latest Put on {}", tableName.getNameAsString());
+ for (Map.Entry<ServerName, Long> entry : timestamps.entrySet()) {
+ LOG.info("host={}, checkpoint timestamp={}, latest put timestamp={},
caught up={}",
Review Comment:
DEBUG is good. I changed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]