| 202 | } |
| 203 | |
| 204 | Status 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 | |
| 225 | void KuduScanNode::RunScannerThread( |
| 226 | bool first_thread, const string& name, const string* initial_token) { |
nothing calls this directly
no test coverage detected