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

Method EnqueueBatchWithTimeout

be/src/exec/scan-node.cc:356–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356bool ScanNode::ScannerThreadState::EnqueueBatchWithTimeout(
357 unique_ptr<RowBatch>* row_batch, int64_t timeout_micros) {
358 // Only need to count tuple_data_pool() bytes since after IMPALA-5307, no buffers are
359 // returned from the scan node.
360 int64_t bytes = (*row_batch)->tuple_data_pool()->total_reserved_bytes();
361 // Transfer memory ownership before enqueueing. If the caller retries, this transfer
362 // is idempotent.
363 (*row_batch)->SetMemTracker(row_batches_mem_tracker_);
364 if (!batch_queue_->AddBatchWithTimeout(move(*row_batch), timeout_micros)) {
365 return false;
366 }
367 COUNTER_ADD(row_batches_enqueued_, 1);
368 COUNTER_ADD(row_batch_bytes_enqueued_, bytes);
369 return true;
370}
371
372void ScanNode::ScannerThreadState::Shutdown() {
373 if (batch_queue_ != nullptr) batch_queue_->Shutdown();

Callers 1

ProcessScanTokenMethod · 0.80

Calls 5

moveFunction · 0.85
total_reserved_bytesMethod · 0.80
tuple_data_poolMethod · 0.80
AddBatchWithTimeoutMethod · 0.80
SetMemTrackerMethod · 0.45

Tested by

no test coverage detected