@Override
      public BytesWritable getCurrentKey() {
        return files.get(index).getFirst();
      }
Given a list of file paths and sizes, create around ngroups in as balanced a way as possible.
The groups created will have similar amounts of bytes.
<p>
The algorithm used is pretty straightforward; the file list is sorted by size, and then each
group fetch the bigger file available, iterating through groups alternating the direction.
hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java