it.unimi.dsi.archive4j.tool
Class SortBitstreamArchive

java.lang.Object
  extended by it.unimi.dsi.archive4j.tool.SortBitstreamArchive

public class SortBitstreamArchive
extends Object

Sorts bitstream archives.

Sequential archives can be sorted using this class so that they provide [random access.

Author:
Alessio Orlandi

Field Summary
static String inMemorySize
           
 
Constructor Summary
SortBitstreamArchive()
          Empty constructor used for restarting.
SortBitstreamArchive(String inputBasename, String outputBasename, int blockSize)
          First-start constructor.
 
Method Summary
 void innerSorting(ProgressLogger pl)
          Starts phase 1 (in memory sorting of blocks.
static void main(String[] args)
           
 void run(ProgressLogger pl)
          Runs the two phases.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inMemorySize

public static String inMemorySize
Constructor Detail

SortBitstreamArchive

public SortBitstreamArchive()
Empty constructor used for restarting.


SortBitstreamArchive

public SortBitstreamArchive(String inputBasename,
                            String outputBasename,
                            int blockSize)
                     throws IOException,
                            ConfigurationException
First-start constructor.

Parameters:
inputBasename - Unsorted archive basename
outputBasename - Sorted output archive basename
blockSize - Size, in documents, used for each memory-sorted block.
Throws:
IOException
ConfigurationException
Method Detail

run

public void run(ProgressLogger pl)
         throws IOException
Runs the two phases.

Throws:
IOException

innerSorting

public void innerSorting(ProgressLogger pl)
                  throws IOException
Starts phase 1 (in memory sorting of blocks. )

Parameters:
pl - a progress logger
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception