This function registers the ThreadTokenAvailableCb to start up the initial scanner threads. Scan ranges are not issued until the first GetNext() call; scanner threads will block on ranges_issued_barrier_ until ranges are issued.
| 162 | // threads. Scan ranges are not issued until the first GetNext() call; scanner threads |
| 163 | // will block on ranges_issued_barrier_ until ranges are issued. |
| 164 | Status HdfsScanNode::Open(RuntimeState* state) { |
| 165 | SCOPED_TIMER(runtime_profile_->total_time_counter()); |
| 166 | ScopedOpenEventAdder ea(this); |
| 167 | RETURN_IF_ERROR(HdfsScanNodeBase::Open(state)); |
| 168 | thread_state_.Open(this, FLAGS_max_row_batches); |
| 169 | |
| 170 | thread_avail_cb_id_ = runtime_state_->resource_pool()->AddThreadAvailableCb( |
| 171 | bind<void>(mem_fn(&HdfsScanNode::ThreadTokenAvailableCb), this, _1)); |
| 172 | return Status::OK(); |
| 173 | } |
| 174 | |
| 175 | void HdfsScanNode::Close(RuntimeState* state) { |
| 176 | if (is_closed()) return; |
nothing calls this directly
no test coverage detected