MCPcopy Create free account
hub / github.com/apache/arrow / OpenReadable

Method OpenReadable

cpp/src/arrow/filesystem/hdfs.cc:455–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453 }
454
455 Status OpenReadable(const std::string& path, int32_t buffer_size,
456 const io::IOContext& io_context,
457 std::shared_ptr<HdfsReadableFile>* file) {
458 errno = 0;
459 hdfsFile handle =
460 driver_->OpenFile(client_, path.c_str(), O_RDONLY, buffer_size, 0, 0);
461
462 if (handle == nullptr) {
463 return IOErrorFromErrno(errno, "Opening HDFS file '", path, "' failed");
464 }
465
466 // std::make_shared does not work with private ctors
467 std::shared_ptr<HdfsReadableFile> file_tmp;
468 ARROW_ASSIGN_OR_RAISE(file_tmp, HdfsReadableFile::Make(path, buffer_size, io_context,
469 driver_, client_, handle));
470 *file = std::move(file_tmp);
471 return Status::OK();
472 }
473
474 Status OpenReadable(const std::string& path, int32_t buffer_size,
475 std::shared_ptr<HdfsReadableFile>* file) {

Callers

nothing calls this directly

Calls 5

IOErrorFromErrnoFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50
OpenFileMethod · 0.45

Tested by

no test coverage detected