void start() { ActivityTimer s(totalCycles, timeActivities); dataLinkStart(); __uint64 numRows = helper->numRows(); // local when generated from a child query (the range is per node, don't split) bool isLocal = container.queryLocalData() || container.queryOwner().isLocalChild(); if (!isLocal && ((helper->getFlags() & TTFdistributed) != 0)) { __uint64 nodes = container.queryCodeContext()->getNodes(); __uint64 nodeid = container.queryCodeContext()->getNodeNum(); startRow = (nodeid * numRows) / nodes; maxRow = ((nodeid + 1) * numRows) / nodes; ActPrintLog("InlineSLAVE: numRows = %" I64F "d, nodes = %" I64F "d, nodeid = %" I64F "d, start = %" I64F "d, max = %" I64F "d", numRows, nodes, nodeid, startRow, maxRow); } else { startRow = 0; // when not distributed, only first node compute, unless local if (firstNode() || isLocal) maxRow = numRows; else maxRow = 0; } currentRow = startRow; }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); input = inputs.item(0); startInput(input); dataLinkStart("ParseSlaveActivity", container.queryId()); }
virtual void start() { input.set(inputs.item(0)); startInput(input); eos = false; dataLinkStart(kindStr.str(), container.queryId()); }
virtual void start() { ActivityTimer s(totalCycles, timeActivities); doStart(); eof = false; dataLinkStart(); }
void start(const char *act) { input = inputs.item(0); anyThisGroup = false; startInput(input); dataLinkStart(act, container.queryId()); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); input = inputs.item(0); startInput(input); dataLinkStart(); }
virtual void start() { input.set(inputs.item(0)); startInput(input); eos = false; dataLinkStart(); }
// IThorDataLink methods virtual void start() { ActivityTimer s(totalCycles, timeActivities); input.setown(createDataLinkSmartBuffer(this,inputs.item(0),PULL_SMART_BUFFER_SIZE,true,false,RCUNBOUND,NULL,false,&container.queryJob().queryIDiskUsage())); startInput(input); dataLinkStart(); }
// IThorDataLink methods virtual void start() { ActivityTimer s(totalCycles, timeActivities); eof = false; dataLinkStart(); if (wscHelper) wscHelper->start(); }
void start() { ActivityTimer s(totalCycles, timeActivities); input.set(inputs.item(0)); startInput(input); stopped = false; dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); dataLinkStart("TEMPTABLE", container.queryId()); currentRow = 0; isLocal = container.queryOwnerId() && container.queryOwner().isLocalOnly(); eof = isLocal ? false : !firstNode(); }
virtual void start() { ActivityTimer s(totalCycles, timeActivities); BaseChooseSetsActivity::start(); ActPrintLog("CHOOSESETS: Is Local"); input.set(inputs.item(0)); startInput(input); dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); input = inputs.item(0); startInput(input); if(!input->isGrouped()) ActPrintLog("DEGROUP: Degrouping non-grouped input!"); dataLinkStart("DEGROUP", container.queryId()); }
void start() { ActivityTimer s(totalCycles, timeActivities); eof = false; input=inputs.item(0); startInput(input); ungroupedExistsAggregate = (container.getKind() == TAKexistsaggregate) && !input->isGrouped(); dataLinkStart(); }
// IThorDataLink methods virtual void start() { ActivityTimer s(totalCycles, timeActivities, NULL); anyThisGroup = false; eogNext = false; input = inputs.item(0); startInput(input); dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); eof = false; inputStopped = false; dataLinkStart("AGGREGATE", container.queryId()); input = inputs.item(0); startInput(input); if (input->isGrouped()) ActPrintLog("AGGREGATE: Grouped mismatch"); }
void start() { ActivityTimer s(totalCycles, timeActivities); resultSent = container.queryLocal(); // i.e. local, so don't send result to master eos = stopped = anyThisGroup = eogNext = false; input = inputs.item(0); startInput(input); rowLimit = (rowcount_t)helper->getRowLimit(); dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); numThisRow = 0; curRow = 0; anyThisGroup = false; input = inputs.item(0); startInput(input); dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); dataLinkStart(); input = inputs.item(0); startInput(input); IInputSteppingMeta *stepMeta = input->querySteppingMeta(); if (stepMeta) stepCompare = stepMeta->queryCompare(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); numThisRow = 0; curRow = 0; anyThisGroup = false; input = inputs.item(0); startInput(input); dataLinkStart("NORMALIZE", container.queryId()); }
void start() { ActivityTimer s(totalCycles, timeActivities); input = inputs.item(0); startInput(input); eogNext = false; anyThisGroup = false; numSamples = helper->getProportion(); whichSample = helper->getSampleNumber(); numToSkip = whichSample ? whichSample - 1 : 0; dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); eogNext = false; refill = true; input = inputs.item(0); startInput(input); dataLinkStart(); icompare = helper->queryCompare(); index = 0; eof = false; group.setSizing(true,false); }
void start() { ActivityTimer s(totalCycles, timeActivities); anyThisGroup = false; eogNext = false; count = 0; input = inputs.item(0); startInput(input); dataLinkStart(); RtlDynamicRowBuilder r(queryRowAllocator()); size32_t sz = helper->createDefault(r); defaultLeft.setown(r.finalizeRowClear(sz)); }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); dataLinkStart(); input = inputs.item(0); unsigned spillPriority = container.queryGrouped() ? SPILL_PRIORITY_GROUPSORT : SPILL_PRIORITY_LARGESORT; iLoader.setown(createThorRowLoader(*this, queryRowInterfaces(input), iCompare, unstable ? stableSort_none : stableSort_earlyAlloc, rc_mixed, spillPriority)); startInput(input); eoi = false; if (container.queryGrouped()) out.setown(iLoader->loadGroup(input, abortSoon)); else out.setown(iLoader->load(input, abortSoon)); if (0 == iLoader->numRows()) eoi = true; }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); dataLinkStart(); eogPending = false; if (container.queryLocal() || firstNode()) { CMessageBuffer reqMsg; reqMsg.setReplyTag(replyTag); reqMsg.append(smt_actMsg); reqMsg.append(container.queryOwner().queryGraphId()); reqMsg.append(container.queryId()); if (!container.queryJob().queryJobComm().sendRecv(reqMsg, 0, container.queryJob().querySlaveMpTag(), LONGTIMEOUT)) throwUnexpected(); masterReplyMsg.swapWith(reqMsg); } }
void start() { ActivityTimer s(totalCycles, timeActivities, NULL); count = 0; eof = nextPut = false; inrowif.set(::queryRowInterfaces(inputs.item(0))); if (global) // only want lookahead if global (hence serial) input.setown(createDataLinkSmartBuffer(this, inputs.item(0),ITERATE_SMART_BUFFER_SIZE,isSmartBufferSpillNeeded(this),false,RCUNBOUND,NULL,false,&container.queryJob().queryIDiskUsage())); // only allow spill if input can stall else input.set(inputs.item(0)); try { startInput(input); } catch (IException *e) { ActPrintLog(e,"ITERATE"); throw; } dataLinkStart("ITERATOR", container.queryId()); }
// IThorDataLink virtual void start() { ActivityTimer s(totalCycles, timeActivities, NULL); input = inputs.item(0); startInput(input); dataLinkStart("SELFJOIN", container.queryId()); bool hintparallelmatch = container.queryXGMML().getPropInt("hint[@name=\"parallel_match\"]")!=0; bool hintunsortedoutput = container.queryXGMML().getPropInt("hint[@name=\"unsorted_output\"]")!=0; if (helper->getJoinFlags()&JFlimitedprefixjoin) { CriticalBlock b(joinHelperCrit); // use std join helper (less efficient but implements limited prefix) joinhelper.setown(createJoinHelper(helper,"SELFJOIN", container.queryId(), queryRowAllocator(),hintparallelmatch,hintunsortedoutput)); } else { CriticalBlock b(joinHelperCrit); joinhelper.setown(createSelfJoinHelper(helper,"SELFJOIN", container.queryId(), queryRowAllocator(),hintparallelmatch,hintunsortedoutput)); } strm.setown(isLightweight? doLightweightSelfJoin() : (isLocal ? doLocalSelfJoin() : doGlobalSelfJoin())); assertex(strm); joinhelper->init(strm, NULL, ::queryRowAllocator(inputs.item(0)), ::queryRowAllocator(inputs.item(0)), ::queryRowMetaData(inputs.item(0)), &abortSoon, this); }
// IThorDataLink virtual void start() { ActivityTimer s(totalCycles, timeActivities, NULL); input = inputs.item(0); startInput(input); dataLinkStart(); bool hintunsortedoutput = getOptBool(THOROPT_UNSORTED_OUTPUT, JFreorderable & helper->getJoinFlags()); bool hintparallelmatch = getOptBool(THOROPT_PARALLEL_MATCH, hintunsortedoutput); // i.e. unsorted, implies use parallel by default, otherwise no point if (helper->getJoinFlags()&JFlimitedprefixjoin) { CriticalBlock b(joinHelperCrit); // use std join helper (less efficient but implements limited prefix) joinhelper.setown(createJoinHelper(*this, helper, this, hintparallelmatch, hintunsortedoutput)); } else { CriticalBlock b(joinHelperCrit); joinhelper.setown(createSelfJoinHelper(*this, helper, this, hintparallelmatch, hintunsortedoutput)); } strm.setown(isLightweight? doLightweightSelfJoin() : (isLocal ? doLocalSelfJoin() : doGlobalSelfJoin())); assertex(strm); joinhelper->init(strm, NULL, ::queryRowAllocator(inputs.item(0)), ::queryRowAllocator(inputs.item(0)), ::queryRowMetaData(inputs.item(0)), &abortSoon); }
void start() { ActivityTimer s(totalCycles, timeActivities); dataLinkStart(); }
void start() { ActivityTimer s(totalCycles, timeActivities); input = inputs.item(0); try { try { startInput(input); } catch (IException *e) { fireException(e); barrier->cancel(); throw; } catch (CATCHALL) { Owned<IException> e = MakeActivityException(this, 0, "Unknown exception starting sort input"); fireException(e); barrier->cancel(); throw; } dataLinkStart(); Linked<IRowInterfaces> rowif = queryRowInterfaces(input); Owned<IRowInterfaces> auxrowif = createRowInterfaces(helper->querySortedRecordSize(),queryActivityId(),queryCodeContext()); sorter->Gather( rowif, input, helper->queryCompare(), helper->queryCompareLeftRight(), NULL,helper->querySerialize(), NULL, false, isUnstable(), abortSoon, auxrowif); stopInput(input); input = NULL; if (abortSoon) { ActPrintLogEx(&queryContainer(), thorlog_null, MCwarning, "MSortSlaveActivity::start aborting"); barrier->cancel(); return; } } catch (IException *e) { fireException(e); barrier->cancel(); throw; } catch (CATCHALL) { Owned<IException> e = MakeActivityException(this, 0, "Unknown exception gathering sort input"); fireException(e); barrier->cancel(); throw; } ActPrintLog("SORT waiting barrier.1"); if (!barrier->wait(false)) { Sleep(1000); // let original error through throw MakeThorException(TE_BarrierAborted,"SORT: Barrier Aborted"); } ActPrintLog("SORT barrier.1 raised"); output.setown(sorter->startMerge(totalrows)); }