Apache9 commented on a change in pull request #2644:
URL: https://github.com/apache/hbase/pull/2644#discussion_r521010199



##########
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:
       the return value is not used?

##########
File path: 
hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/PerformanceEvaluation.java
##########
@@ -2276,7 +2319,38 @@ boolean testRow(final int i, final long startTime) 
throws IOException {
       return true;
     }
   }
+  static class MetaWriteTest extends Test {
+
+    MetaWriteTest(Connection con, TestOptions options, Status status) {
+      super(con, options, status);
+    }
+
+    @Override
+    void onStartup() throws IOException {
+    }
 
+    @Override
+    void onTakedown() throws IOException {
+    }
+    @Override
+    boolean testRow(final int i, final long startTime) throws IOException {
+      List<RegionInfo> regionInfos = new ArrayList<RegionInfo>();
+
+      for (int index = 0; index < i; index++) {
+        
regionInfos.add(RegionInfoBuilder.newBuilder(TableName.valueOf("hbase:meta"))

Review comment:
       This will be a bit confusing that we add "hbase:meta" to hbase:meta?




----------------------------------------------------------------
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]


Reply via email to