private static void checkExistence(final TableName tableName, final byte[] row,
    final byte[] family, final byte[] qualifier) throws Exception {
    // verify that the row exists
    Result r;
    Get get = new Get(row);
    get.addColumn(family, qualifier);
    int nbTry = 0;
    try (Table table = TEST_UTIL.getConnection().getTable(tableName)) {
      do {
        assertTrue("Failed to get row after " + nbTry + " tries", nbTry < 50);
        nbTry++;
        Thread.sleep(100);
        r = table.get(get);
      } while (r == null || r.getValue(family, qualifier) == null);
    }
  }
Method to check whether the passed row exists in the given table
hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestRegionLocationCaching.java