private static int getRegionCount(Configuration conf, TableName tableName) throws IOException {
    try (Connection conn = ConnectionFactory.createConnection(conf);
      RegionLocator locator = conn.getRegionLocator(tableName)) {
      return locator.getAllRegionLocations().size();
    }
  }
Invoke 'getJar' on a custom JarFinder implementation. Useful for some job configuration
contexts (HBASE-8140) and also for testing on MRv2. check if we have HADOOP-9426.
@param my_class the class to find.
@return a jar file that contains the class, or null.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java