Package dk.netarkivet.wayback.aggregator
Class IndexAggregator
- java.lang.Object
-
- dk.netarkivet.wayback.aggregator.IndexAggregator
-
public class IndexAggregator extends Object
Encapsulates the functionality for sorting and merging index files. Uses the Unix sort cmd for optimized sorting and file merging. Operations in this class are synchronized to avoid multiple jobs running at the same time (by the same object at least).
-
-
Constructor Summary
Constructors Constructor Description IndexAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
mergeFiles(File[] files, File outputFile)
Takes a list of sorted files and merges them.void
sortAndMergeFiles(File[] files, File outputFile)
Generates a sorted CDX index file based on the set of unsorted CDX input files.
-
-
-
Method Detail
-
sortAndMergeFiles
public void sortAndMergeFiles(File[] files, File outputFile)
Generates a sorted CDX index file based on the set of unsorted CDX input files.The operation will not run on a folder which already has a process job running.
- Parameters:
files
- A list of the files to aggregateoutputFile
- Name of the output file. In case of a empty filesNames array no outputFiles will be generated
-
-