This is an automated email from the ASF dual-hosted git repository. alexey pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kudu.git
commit 18ff6d979d74c59b4412c210ec22f4c5772e311d Author: Alexey Serbin <[email protected]> AuthorDate: Wed Nov 29 14:56:48 2023 -0800 [cfile] remove redundant StringPrintf in status messages Change-Id: If00753290b9a45765f1eeda01ec949b13d79181b Reviewed-on: http://gerrit.cloudera.org:8080/20740 Tested-by: Alexey Serbin <[email protected]> Reviewed-by: Yingchun Lai <[email protected]> --- src/kudu/cfile/binary_plain_block.cc | 6 +++--- src/kudu/cfile/binary_plain_block.h | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/kudu/cfile/binary_plain_block.cc b/src/kudu/cfile/binary_plain_block.cc index ed7c64111..2bd2670c9 100644 --- a/src/kudu/cfile/binary_plain_block.cc +++ b/src/kudu/cfile/binary_plain_block.cc @@ -35,6 +35,7 @@ #include "kudu/common/rowblock_memory.h" #include "kudu/common/schema.h" #include "kudu/common/types.h" +#include "kudu/gutil/port.h" #include "kudu/gutil/stringprintf.h" #include "kudu/gutil/strings/substitute.h" #include "kudu/util/coding.h" @@ -225,7 +226,7 @@ Status BinaryPlainBlockDecoder::ParseHeader() { // Only need to check 'p' overrun in the slow path, because 'p' may have // been within 16 bytes of 'limit'. LOG(WARNING) << "bad block: " << HexDump(data_); - return Status::Corruption(StringPrintf("unable to decode offsets in block")); + return Status::Corruption("unable to decode offsets in block"); } } dst_ptr += 4; @@ -237,8 +238,7 @@ Status BinaryPlainBlockDecoder::ParseHeader() { p = coding::DecodeGroupVarInt32_SlowButSafe(p, &ints[0], &ints[1], &ints[2], &ints[3]); if (PREDICT_FALSE(p > limit)) { LOG(WARNING) << "bad block: " << HexDump(data_); - return Status::Corruption( - StringPrintf("unable to decode offsets in block")); + return Status::Corruption("unable to decode offsets in block"); } for (int i = 0; i < rem; i++) { diff --git a/src/kudu/cfile/binary_plain_block.h b/src/kudu/cfile/binary_plain_block.h index 036d58983..ab029890a 100644 --- a/src/kudu/cfile/binary_plain_block.h +++ b/src/kudu/cfile/binary_plain_block.h @@ -26,21 +26,21 @@ // raw strings that were written // Offsets: [pointed to by offsets_pos] // gvint-encoded offsets pointing to the beginning of each string. -#ifndef KUDU_CFILE_BINARY_PLAIN_BLOCK_H -#define KUDU_CFILE_BINARY_PLAIN_BLOCK_H +#pragma once #include <sys/types.h> #include <cstddef> #include <cstdint> #include <cstring> +#include <utility> #include <vector> #include <glog/logging.h> #include "kudu/cfile/block_encodings.h" +#include "kudu/cfile/block_handle.h" #include "kudu/common/rowid.h" -#include "kudu/gutil/port.h" #include "kudu/gutil/ref_counted.h" #include "kudu/util/faststring.h" #include "kudu/util/slice.h" @@ -54,7 +54,6 @@ class SelectionVectorView; namespace cfile { -class BlockHandle; struct WriterOptions; class BinaryPlainBlockBuilder final : public BlockBuilder { @@ -206,5 +205,3 @@ class BinaryPlainBlockDecoder final : public BlockDecoder { } // namespace cfile } // namespace kudu - -#endif // KUDU_CFILE_BINARY_PREFIX_BLOCK_H
