本文整理汇总了C++中OwnedConstThorRow::getClear方法的典型用法代码示例。如果您正苦于以下问题:C++ OwnedConstThorRow::getClear方法的具体用法?C++ OwnedConstThorRow::getClear怎么用?C++ OwnedConstThorRow::getClear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OwnedConstThorRow
的用法示例。
在下文中一共展示了OwnedConstThorRow::getClear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
if (eogNext || eof)
{
eogNext = false;
return NULL;
}
OwnedConstThorRow prev = next.getClear();
next.setown(getNext());
if (next && !helper->isSameGroup(prev, next))
{
noteEndOfGroup();
eogNext = true;
}
if (prev)
{
dataLinkIncrement();
return prev.getClear();
}
if (prevEog)
{
noteEndOfGroup();
eof = true;
}
prevEog = true;
return NULL;
}
示例2: t
const void *nextRowGENoCatch(const void *seek, unsigned numFields, bool &wasCompleteMatch, const SmartStepExtra &stepExtra)
{
ActivityTimer t(totalCycles, timeActivities, NULL);
while (!abortSoon)
{
OwnedConstThorRow ret = input->nextRowGE(seek, numFields, wasCompleteMatch, stepExtra);
if (!ret)
{
abortSoon = true;
return NULL;
}
if (!wasCompleteMatch)
{
anyThisGroup = false; // RKC->GH - is this right??
return ret.getClear();
}
if (helper->isValid(ret))
{
anyThisGroup = true;
dataLinkIncrement();
return ret.getClear();
}
if (!stepExtra.returnMismatches())
return nextRow();
if (stepCompare->docompare(ret, seek, numFields) != 0)
{
wasCompleteMatch = false;
anyThisGroup = false; // WHY?
return ret.getClear();
}
}
return NULL;
}
示例3: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities, NULL);
while (!abortSoon) {
if (rowIter->isValid()) {
anyThisGroup = true;
OwnedConstThorRow r = rowIter->getRow();
dataLinkIncrement();
rowIter->next();
return r.getClear();
}
curRow.setown(input->nextRow());
if (!curRow) {
if (anyThisGroup) {
anyThisGroup = false;
break;
}
curRow.setown(input->nextRow());
if (!curRow)
break;
}
processRecord(curRow.get());
rowIter->first();
}
return NULL;
}
示例4: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
while(!abortSoon)
{
OwnedConstThorRow row = input->nextRow();
if(!row) {
numToSkip = whichSample ? whichSample - 1 : 0;
if(anyThisGroup) {
anyThisGroup = false;
break;
}
row.setown(input->nextRow());
if(!row)
break;
}
if(numToSkip == 0) {
anyThisGroup = true;
numToSkip = numSamples - 1;
dataLinkIncrement();
return row.getClear();
}
numToSkip--;
}
return NULL;
}
示例5: processRows
bool processRows()
{
// NB sends a single buffer
CriticalBlock block(crit);
bool sent = false;
try {
if (!socket)
return false;
if (!started)
init();
loop {
OwnedConstThorRow row = iseq->nextRow();
if (!row) {
if (sent)
out->flush();
break;
}
out->putRow(row.getClear());
ndone ++;
sent = true;
if (out->bufferSent())
return true;
}
}
catch (IException *e) {
PrintExceptionLog(e,"CSortMergeBase processRows");
throw;
}
return sent;
}
示例6: t
const void *nextRowGENoCatch(const void * seek, unsigned numFields, bool &wasCompleteMatch, const SmartStepExtra &stepExtra)
{
if (!eos)
{
try
{
ActivityTimer t(totalCycles, timeActivities, NULL);
OwnedConstThorRow ret = input->nextRowGE(seek, numFields, wasCompleteMatch, stepExtra);
if (ret && wasCompleteMatch)
dataLinkIncrement();
return ret.getClear();
}
catch (IException *e)
{
eos = true;
ActPrintLog(e, NULL);
e->Release();
helper->onExceptionCaught();
}
catch (...)
{
eos = true;
helper->onExceptionCaught();
}
throwUnexpected(); // onExceptionCaught should have thrown something
}
return NULL;
}
示例7: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
if (!abortSoon)
{
if (firstget)
{
firstget = false;
while (skipped<skipCount)
{
OwnedConstThorRow row = input->ungroupedNextRow();
if (!row)
{
stop();
return NULL;
}
skipped++;
}
}
if (getDataLinkCount() < limit)
{
OwnedConstThorRow row = input->ungroupedNextRow();
if (row)
{
dataLinkIncrement();
return row.getClear();
}
}
stop(); // NB: really whatever is pulling, should stop asap.
}
return NULL;
}
示例8: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
if (first)
{
first = false;
if (container.queryLocalOrGrouped() || firstNode())
memset(tallies, 0, sizeof(unsigned)*numSets);
else
getTallies();
done = helper->setCounts(tallies);
}
if (!done)
{
while (!abortSoon)
{
OwnedConstThorRow row = inputStream->ungroupedNextRow();
if (!row)
break;
switch (helper->getRecordAction(row))
{
case 2:
done = true;
//fall through
case 1:
dataLinkIncrement();
return row.getClear();
}
}
}
if (!container.queryLocalOrGrouped() && !lastNode())
sendTallies();
return NULL;
}
示例9: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
if (!abortSoon)
{
for (;;)
{
if (0 == countThisGroup && skipCount)
{
unsigned skipped = 0;
do
{
OwnedConstThorRow row = inputStream->nextRow();
if (row)
skipped++;
else
{
if (0 == skipped)
{
doStopInput();
return NULL;
}
skipped = 0; // reset, skip group
}
}
while (skipped<skipCount);
}
if (countThisGroup < limit)
{
OwnedConstThorRow row = inputStream->nextRow();
if (row)
{
countThisGroup++;
dataLinkIncrement();
return row.getClear();
}
else if (0 == countThisGroup && 0==skipCount)
{
doStopInput();
return NULL;
}
}
else
{ // consume rest of group
for (;;)
{
OwnedConstThorRow row = inputStream->nextRow();
if (!row)
break;
}
}
if (countThisGroup)
break; // return eog and reset
}
}
countThisGroup = 0;
return NULL;
}
示例10: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities, NULL);
if(abortSoon || eof || eogNext)
{
eogNext = false;
return NULL;
}
if (refill) {
refill=false;
index=0;
try
{
group.reset(false);
loop {
OwnedConstThorRow row = input->nextRow();
if (!row)
break;
group.append(row.getClear());
if (group.isFull()) {
StringBuffer errStr("GROUPSORT");
errStr.append("(").append(container.queryId()).append(") ");
errStr.append("exceeded available memory. records=").append(group.ordinality()).append(", memory usage=").append((unsigned)(group.totalSize()/1024)).append('k');
IException *e = MakeActivityException(this, TE_TooMuchData, "%s", errStr.str());
EXCLOG(e, NULL);
throw e;
}
}
if (group.ordinality()==0) {
eof = true;
return NULL;
}
group.sort(*icompare,!unstable);
}
catch (IOutOfMemException *e)
{
StringBuffer errStr("GROUPSORT");
errStr.append("(").append(container.queryId()).append(") ");
errStr.append("exceeded available memory. records=").append(group.ordinality()).append(", memory usage=").append((unsigned)(group.totalSize()/1024)).append('k');
errStr.append(": ").append(e->errorCode()).append(", ");
e->errorMessage(errStr);
e->Release();
IException *e2 = MakeActivityException(this, TE_TooMuchData, "%s", errStr.str());
EXCLOG(e2, NULL);
throw e2;
}
}
if(index >= group.ordinality())
{
refill = true;
return NULL; // eog
}
const void *row = group.itemClear(index++);
assertex(row);
dataLinkIncrement();
return row;
}
示例11: t
const void * nextRow()
{
ActivityTimer t(totalCycles, timeActivities);
OwnedConstThorRow row = input->nextRow();
if (!row)
return NULL;
dataLinkIncrement();
return row.getClear();
}
示例12: write
offset_t write(IRowStream *input)
{
StringBuffer tempname;
GetTempName(tempname,"srtmrg",false);
dataFile.setown(createIFile(tempname.str()));
Owned<IExtRowWriter> output = createRowWriter(dataFile, rowIf);
bool overflowed = false;
ActPrintLog(&activity, "Local Overflow Merge start");
unsigned ret=0;
loop
{
const void *_row = input->nextRow();
if (!_row)
break;
ret++;
OwnedConstThorRow row = _row;
offset_t start = output->getPosition();
output->putRow(row.getLink());
idx++;
if (idx==interval)
{
idx = 0;
if (!sampleRows.append(row.getClear()))
{
// JCSMORE used to check if 'isFull()' here, but only to warn
// I think this is bad news, if has run out of room here...
// should at least warn in workunit I suspect
overflowsize = output->getPosition();
if (!overflowed)
{
WARNLOG("Sample buffer full");
overflowed = true;
}
}
}
writeidxofs(start);
}
output->flush();
offset_t end = output->getPosition();
output.clear();
writeidxofs(end);
if (idxFileIO)
{
idxFileStream->flush();
idxFileStream.clear();
idxFileIO.clear();
}
if (overflowed)
WARNLOG("Overflowed by %"I64F"d", overflowsize);
ActPrintLog(&activity, "Local Overflow Merge done: overflow file '%s', size = %"I64F"d", dataFile->queryFilename(), dataFile->size());
return end;
}
示例13: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities);
if (abortSoon)
return NULL;
OwnedConstThorRow row = output->nextRow();
if (!row)
return NULL;
dataLinkIncrement();
return row.getClear();
}
示例14: t
CATCH_NEXTROW()
{
ActivityTimer t(totalCycles, timeActivities, NULL);
if(joinhelper) {
OwnedConstThorRow row = joinhelper->nextRow();
if (row) {
dataLinkIncrement();
return row.getClear();
}
}
return NULL;
}
示例15: ActPrintLog
const void *nextRow()
{
OwnedConstThorRow row = smartbuf->nextRow();
if (getexception)
throw getexception.getClear();
if (!row) {
#ifdef _FULL_TRACE
ActPrintLog(&activity, "ThorLookaheadCache eos %x",(unsigned)(memsize_t)this);
#endif
}
return row.getClear();
}