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

Method Read

cpp/src/arrow/io/hdfs.cc:178–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 }
177
178 Result<int64_t> Read(int64_t nbytes, void* buffer) {
179 RETURN_NOT_OK(CheckClosed());
180
181 int64_t total_bytes = 0;
182 while (total_bytes < nbytes) {
183 tSize ret = driver_->Read(
184 fs_, file_, reinterpret_cast<uint8_t*>(buffer) + total_bytes,
185 static_cast<tSize>(std::min<int64_t>(buffer_size_, nbytes - total_bytes)));
186 CHECK_FAILURE(ret, "read");
187 total_bytes += ret;
188 if (ret == 0) {
189 break;
190 }
191 }
192 return total_bytes;
193 }
194
195 Result<std::shared_ptr<Buffer>> Read(int64_t nbytes) {
196 RETURN_NOT_OK(CheckClosed());

Callers

nothing calls this directly

Calls 3

CheckClosedFunction · 0.70
ReadMethod · 0.45
ResizeMethod · 0.45

Tested by

no test coverage detected