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

Method Close

be/src/exec/data-source-scan-node.cc:145–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145Status SharedJdbcConnection::Close(const extdatasource::TCloseParams& params,
146 extdatasource::TCloseResult* result) {
147 // Only the last active instance closes the shared JDBC connection.
148 if (ref_count_.fetch_sub(1, std::memory_order_acq_rel) == 1) {
149 // Guard against the case where Open() was never called or failed: only invoke
150 // executor_.Close() if the Java data source was successfully opened.
151 std::unique_lock<std::mutex> lk(open_mu_);
152 bool should_close = open_done_ && open_status_.ok();
153 lk.unlock();
154 if (should_close) return executor_.Close(params, result);
155 }
156 return Status::OK();
157}
158
159// DataSourceScanPlanNode
160Status DataSourceScanPlanNode::CreateExecNode(RuntimeState* state,

Callers

nothing calls this directly

Calls 7

OKFunction · 0.85
total_time_counterMethod · 0.80
resetMethod · 0.65
okMethod · 0.45
unlockMethod · 0.45
emptyMethod · 0.45
LogErrorMethod · 0.45

Tested by

no test coverage detected