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

Method Open

be/src/exec/tuple-text-file-reader.cc:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24TupleTextFileReader::TupleTextFileReader(const std::string& path) : path_(path) {}
25
26Status TupleTextFileReader::Open() {
27 if (!reader_.is_open()) {
28 reader_.open(path_, std::ios::in | std::ios::binary);
29 if (!reader_.is_open()) {
30 return Status(TErrorCode::DISK_IO_ERROR,
31 "open tuple text reader on " + path_ + " failed", GetStrErrMsg());
32 }
33 reader_.seekg(0, std::ios::end);
34 file_size_ = reader_.tellg();
35 reader_.seekg(0, std::ios::beg);
36 }
37 return Status();
38}
39
40void TupleTextFileReader::Close() {
41 if (reader_.is_open()) {

Callers

nothing calls this directly

Calls 4

GetStrErrMsgFunction · 0.85
StatusClass · 0.70
openMethod · 0.65
is_openMethod · 0.45

Tested by

no test coverage detected