long startPos = 0;
long startIndexHash = 0;
long endIndexHash = 0;
//write the last part of the master index.
// hash values must be sorted before writing indexes (normally this is done automatically by MapReduce)
Collections.sort(indexHash, new HARIndexContainerSorter());
int i = 0;
int hash = 0;
for(; i < indexHash.size(); i++){
indexStream.write(indexHash.get(i).index_output.getBytes());
hash = indexHash.get(i).hash;