[ https://issues.apache.org/jira/browse/HBASE-21194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16656978#comment-16656978 ]
Ted Yu commented on HBASE-21194: -------------------------------- {code} + private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); {code} Do we need to create testing util for the counting method ? I tried the following which compiles: {code} diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java index e2e4aec..f99d666 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java @@ -2310,11 +2310,11 @@ public class HBaseTestingUtility extends HBaseZKTestingUtility { /** * Return the number of rows in the given table. */ - public int countRows(final Table table) throws IOException { + static public int countRows(final Table table) throws IOException { return countRows(table, new Scan()); } - public int countRows(final Table table, final Scan scan) throws IOException { + static public int countRows(final Table table, final Scan scan) throws IOException { try (ResultScanner results = table.getScanner(scan)) { int count = 0; while (results.next() != null) { {code} {code} + assertTrue("mob row count > 0", MOB_TEST_UTIL.countMobRows(t2) > 0); {code} Please refine the message - if the assertion fails, the message should give the mob row count (0). Please look at other messages and refine if needed. As for the rest of the count() methods, it is up to you. Normally such method relocation can be done when circumstance needs it - such as in this case where two tests can share the same code. > Add TestCopyTable which exercises MOB feature > --------------------------------------------- > > Key: HBASE-21194 > URL: https://issues.apache.org/jira/browse/HBASE-21194 > Project: HBase > Issue Type: Test > Reporter: Ted Yu > Assignee: Artem Ervits > Priority: Minor > Labels: mob > Attachments: HBASE-21194.v01.patch, HBASE-21194.v02.patch, > HBASE-21194.v03.patch > > > Currently TestCopyTable doesn't cover table(s) with MOB feature enabled. > We should add variant that enables MOB on the table being copied and verify > that MOB content is copied correctly. -- This message was sent by Atlassian JIRA (v7.6.3#76005)