Skip to content

Commit 03809ee

Browse files
committed
Move the cloud code into the ROCKSDB_NAMESPACE
This namespace override was added to RocksDB 6.8.1 and now the cloud code matches it.
1 parent 587d77a commit 03809ee

31 files changed

+66
-73
lines changed

cloud/aws/aws_env.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "cloud/aws/aws_file.h"
3131
#include "cloud/db_cloud_impl.h"
3232

33-
namespace rocksdb {
33+
namespace ROCKSDB_NAMESPACE {
3434

3535
static const std::unordered_map<std::string, AwsAccessType> AwsAccessTypeMap = {
3636
{"undefined", AwsAccessType::kUndefined},
@@ -600,4 +600,4 @@ std::string AwsEnv::GetWALCacheDir() {
600600
}
601601

602602
#endif // USE_AWS
603-
} // namespace rocksdb
603+
} // namespace ROCKSDB_NAMESPACE

cloud/aws/aws_env.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <list>
1919
#include <unordered_map>
2020

21-
namespace rocksdb {
21+
namespace ROCKSDB_NAMESPACE {
2222

2323
class S3ReadableFile;
2424

@@ -116,6 +116,6 @@ class AwsEnv : public CloudEnvImpl {
116116
Random64 rng_;
117117
};
118118

119-
} // namespace rocksdb
119+
} // namespace ROCKSDB_NAMESPACE
120120

121121
#endif // USE_AWS

cloud/aws/aws_file.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
#ifdef USE_AWS
55

66
#include <aws/core/Aws.h>
7+
#include "rocksdb/rocksdb_namespace.h"
78

8-
namespace rocksdb {
9+
namespace ROCKSDB_NAMESPACE {
910
inline Aws::String ToAwsString(const std::string& s) {
1011
return Aws::String(s.data(), s.size());
1112
}
1213

13-
} // namespace rocksdb
14+
} // namespace ROCKSDB_NAMESPACE
1415

1516
#endif /* USE_AWS */

cloud/aws/aws_kafka.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#ifdef USE_KAFKA
1919
#include <librdkafka/rdkafkacpp.h>
20-
namespace rocksdb {
20+
namespace ROCKSDB_NAMESPACE {
2121
namespace cloud {
2222
namespace kafka {
2323

@@ -416,11 +416,11 @@ CloudLogWritableFile* KafkaController::CreateWritableFile(
416416

417417
} // namespace kafka
418418
} // namespace cloud
419-
} // namespace rocksdb
419+
} // namespace ROCKSDB_NAMESPACE
420420

421421
#endif /* USE_KAFKA */
422422

423-
namespace rocksdb {
423+
namespace ROCKSDB_NAMESPACE {
424424
Status CloudLogControllerImpl::CreateKafkaController(
425425
std::shared_ptr<CloudLogController>* output) {
426426
#ifndef USE_KAFKA
@@ -433,4 +433,4 @@ Status CloudLogControllerImpl::CreateKafkaController(
433433
return Status::OK();
434434
#endif // USE_KAFKA
435435
}
436-
} // namespace rocksdb
436+
} // namespace ROCKSDB_NAMESPACE

cloud/aws/aws_kinesis.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include <aws/kinesis/model/Record.h>
3333
#include <aws/kinesis/model/ShardIteratorType.h>
3434
#include <aws/kinesis/model/StreamDescription.h>
35-
namespace rocksdb {
35+
namespace ROCKSDB_NAMESPACE {
3636
namespace cloud {
3737
namespace kinesis {
3838

@@ -481,10 +481,10 @@ CloudLogWritableFile* KinesisController::CreateWritableFile(
481481

482482
} // namespace kinesis
483483
} // namespace cloud
484-
} // namespace rocksdb
484+
} // namespace ROCKSDB_NAMESPACE
485485
#endif /* USE_AWS */
486486

487-
namespace rocksdb {
487+
namespace ROCKSDB_NAMESPACE {
488488
Status CloudLogControllerImpl::CreateKinesisController(
489489
std::shared_ptr<CloudLogController>* output) {
490490
#ifndef USE_AWS
@@ -497,4 +497,4 @@ Status CloudLogControllerImpl::CreateKinesisController(
497497
return Status::OK();
498498
#endif /* USE_AWS */
499499
}
500-
} // namespace rocksdb
500+
} // namespace ROCKSDB_NAMESPACE

cloud/aws/aws_retry.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <aws/core/client/RetryStrategy.h>
1414
#endif // USE_AWS
1515

16-
namespace rocksdb {
16+
namespace ROCKSDB_NAMESPACE {
1717
#ifdef USE_AWS
1818
//
1919
// Ability to configure retry policies for the AWS client
@@ -129,4 +129,4 @@ Status AwsCloudOptions::GetClientConfiguration(
129129
}
130130
#endif /* USE_AWS */
131131

132-
} // namespace rocksdb
132+
} // namespace ROCKSDB_NAMESPACE

cloud/aws/aws_s3.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
#include "util/stderr_logger.h"
5252
#include "util/string_util.h"
5353

54-
namespace rocksdb {
54+
namespace ROCKSDB_NAMESPACE {
5555
#ifdef USE_AWS
5656
class CloudRequestCallbackGuard {
5757
public:
@@ -877,4 +877,4 @@ Status CloudStorageProviderImpl::CreateS3Provider(
877877
return Status::OK();
878878
#endif /* USE_AWS */
879879
}
880-
} // namespace rocksdb
880+
} // namespace ROCKSDB_NAMESPACE

cloud/cloud_env.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "rocksdb/options.h"
1616
#include "rocksdb/status.h"
1717

18-
namespace rocksdb {
18+
namespace ROCKSDB_NAMESPACE {
1919

2020
bool CloudEnvOptions::GetNameFromEnvironment(const char* name, const char* alt,
2121
std::string* result) {
@@ -144,5 +144,5 @@ Status CloudEnv::NewAwsEnv(Env* base_env, const CloudEnvOptions& options,
144144
}
145145
#endif
146146

147-
} // namespace rocksdb
147+
} // namespace ROCKSDB_NAMESPACE
148148
#endif // ROCKSDB_LITE

cloud/cloud_env_impl.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "rocksdb/status.h"
2121
#include "util/xxhash.h"
2222

23-
namespace rocksdb {
23+
namespace ROCKSDB_NAMESPACE {
2424

2525
CloudEnvImpl::CloudEnvImpl(const CloudEnvOptions& opts, Env* base,
2626
const std::shared_ptr<Logger>& l)
@@ -1701,5 +1701,5 @@ Status CloudEnvImpl::Prepare() {
17011701
}
17021702
return s;
17031703
}
1704-
} // namespace rocksdb
1704+
} // namespace ROCKSDB_NAMESPACE
17051705
#endif // ROCKSDB_LITE

cloud/cloud_env_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "rocksdb/env.h"
1212
#include "rocksdb/status.h"
1313

14-
namespace rocksdb {
14+
namespace ROCKSDB_NAMESPACE {
1515
class CloudStorageReadableFile;
1616

1717
//
@@ -301,4 +301,4 @@ class CloudEnvImpl : public CloudEnv {
301301
static constexpr const char* SCRATCH_LOCAL_DIR = "/tmp";
302302
};
303303

304-
} // namespace rocksdb
304+
} // namespace ROCKSDB_NAMESPACE

0 commit comments

Comments
 (0)