CDiskCountActivityMaster(CMasterGraphElement *info) : CDiskReadMasterVF(info) { totalCount = 0; totalCountKnown = false; helper = (IHThorDiskCountArg *)queryHelper(); stopAfter = (rowcount_t)helper->getChooseNLimit(); if (!container.queryLocalOrGrouped()) mpTag = container.queryJob().allocateMPTag(); }
virtual void init() { CDiskReadMasterVF::init(); bool canMatch = container.queryLocalOrGrouped() || helper->canMatchAny(); // if local, assume may match if (!canMatch) totalCountKnown = true; // totalCount = 0; else if (!container.queryLocalOrGrouped()) { if (!helper->hasSegmentMonitors() && !helper->hasFilter() && !(helper->getFlags() & TDXtemporary)) { if (file.get() && canMatch) { if (0 != (TDRunfilteredcount & helper->getFlags()) && file->queryAttributes().hasProp("@recordCount")) { totalCount = (rowcount_t)file->queryAttributes().getPropInt64("@recordCount"); if (totalCount > stopAfter) totalCount = stopAfter; totalCountKnown = true; } } } } }
virtual void init() { CDiskReadMasterVF::init(); bool canMatch = container.queryLocalOrGrouped() || helper->canMatchAny(); // if local, assume may match if (!canMatch) totalCountKnown = true; // totalCount = 0; else if (!container.queryLocalOrGrouped()) { if (!helper->hasSegmentMonitors() && !helper->hasFilter() && !(helper->getFlags() & TDXtemporary)) { Owned<IDistributedFile> file = queryThorFileManager().lookup(container.queryJob(), helper->getFileName(), 0 != ((TDXtemporary|TDXjobtemp) & helper->getFlags()), 0 != (TDRoptional & helper->getFlags())); if (file.get() && canMatch) { if (0 != (TDRunfilteredcount & helper->getFlags()) && file->queryAttributes().hasProp("@recordCount")) { totalCount = (rowcount_t)file->queryAttributes().getPropInt64("@recordCount"); if (totalCount > stopAfter) totalCount = stopAfter; totalCountKnown = true; } } } } }