Change namespace from leveldb to rocksdb

Summary:
Change namespace from leveldb to rocksdb. This allows a single
application to link in open-source leveldb code as well as
rocksdb code into the same process.

Test Plan: compile rocksdb

Reviewers: emayanke

Reviewed By: emayanke

CC: leveldb

Differential Revision: https://reviews.facebook.net/D13287
This commit is contained in:
Dhruba Borthakur
2013-10-03 21:49:15 -07:00
parent b3ed08129b
commit a143ef9b38
226 changed files with 871 additions and 815 deletions

View File

@@ -11,7 +11,7 @@
#include "util/testharness.h"
#include "util/ldb_cmd.h"
namespace leveldb {
namespace rocksdb {
class ReduceLevelTest {
public:
@@ -72,11 +72,11 @@ private:
Status ReduceLevelTest::OpenDB(bool create_if_missing, int num_levels,
int mem_table_compact_level) {
leveldb::Options opt;
rocksdb::Options opt;
opt.num_levels = num_levels;
opt.create_if_missing = create_if_missing;
opt.max_mem_compaction_level = mem_table_compact_level;
leveldb::Status st = leveldb::DB::Open(opt, dbname_, &db_);
rocksdb::Status st = rocksdb::DB::Open(opt, dbname_, &db_);
if (!st.ok()) {
fprintf(stderr, "Can't open the db:%s\n", st.ToString().c_str());
}
@@ -84,7 +84,7 @@ Status ReduceLevelTest::OpenDB(bool create_if_missing, int num_levels,
}
bool ReduceLevelTest::ReduceLevels(int target_level) {
std::vector<std::string> args = leveldb::ReduceDBLevelsCommand::PrepareArgs(
std::vector<std::string> args = rocksdb::ReduceDBLevelsCommand::PrepareArgs(
dbname_, target_level, false);
LDBCommand* level_reducer = LDBCommand::InitFromCmdLineArgs(args);
level_reducer->Run();
@@ -193,5 +193,5 @@ TEST(ReduceLevelTest, All_Levels) {
}
int main(int argc, char** argv) {
return leveldb::test::RunAllTests();
return rocksdb::test::RunAllTests();
}