clarax commented on a change in pull request #2644:
URL: https://github.com/apache/hbase/pull/2644#discussion_r523201239
##########
File path:
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
##########
@@ -1998,6 +2006,41 @@ protected void testTakedown() throws IOException {
super.testTakedown();
}
}
+ static class MetaRandomReadTest extends TableTest {
+ private Random rd = new Random();
+ private RegionLocator regionLocator;
+
+ MetaRandomReadTest(Connection con, TestOptions options, Status status) {
+ super(con, options, status);
+ LOG.info("call getRegionLocation");
+ }
+
+ @Override
+ void onStartup() throws IOException {
+ this.table = connection.getTable(TableName.valueOf("hbase:meta"));
+ this.regionLocator =
connection.getRegionLocator(TableName.valueOf("hbase:meta"));
+ }
+
+ @Override
+ boolean testRow(final int i, final long startTime) throws IOException,
InterruptedException {
+ if (opts.randomSleep > 0) {
+ Thread.sleep(rd.nextInt(opts.randomSleep));
+ }
+ HRegionLocation hRegionLocation =
regionLocator.getRegionLocation(Bytes.toBytes(Integer.toString(rd.nextInt(100)
+ 1)), true);
Review comment:
Added split key generation so write, read and clean up will work with
regions with continuous range of start key and end key.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]