本文整理汇总了C++中Owned::Gather方法的典型用法代码示例。如果您正苦于以下问题:C++ Owned::Gather方法的具体用法?C++ Owned::Gather怎么用?C++ Owned::Gather使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Owned
的用法示例。
在下文中一共展示了Owned::Gather方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeThorException
IRowStream * doGlobalSelfJoin()
{
#if THOR_TRACE_LEVEL > 5
ActPrintLog("SELFJOIN: Performing global self-join");
#endif
sorter->Gather(::queryRowInterfaces(input), input, compare, NULL, NULL, keyserializer, NULL, false, isUnstable(), abortSoon, NULL);
stopInput(input);
input = NULL;
if(abortSoon)
{
barrier->cancel();
return NULL;
}
if (!barrier->wait(false)) {
Sleep(1000); // let original error through
throw MakeThorException(TE_BarrierAborted,"SELFJOIN: Barrier Aborted");
}
rowcount_t totalrows;
return sorter->startMerge(totalrows);
}
示例2: start
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));
}