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

Method ClosePartitionFile

be/src/exec/table-sink-base.cc:85–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85Status TableSinkBase::ClosePartitionFile(
86 RuntimeState* state, OutputPartition* partition) {
87 if (partition->tmp_hdfs_file == nullptr) return Status::OK();
88 int hdfs_ret = hdfsCloseFile(partition->hdfs_connection, partition->tmp_hdfs_file);
89 VLOG_FILE << "hdfsCloseFile() file=" << partition->current_file_name;
90 partition->tmp_hdfs_file = nullptr;
91 ImpaladMetrics::NUM_FILES_OPEN_FOR_INSERT->Increment(-1);
92 if (hdfs_ret != 0) {
93 return Status(ErrorMsg(TErrorCode::GENERAL,
94 GetHdfsErrorMsg("Failed to close HDFS file: ",
95 partition->current_file_name)));
96 }
97 return Status::OK();
98}
99
100string TableSinkBase::GetPartitionName(int i) {
101 if (IsIceberg()) {

Callers

nothing calls this directly

Calls 5

OKFunction · 0.85
ErrorMsgClass · 0.85
GetHdfsErrorMsgFunction · 0.85
StatusClass · 0.70
IncrementMethod · 0.45

Tested by

no test coverage detected