Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

lemur::file::SortMergeTextFiles Class Reference

#include <SortMergeTextFiles.hpp>

Inheritance diagram for lemur::file::SortMergeTextFiles:

lemur::file::HarvestSortMerge List of all members.

Public Member Functions

 SortMergeTextFiles (std::string &outputFilePath, std::string &tempDirectory, int numMergeThreads=4, bool displayStatus=false)
 ~SortMergeTextFiles ()
int sort (std::vector< std::string > &inputFilePaths)
void showStatus (bool displayStatus)

Static Public Member Functions

bool _readLine (FILE *_in, char *&beginLine, size_t &lineLength, indri::utility::Buffer &_buffer)

Protected Member Functions

std::string _flushChunks (std::string &basePathname, std::vector< std::string > *inMemRecords, int currentChunkNumber)
int _mergeSortTwoFiles (std::string &firstFilePath, std::string &secondFilePath, std::string &outputFile, bool doCleanup=true)
std::vector< std::string > _doMidFinalMerge (std::vector< std::string > &inputList, std::string &outputPathBase, int &recordCounter)
int _doFinalMergesortFiles (std::vector< std::string > &inputFiles, std::string &outputFile)
virtual void _doSingleFileMergesort (std::string &inputFile, std::string &outputFile, std::vector< std::string > &chunkList, int chunkRecordSize=16384 *10)

Protected Attributes

std::string _outputFilePath
std::string _tempDirectory
indri::utility::Buffer _inputBuffer
indri::utility::Buffer _inputBufferTwo
bool _displayStatus
int _numMergeThreads

Constructor & Destructor Documentation

lemur::file::SortMergeTextFiles::SortMergeTextFiles std::string &  outputFilePath,
std::string &  tempDirectory,
int  numMergeThreads = 4,
bool  displayStatus = false
 

lemur::file::SortMergeTextFiles::~SortMergeTextFiles  ) 
 


Member Function Documentation

int lemur::file::SortMergeTextFiles::_doFinalMergesortFiles std::vector< std::string > &  inputFiles,
std::string &  outputFile
[protected]
 

std::vector< std::string > lemur::file::SortMergeTextFiles::_doMidFinalMerge std::vector< std::string > &  inputList,
std::string &  outputPathBase,
int &  recordCounter
[protected]
 

void lemur::file::SortMergeTextFiles::_doSingleFileMergesort std::string &  inputFile,
std::string &  outputFile,
std::vector< std::string > &  chunkList,
int  chunkRecordSize = 16384 *10
[protected, virtual]
 

Reimplemented in lemur::file::HarvestSortMerge.

std::string lemur::file::SortMergeTextFiles::_flushChunks std::string &  basePathname,
std::vector< std::string > *  inMemRecords,
int  currentChunkNumber
[protected]
 

int lemur::file::SortMergeTextFiles::_mergeSortTwoFiles std::string &  firstFilePath,
std::string &  secondFilePath,
std::string &  outputFile,
bool  doCleanup = true
[protected]
 

bool lemur::file::SortMergeTextFiles::_readLine FILE *  _in,
char *&  beginLine,
size_t &  lineLength,
indri::utility::Buffer _buffer
[static]
 

void lemur::file::SortMergeTextFiles::showStatus bool  displayStatus  )  [inline]
 

int lemur::file::SortMergeTextFiles::sort std::vector< std::string > &  inputFilePaths  ) 
 


Member Data Documentation

bool lemur::file::SortMergeTextFiles::_displayStatus [protected]
 

indri::utility::Buffer lemur::file::SortMergeTextFiles::_inputBuffer [protected]
 

indri::utility::Buffer lemur::file::SortMergeTextFiles::_inputBufferTwo [protected]
 

int lemur::file::SortMergeTextFiles::_numMergeThreads [protected]
 

std::string lemur::file::SortMergeTextFiles::_outputFilePath [protected]
 

std::string lemur::file::SortMergeTextFiles::_tempDirectory [protected]
 


The documentation for this class was generated from the following files:
Generated on Tue Jun 15 11:03:05 2010 for Lemur by doxygen 1.3.4