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

Method OpenHdfsFileWithTimeout

be/src/runtime/io/hdfs-monitored-ops.cc:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83Status HdfsMonitor::OpenHdfsFileWithTimeout(const hdfsFS& fs, const std::string* fname,
84 int flags, uint64_t blocksize, hdfsFile* fid_out) {
85 std::shared_ptr<OpenHdfsFileOp> op(new OpenHdfsFileOp(fs, fname, flags, blocksize));
86
87 // Submit the operation to the synchronous thread pool. If this times out, it returns
88 // an error status.
89 Status status = hdfs_worker_pool_->SynchronousOffer(op,
90 FLAGS_hdfs_operation_timeout_sec * MILLIS_PER_SEC);
91 RETURN_IF_ERROR(status);
92
93 // The operation didn't time out, and there wasn't an error. Get the handle.
94 *fid_out = op->GetFileHandle();
95 return Status::OK();
96}
97
98}
99

Callers 1

InitMethod · 0.80

Calls 3

OKFunction · 0.85
SynchronousOfferMethod · 0.80
GetFileHandleMethod · 0.45

Tested by

no test coverage detected