virtual void start() override { ActivityTimer s(totalCycles, timeActivities); PARENT::start(); resultSent = container.queryLocal(); // i.e. local, so don't send result to master eos = stopped = anyThisGroup = eogNext = false; rowLimit = (rowcount_t)helper->getRowLimit(); }
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 process() { unsigned slaves = container.queryJob().querySlaves(); IHThorLimitArg *helper = (IHThorLimitArg *)queryHelper(); rowcount_t rowLimit = (rowcount_t)helper->getRowLimit(); rowcount_t total = 0; while (slaves--) { CMessageBuffer mb; if (!receiveMsg(mb, RANK_ALL, mpTag, NULL)) return; if (abortSoon) return; rowcount_t count; mb.read(count); total += count; if (total > rowLimit) break; } switch (container.getKind()) { case TAKcreaterowlimit: case TAKskiplimit: { unsigned slaves = container.queryJob().querySlaves(); CMessageBuffer mb; mb.append(total); queryJobChannel().queryJobComm().send(mb, RANK_ALL_OTHER, mpTag); break; } case TAKlimit: { if (total > rowLimit) helper->onLimitExceeded(); break; } } }