private void generatePartitions(Path partitionsPath) throws IOException {
    Connection connection = ConnectionFactory.createConnection(getConf());
    Pair<byte[][], byte[][]> regionKeys =
      connection.getRegionLocator(TableName.valueOf(tableHash.tableName)).getStartEndKeys();
    connection.close();

    tableHash.selectPartitions(regionKeys);
    LOG.info("Writing " + tableHash.partitions.size() + " partition keys to " + partitionsPath);

    tableHash.writePartitionFile(getConf(), partitionsPath);
  }
Get the current hash
@return the current hash or null if there is no current hash
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HashTable.java