This is an automated email from the ASF dual-hosted git repository.
andor pushed a commit to branch branch-2.6
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.6 by this push:
new 21cda89bb84 HBASE-29877. Introduce new LTT parameter --timeline to
control timeline consistency in read operations (#7723)
21cda89bb84 is described below
commit 21cda89bb846a72a279c3d676cb4af0f668424e4
Author: Andor Molnár <[email protected]>
AuthorDate: Tue Feb 10 16:26:51 2026 -0600
HBASE-29877. Introduce new LTT parameter --timeline to control timeline
consistency in read operations (#7723)
---
.../test/java/org/apache/hadoop/hbase/util/LoadTestTool.java | 12 ++++++++++++
.../org/apache/hadoop/hbase/util/MultiThreadedReader.java | 7 +++++++
2 files changed, 19 insertions(+)
diff --git
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
index 314ee93bff5..28b0a24b404 100644
---
a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
+++
b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/util/LoadTestTool.java
@@ -172,6 +172,10 @@ public class LoadTestTool extends AbstractHBaseTool {
protected static final String OPT_REGION_REPLICA_ID_USAGE =
"Region replica id to do the reads from";
+ public static final String OPT_TIMELINE_CONSISTENCY = "timeline";
+ protected static final String OPT_TIMELINE_CONSISTENCY_USAGE =
+ "Use TIMELINE consistency in read operations. Leave region_replica_id
unset, otherwise it will override this setting.";
+
public static final String OPT_MOB_THRESHOLD = "mob_threshold";
protected static final String OPT_MOB_THRESHOLD_USAGE =
"Desired cell size to exceed in bytes that will use the MOB write path";
@@ -227,6 +231,7 @@ public class LoadTestTool extends AbstractHBaseTool {
private int numRegionsPerServer = DEFAULT_NUM_REGIONS_PER_SERVER;
private int regionReplication = -1; // not set
private int regionReplicaId = -1; // not set
+ private boolean timelineConsistency = false;
private int mobThreshold = -1; // not set
@@ -360,6 +365,7 @@ public class LoadTestTool extends AbstractHBaseTool {
addOptWithArg(OPT_NUM_REGIONS_PER_SERVER,
OPT_NUM_REGIONS_PER_SERVER_USAGE);
addOptWithArg(OPT_REGION_REPLICATION, OPT_REGION_REPLICATION_USAGE);
addOptWithArg(OPT_REGION_REPLICA_ID, OPT_REGION_REPLICA_ID_USAGE);
+ addOptNoArg(OPT_TIMELINE_CONSISTENCY, OPT_TIMELINE_CONSISTENCY_USAGE);
addOptWithArg(OPT_MOB_THRESHOLD, OPT_MOB_THRESHOLD_USAGE);
}
@@ -519,6 +525,11 @@ public class LoadTestTool extends AbstractHBaseTool {
if (cmd.hasOption(OPT_REGION_REPLICA_ID)) {
regionReplicaId =
Integer.parseInt(cmd.getOptionValue(OPT_REGION_REPLICA_ID));
}
+
+ timelineConsistency = false;
+ if (cmd.hasOption(OPT_TIMELINE_CONSISTENCY)) {
+ timelineConsistency = true;
+ }
}
private void parseColumnFamilyOptions(CommandLine cmd) {
@@ -705,6 +716,7 @@ public class LoadTestTool extends AbstractHBaseTool {
readerThreads.setKeyWindow(keyWindow);
readerThreads.setMultiGetBatchSize(multiGetBatchSize);
readerThreads.setRegionReplicaId(regionReplicaId);
+ readerThreads.setTimelineConsistency(timelineConsistency);
}
if (isUpdate && isWrite) {
diff --git
a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedReader.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedReader.java
index 95e022b51f4..b351ab93eb2 100644
---
a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedReader.java
+++
b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/MultiThreadedReader.java
@@ -76,6 +76,7 @@ public class MultiThreadedReader extends MultiThreadedAction {
private int keyWindow = DEFAULT_KEY_WINDOW;
private int batchSize = DEFAULT_BATCH_SIZE;
private int regionReplicaId = -1; // particular region replica id to do
reads against if set
+ private boolean timelineConsistency = false;
public MultiThreadedReader(LoadTestDataGenerator dataGen, Configuration
conf, TableName tableName,
double verifyPercent) throws IOException {
@@ -104,6 +105,10 @@ public class MultiThreadedReader extends
MultiThreadedAction {
this.regionReplicaId = regionReplicaId;
}
+ public void setTimelineConsistency(boolean timelineConsistency) {
+ this.timelineConsistency = timelineConsistency;
+ }
+
@Override
public void start(long startKey, long endKey, int numThreads) throws
IOException {
super.start(startKey, endKey, numThreads);
@@ -318,6 +323,8 @@ public class MultiThreadedReader extends
MultiThreadedAction {
get = dataGenerator.beforeGet(keyToRead, get);
if (regionReplicaId > 0) {
get.setReplicaId(regionReplicaId);
+ }
+ if (timelineConsistency) {
get.setConsistency(Consistency.TIMELINE);
}
if (verbose) {