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

Method GetExclusiveHdfsFileHandle

be/src/runtime/io/disk-io-mgr.cc:967–981  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967Status DiskIoMgr::GetExclusiveHdfsFileHandle(const hdfsFS& fs,
968 std::string* fname, int64_t mtime, RequestContext *reader,
969 unique_ptr<ExclusiveHdfsFileHandle>& fid_out) {
970 SCOPED_TIMER(reader->open_file_timer_);
971 unique_ptr<ExclusiveHdfsFileHandle> fid;
972 fid.reset(new ExclusiveHdfsFileHandle(fs, fname, mtime));
973 RETURN_IF_ERROR(fid->Init(&hdfs_monitor_));
974 fid_out.swap(fid);
975 ImpaladMetrics::IO_MGR_NUM_FILE_HANDLES_OUTSTANDING->Increment(1L);
976 // Every exclusive file handle is considered a cache miss
977 ImpaladMetrics::IO_MGR_CACHED_FILE_HANDLES_HIT_RATIO->Update(0L);
978 ImpaladMetrics::IO_MGR_CACHED_FILE_HANDLES_MISS_COUNT->Increment(1L);
979 reader->cached_file_handles_miss_count_.Add(1L);
980 return Status::OK();
981}
982
983void DiskIoMgr::ReleaseExclusiveHdfsFileHandle(unique_ptr<ExclusiveHdfsFileHandle> fid) {
984 DCHECK(fid != nullptr);

Callers 1

DoOpenMethod · 0.80

Calls 7

OKFunction · 0.85
resetMethod · 0.65
InitMethod · 0.45
swapMethod · 0.45
IncrementMethod · 0.45
UpdateMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected