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

Method ProcessScanToken

be/src/exec/kudu/kudu-scan-node.cc:204–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204Status KuduScanNode::ProcessScanToken(KuduScanner* scanner, const string& scan_token) {
205 bool eos;
206 RETURN_IF_ERROR(scanner->OpenNextScanToken(scan_token, &eos));
207 if (eos) return Status::OK();
208 while (!eos && !done_.Load()) {
209 unique_ptr<RowBatch> row_batch = std::make_unique<RowBatch>(row_desc(),
210 runtime_state_->batch_size(), mem_tracker());
211 RETURN_IF_ERROR(scanner->GetNext(row_batch.get(), &eos));
212 while (!done_.Load()) {
213 scanner->KeepKuduScannerAlive();
214 if (thread_state_.EnqueueBatchWithTimeout(&row_batch, 1000000)) {
215 break;
216 }
217 // Make sure that we still own the RowBatch if BlockingPutWithTimeout() timed out.
218 DCHECK(row_batch != nullptr);
219 }
220 }
221 if (eos) scan_ranges_complete_counter_->Add(1);
222 return Status::OK();
223}
224
225void KuduScanNode::RunScannerThread(
226 bool first_thread, const string& name, const string* initial_token) {

Callers

nothing calls this directly

Calls 9

OKFunction · 0.85
OpenNextScanTokenMethod · 0.80
batch_sizeMethod · 0.80
KeepKuduScannerAliveMethod · 0.80
getMethod · 0.65
LoadMethod · 0.45
GetNextMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected