clarax commented on a change in pull request #2644:
URL: https://github.com/apache/hbase/pull/2644#discussion_r521129644
##########
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:
Right. I was thinking to add trace in the case of troubleshooting but
not sure.
----------------------------------------------------------------
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]