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

Method Write

be/src/kudu/util/net/socket.cc:415–430  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415Status Socket::Write(const uint8_t *buf, int32_t amt, int32_t *nwritten) {
416 if (amt <= 0) {
417 return Status::NetworkError(
418 StringPrintf("invalid send of %" PRId32 " bytes",
419 amt), Slice(), EINVAL);
420 }
421 DCHECK_GE(fd_, 0);
422 int res;
423 RETRY_ON_EINTR(res, ::send(fd_, buf, amt, MSG_NOSIGNAL));
424 if (res < 0) {
425 int err = errno;
426 return Status::NetworkError("write error", ErrnoToString(err), err);
427 }
428 *nwritten = res;
429 return Status::OK();
430}
431
432Status Socket::Writev(const struct ::iovec *iov, int iov_len,
433 int64_t *nwritten) {

Callers 6

TEST_FFunction · 0.45
TEST_PFunction · 0.45
WriteRandomChunkMethod · 0.45
AppendBytesMethod · 0.45
WriteTestFileMethod · 0.45
TEST_PFunction · 0.45

Calls 5

NetworkErrorFunction · 0.85
StringPrintfFunction · 0.85
ErrnoToStringFunction · 0.85
OKFunction · 0.85
SliceClass · 0.50

Tested by 5

TEST_FFunction · 0.36
TEST_PFunction · 0.36
WriteRandomChunkMethod · 0.36
WriteTestFileMethod · 0.36
TEST_PFunction · 0.36