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

Method Write

be/src/exec/hdfs-table-writer.cc:45–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45Status HdfsTableWriter::Write(const uint8_t* data, int32_t len) {
46 DCHECK_GE(len, 0);
47 DCHECK(output_->tmp_hdfs_file != nullptr);
48 int ret = hdfsWrite(output_->hdfs_connection, output_->tmp_hdfs_file, data, len);
49 if (ret == -1) {
50 string error_msg = GetHdfsErrorMsg("");
51 stringstream msg;
52 msg << "Failed to write data (length: " << len
53 << ") to Hdfs file: " << output_->current_file_name
54 << " " << error_msg;
55 return Status(msg.str());
56 }
57 COUNTER_ADD(parent_->bytes_written_counter(), len);
58 stats_.set_bytes_written(stats_.bytes_written() + len);
59 return Status::OK();
60}
61}

Callers

nothing calls this directly

Calls 6

GetHdfsErrorMsgFunction · 0.85
OKFunction · 0.85
bytes_written_counterMethod · 0.80
StatusClass · 0.70
strMethod · 0.45
bytes_writtenMethod · 0.45

Tested by

no test coverage detected