@@ -172,6 +172,10 @@ public class LoadTestTool extends AbstractHBaseTool {
172172 protected static final String OPT_REGION_REPLICA_ID_USAGE =
173173 "Region replica id to do the reads from" ;
174174
175+ public static final String OPT_TIMELINE_CONSISTENCY = "timeline" ;
176+ protected static final String OPT_TIMELINE_CONSISTENCY_USAGE =
177+ "Use TIMELINE consistency in read operations. Leave region_replica_id unset, otherwise it will override this setting." ;
178+
175179 public static final String OPT_MOB_THRESHOLD = "mob_threshold" ;
176180 protected static final String OPT_MOB_THRESHOLD_USAGE =
177181 "Desired cell size to exceed in bytes that will use the MOB write path" ;
@@ -227,6 +231,7 @@ public class LoadTestTool extends AbstractHBaseTool {
227231 private int numRegionsPerServer = DEFAULT_NUM_REGIONS_PER_SERVER ;
228232 private int regionReplication = -1 ; // not set
229233 private int regionReplicaId = -1 ; // not set
234+ private boolean timelineConsistency = false ;
230235
231236 private int mobThreshold = -1 ; // not set
232237
@@ -360,6 +365,7 @@ protected void addOptions() {
360365 addOptWithArg (OPT_NUM_REGIONS_PER_SERVER , OPT_NUM_REGIONS_PER_SERVER_USAGE );
361366 addOptWithArg (OPT_REGION_REPLICATION , OPT_REGION_REPLICATION_USAGE );
362367 addOptWithArg (OPT_REGION_REPLICA_ID , OPT_REGION_REPLICA_ID_USAGE );
368+ addOptNoArg (OPT_TIMELINE_CONSISTENCY , OPT_TIMELINE_CONSISTENCY_USAGE );
363369 addOptWithArg (OPT_MOB_THRESHOLD , OPT_MOB_THRESHOLD_USAGE );
364370 }
365371
@@ -519,6 +525,11 @@ protected void processOptions(CommandLine cmd) {
519525 if (cmd .hasOption (OPT_REGION_REPLICA_ID )) {
520526 regionReplicaId = Integer .parseInt (cmd .getOptionValue (OPT_REGION_REPLICA_ID ));
521527 }
528+
529+ timelineConsistency = false ;
530+ if (cmd .hasOption (OPT_TIMELINE_CONSISTENCY )) {
531+ timelineConsistency = true ;
532+ }
522533 }
523534
524535 private void parseColumnFamilyOptions (CommandLine cmd ) {
@@ -705,6 +716,7 @@ protected int loadTable() throws IOException {
705716 readerThreads .setKeyWindow (keyWindow );
706717 readerThreads .setMultiGetBatchSize (multiGetBatchSize );
707718 readerThreads .setRegionReplicaId (regionReplicaId );
719+ readerThreads .setTimelineConsistency (timelineConsistency );
708720 }
709721
710722 if (isUpdate && isWrite ) {
0 commit comments