NABoolean HHDFSBucketStats::addFile(hdfsFS fs, hdfsFileInfo *fileInfo, NABoolean doEstimate, char recordTerminator, NABoolean isSequenceFile, CollIndex pos) { HHDFSFileStats *fileStats = new(heap_) HHDFSFileStats(heap_); if ( scount_ > 10 ) doEstimate = FALSE; Int32 sampledRecords = 0; NABoolean result = fileStats->populate(fs, fileInfo, sampledRecords, doEstimate, recordTerminator, isSequenceFile); if ( sampledRecords > 0 ) scount_++; if (pos == NULL_COLL_INDEX) fileStatsList_.insert(fileStats); else fileStatsList_.insertAt(pos, fileStats); add(fileStats); return result; }
void HHDFSBucketStats::addFile(hdfsFS fs, hdfsFileInfo *fileInfo, HHDFSDiags &diags, NABoolean doEstimate, char recordTerminator, CollIndex pos) { HHDFSFileStats *fileStats = new(heap_) HHDFSFileStats(heap_, getTable()); if ( scount_ > 10 ) doEstimate = FALSE; Int32 sampledRecords = 0; fileStats->populate(fs, fileInfo, sampledRecords, diags, doEstimate, recordTerminator); if (diags.isSuccess()) { if ( sampledRecords > 0 ) scount_++; if (pos == NULL_COLL_INDEX) fileStatsList_.insert(fileStats); else fileStatsList_.insertAt(pos, fileStats); add(fileStats); } }