MCPcopy Create free account
hub / github.com/apache/impala / ReadStream

Method ReadStream

be/src/runtime/data-stream-test.cc:487–501  ·  view source on GitHub ↗

Deplete stream and print batches

Source from the content-addressed store, hash-verified

485
486 // Deplete stream and print batches
487 void ReadStream(ReceiverInfo* info) {
488 RowBatch* batch;
489 VLOG_QUERY << "start reading";
490 while (!(info->status = info->stream_recvr->GetBatch(&batch)).IsCancelled() &&
491 (batch != nullptr)) {
492 VLOG_QUERY << "read batch #rows=" << batch->num_rows();
493 for (int i = 0; i < batch->num_rows(); ++i) {
494 TupleRow* row = batch->GetRow(i);
495 info->data_values.insert(*static_cast<int64_t*>(row->GetTuple(0)->GetSlot(0)));
496 }
497 SleepForMs(100); // slow down receiver to exercise buffering logic
498 }
499 if (info->status.IsCancelled()) VLOG_QUERY << "reader is cancelled";
500 VLOG_QUERY << "done reading";
501 }
502
503 void ReadStreamMerging(ReceiverInfo* info, RuntimeProfile* profile,
504 TupleRowComparator* less_than_comparator) {

Callers

nothing calls this directly

Calls 7

IsCancelledMethod · 0.45
GetBatchMethod · 0.45
num_rowsMethod · 0.45
GetRowMethod · 0.45
insertMethod · 0.45
GetSlotMethod · 0.45
GetTupleMethod · 0.45

Tested by

no test coverage detected