Skip to content

Commit 7efa12b

Browse files
authored
[Chore](gutil) remove gutil/builtin_type_hash gutil/jenkins_lookup2 (apache#51598)
remove gutil/builtin_type_hash gutil/jenkins_lookup2
1 parent 1030fe3 commit 7efa12b

File tree

89 files changed

+402
-936
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+402
-936
lines changed

be/src/agent/agent_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class PushTaskWorkerPool final : public TaskWorkerPoolIf {
105105
void AgentServer::start_workers(StorageEngine& engine, ExecEnv* exec_env) {
106106
for (const auto& path : exec_env->store_paths()) {
107107
try {
108-
string dpp_download_path_str = path.path + "/" + DPP_PREFIX;
108+
std::string dpp_download_path_str = path.path + "/" + DPP_PREFIX;
109109
std::filesystem::path dpp_download_path(dpp_download_path_str);
110110
if (std::filesystem::exists(dpp_download_path)) {
111111
std::filesystem::remove_all(dpp_download_path);

be/src/agent/task_worker_pool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,9 +1272,9 @@ void make_snapshot_callback(StorageEngine& engine, const TAgentTaskRequest& req)
12721272

12731273
LOG(INFO) << "get snapshot task. signature=" << req.signature;
12741274

1275-
string snapshot_path;
1275+
std::string snapshot_path;
12761276
bool allow_incremental_clone = false; // not used
1277-
std::vector<string> snapshot_files;
1277+
std::vector<std::string> snapshot_files;
12781278
Status status = engine.snapshot_mgr()->make_snapshot(snapshot_request, &snapshot_path,
12791279
&allow_incremental_clone);
12801280
if (status.ok() && snapshot_request.__isset.list_files) {
@@ -1323,7 +1323,7 @@ void release_snapshot_callback(StorageEngine& engine, const TAgentTaskRequest& r
13231323

13241324
LOG(INFO) << "get release snapshot task. signature=" << req.signature;
13251325

1326-
const string& snapshot_path = release_snapshot_request.snapshot_path;
1326+
const std::string& snapshot_path = release_snapshot_request.snapshot_path;
13271327
Status status = engine.snapshot_mgr()->release_snapshot(snapshot_path);
13281328
if (!status.ok()) {
13291329
LOG_WARNING("failed to release snapshot")

be/src/common/elf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <common/elf.h>
2424
#include <fcntl.h>
2525
#include <fmt/format.h>
26-
#include <gutil/macros.h>
2726
#include <sys/mman.h>
2827
#include <unistd.h>
2928
#include <vec/common/unaligned.h>
@@ -32,6 +31,7 @@
3231
#include <system_error>
3332

3433
#include "common/logging.h"
34+
#include "common/macros.h"
3535

3636
namespace doris {
3737

be/src/common/macros.h

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
18+
#pragma once
19+
20+
namespace doris {
21+
22+
// Retry on EINTR for functions like read() that return -1 on error.
23+
#define RETRY_ON_EINTR(err, expr) \
24+
do { \
25+
static_assert(std::is_signed_v<decltype(err)>, #err " must be a signed integer"); \
26+
(err) = (expr); \
27+
} while ((err) == -1 && errno == EINTR)
28+
29+
// Macro that allows definition of a variable appended with the current line
30+
// number in the source file. Typically for use by other macros to allow the
31+
// user to declare multiple variables with the same "base" name inside the same
32+
// lexical block.
33+
#define VARNAME_LINENUM(varname) VARNAME_LINENUM_INTERNAL(varname##_L, __LINE__)
34+
#define VARNAME_LINENUM_INTERNAL(v, line) VARNAME_LINENUM_INTERNAL2(v, line)
35+
#define VARNAME_LINENUM_INTERNAL2(v, line) v##line
36+
37+
} // namespace doris

be/src/common/signal_handler.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
#pragma once
3535

3636
#include <glog/logging.h>
37-
#include <gutil/macros.h>
3837

3938
#include <boost/stacktrace.hpp>
4039
#include <csignal>

be/src/exec/rowid_fetcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ Status RowIdStorageReader::read_by_rowids(const PMultiGetRequest& request,
414414
if (request.fetch_row_store()) {
415415
CHECK(tablet->tablet_schema()->has_row_store_for_all_columns());
416416
RowLocation loc(rowset_id, segment->id(), row_loc.ordinal_id());
417-
string* value = response->add_binary_row_data();
417+
std::string* value = response->add_binary_row_data();
418418
RETURN_IF_ERROR(scope_timer_run(
419419
[&]() { return tablet->lookup_row_data({}, loc, rowset, stats, *value); },
420420
&lookup_row_data_ms));

be/src/exprs/block_bloom_filter.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323
#include "vec/common/string_ref.h"
2424
#ifdef __AVX2__
2525
#include <immintrin.h>
26-
27-
#include "gutil/macros.h"
2826
#endif
27+
2928
#include "common/status.h"
30-
#include "fmt/format.h"
3129
#include "util/hash_util.hpp"
3230
#include "util/slice.h"
3331

@@ -82,7 +80,7 @@ class BlockBloomFilter {
8280

8381
#ifdef __AVX2__
8482

85-
static inline ATTRIBUTE_ALWAYS_INLINE __attribute__((__target__("avx2"))) __m256i make_mark(
83+
static __attribute__((always_inline, __target__("avx2"))) __m256i make_mark(
8684
const uint32_t hash) {
8785
const __m256i ones = _mm256_set1_epi32(1);
8886
const __m256i rehash = _mm256_setr_epi32(BLOOM_HASH_CONSTANTS);

be/src/gutil/hash/builtin_type_hash.h

Lines changed: 0 additions & 92 deletions
This file was deleted.

be/src/gutil/hash/jenkins_lookup2.h

Lines changed: 0 additions & 96 deletions
This file was deleted.

be/src/gutil/macros.h

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)