Skip to content

Commit

Permalink
fix metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Dec 8, 2023
1 parent e19f44b commit a7c9e01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cpp/core/shuffle/LocalPartitionWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ arrow::Status LocalPartitionWriter::init() {
}

arrow::Status LocalPartitionWriter::mergeSpills(uint32_t partitionId) {
for (auto spill : spills_) {
for (const auto& spill : spills_) {
// Read if partition exists in the spilled file and write to the final file.
if (spill->mergePos < spill->partitionSpillInfos.size() &&
spill->partitionSpillInfos[spill->mergePos].partitionId == partitionId) { // A hit.
Expand Down Expand Up @@ -285,7 +285,6 @@ arrow::Status LocalPartitionWriter::stop(ShuffleWriterMetrics* metrics) {
}
partitionLengths_[pid] = endInFinalFile - startInFinalFile;
}
RETURN_NOT_OK(finishEvict());

for (auto spill : spills_) {
// Check if all spilled data are merged.
Expand Down
2 changes: 1 addition & 1 deletion cpp/core/shuffle/Utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ arrow::Result<std::shared_ptr<arrow::RecordBatch>> makeCompressedRecordBatch(
int32_t bufferCompressThreshold,
CompressionMode compressionMode,
int64_t& compressionTime) {
ScopedTimer{compressionTime};
ScopedTimer timer{compressionTime};
std::vector<std::shared_ptr<arrow::Array>> arrays;
// header col, numRows, compressionType
{
Expand Down

0 comments on commit a7c9e01

Please sign in to comment.