void writePartitionFile(Configuration conf, Path path) throws IOException {
      FileSystem fs = path.getFileSystem(conf);
      @SuppressWarnings("deprecation")
      SequenceFile.Writer writer =
        SequenceFile.createWriter(fs, conf, path, ImmutableBytesWritable.class, NullWritable.class);

      for (int i = 0; i < partitions.size(); i++) {
        writer.append(partitions.get(i), NullWritable.get());
      }
      writer.close();
    }
Choose partitions between row ranges to hash to a single output file Selects region
boundaries that fall within the scan range, and groups them into the desired number of
partitions.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/HashTable.java