Skip to content

Commit 4d94911

Browse files
committed
Fix ROCKSDB_NAMESPACE for missing files
1 parent d7a1525 commit 4d94911

File tree

9 files changed

+32
-28
lines changed

9 files changed

+32
-28
lines changed

cloud/aws/aws_kafka.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Status CloudLogControllerImpl::CreateKafkaController(
429429
"In order to use Kafka, make sure you're compiling with "
430430
"USE_KAFKA=1");
431431
#else
432-
output->reset(new rocksdb::cloud::kafka::KafkaController());
432+
output->reset(new ROCKSDB_NAMESPACE::cloud::kafka::KafkaController());
433433
return Status::OK();
434434
#endif // USE_KAFKA
435435
}

cloud/aws/aws_kinesis.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ Status CloudLogControllerImpl::CreateKinesisController(
493493
"In order to use Kinesis, make sure you're compiling with "
494494
"USE_AWS=1");
495495
#else
496-
output->reset(new rocksdb::cloud::kinesis::KinesisController());
496+
output->reset(new ROCKSDB_NAMESPACE::cloud::kinesis::KinesisController());
497497
return Status::OK();
498498
#endif /* USE_AWS */
499499
}

cloud/db_cloud_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ TEST_F(CloudTest, SharedBlockCache) {
14911491
cloud_env_options_.keep_local_sst_files = false;
14921492

14931493
// Share the block cache.
1494-
rocksdb::BlockBasedTableOptions bbto;
1494+
BlockBasedTableOptions bbto;
14951495
bbto.block_cache = NewLRUCache(10 * 1024 * 1024);
14961496
bbto.format_version = 4;
14971497
options_.table_factory.reset(NewBlockBasedTableFactory(bbto));

cloud/examples/cloud_dump.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ int main() {
8282
}
8383

8484
// print all values in the database
85-
rocksdb::Iterator* it = db->NewIterator(rocksdb::ReadOptions());
85+
ROCKSDB_NAMESPACE::Iterator* it =
86+
db->NewIterator(ROCKSDB_NAMESPACE::ReadOptions());
8687
for (it->SeekToFirst(); it->Valid(); it->Next()) {
8788
std::cout << it->key().ToString() << ": " << it->value().ToString()
8889
<< std::endl;
@@ -93,7 +94,7 @@ int main() {
9394

9495
// verify that the data is somewhat sane by manaully scanning for cfs
9596
std::vector<std::string> cf_names;
96-
s = rocksdb::DB::ListColumnFamilies(options, kDBPath, &cf_names);
97+
s = ROCKSDB_NAMESPACE::DB::ListColumnFamilies(options, kDBPath, &cf_names);
9798
for (std::string cf: cf_names) {
9899
std::cout << " Found Column Family " << cf;
99100
}

cloud/examples/cloud_durable_example.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ int main() {
112112
assert(value == "value");
113113

114114
// print all values in the database
115-
rocksdb::Iterator* it = db->NewIterator(rocksdb::ReadOptions());
115+
ROCKSDB_NAMESPACE::Iterator* it =
116+
db->NewIterator(ROCKSDB_NAMESPACE::ReadOptions());
116117
for (it->SeekToFirst(); it->Valid(); it->Next()) {
117118
std::cout << it->key().ToString() << ": " << it->value().ToString()
118119
<< std::endl;

db/db_test_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ Options DBTestBase::GetOptions(
650650
}
651651

652652
// get AWS credentials
653-
rocksdb::CloudEnvOptions coptions;
653+
CloudEnvOptions coptions;
654654
CloudEnv* cenv = nullptr;
655655
std::string region;
656656
coptions.TEST_Initialize("dbtest.", prefix, region);

include/rocksdb/cloud/db_cloud.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class DBCloud : public StackableDB {
2424
// This API is to open a DB when key-values are to be made durable by
2525
// backing up database state into a cloud-storage system like S3.
2626
// All kv updates are persisted in cloud-storage.
27-
// options.env is an object of type rocksdb::CloudEnv and the cloud
27+
// options.env is an object of type ROCKSDB_NAMESPACE::CloudEnv and the cloud
2828
// buckets are specified there.
2929
static Status Open(const Options& options, const std::string& name,
3030
const std::string& persistent_cache_path,

include/rocksdb/pluggable_compaction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
#include "rocksdb/options.h"
1414

15-
namespace rocksdb {
15+
namespace ROCKSDB_NAMESPACE {
1616

1717
/**
1818
* Defines all the parameters of the pluggable compaction interface.
@@ -106,4 +106,4 @@ struct OutputFile {
106106
SequenceNumber largest_seqno;
107107
};
108108

109-
} // namespace rocksdb
109+
} // namespace ROCKSDB_NAMESPACE

tools/db_bench_tool.cc

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,13 +1262,14 @@ enum RepFactory {
12621262

12631263
// create Factory for creating S3 Envs
12641264
#ifdef USE_AWS
1265-
rocksdb::Env* CreateAwsEnv(const std::string& dbpath ,
1266-
std::unique_ptr<rocksdb::Env>* result) {
1265+
ROCKSDB_NAMESPACE::Env* CreateAwsEnv(
1266+
const std::string& dbpath,
1267+
std::unique_ptr<ROCKSDB_NAMESPACE::Env>* result) {
12671268
fprintf(stderr, "Creating AwsEnv for path %s\n", dbpath.c_str());
1268-
std::shared_ptr<rocksdb::Logger> info_log;
1269-
info_log.reset(new rocksdb::StderrLogger(
1270-
rocksdb::InfoLogLevel::WARN_LEVEL));
1271-
rocksdb::CloudEnvOptions coptions;
1269+
std::shared_ptr<ROCKSDB_NAMESPACE::Logger> info_log;
1270+
info_log.reset(new ROCKSDB_NAMESPACE::StderrLogger(
1271+
ROCKSDB_NAMESPACE::InfoLogLevel::WARN_LEVEL));
1272+
ROCKSDB_NAMESPACE::CloudEnvOptions coptions;
12721273
std::string region;
12731274
if (FLAGS_aws_access_id.size() != 0) {
12741275
coptions.credentials.InitializeSimple(FLAGS_aws_access_id,
@@ -1279,23 +1280,24 @@ rocksdb::Env* CreateAwsEnv(const std::string& dbpath ,
12791280

12801281
coptions.keep_local_sst_files = FLAGS_keep_local_sst_files;
12811282
coptions.TEST_Initialize("dbbench.", "", region);
1282-
rocksdb::CloudEnv* s;
1283-
rocksdb::Status st = rocksdb::AwsEnv::NewAwsEnv(rocksdb::Env::Default(),
1284-
coptions,
1285-
std::move(info_log),
1286-
&s);
1283+
ROCKSDB_NAMESPACE::CloudEnv* s;
1284+
ROCKSDB_NAMESPACE::Status st = ROCKSDB_NAMESPACE::AwsEnv::NewAwsEnv(
1285+
ROCKSDB_NAMESPACE::Env::Default(), coptions, std::move(info_log), &s);
12871286
assert(st.ok());
1288-
((rocksdb::CloudEnvImpl*)s)->TEST_DisableCloudManifest();
1287+
((ROCKSDB_NAMESPACE::CloudEnvImpl*)s)->TEST_DisableCloudManifest();
12891288
result->reset(s);
12901289
return s;
12911290
}
12921291

1293-
static const auto & s3_reg = rocksdb::ObjectLibrary::Default()->Register<rocksdb::Env>(
1294-
"s3://.*", [](const std::string& uri,
1295-
std::unique_ptr<rocksdb::Env>* env_guard, std::string*) {
1296-
CreateAwsEnv(uri, env_guard);
1297-
return env_guard->get();
1298-
});
1292+
static const auto& s3_reg =
1293+
ROCKSDB_NAMESPACE::ObjectLibrary::Default()
1294+
-> Register<ROCKSDB_NAMESPACE::Env>(
1295+
"s3://.*", [](const std::string& uri,
1296+
std::unique_ptr<ROCKSDB_NAMESPACE::Env>* env_guard,
1297+
std::string*) {
1298+
CreateAwsEnv(uri, env_guard);
1299+
return env_guard->get();
1300+
});
12991301
#endif /* USE_AWS */
13001302

13011303
static enum RepFactory StringToRepFactory(const char* ctype) {

0 commit comments

Comments
 (0)