diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 44e7cd5ddb3..62460a849e3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -3,8 +3,6 @@ add_subdirectory(interface) add_subdirectory(client) add_subdirectory(meta) add_subdirectory(console) -add_subdirectory(wal) -add_subdirectory(raftex) add_subdirectory(kvstore) add_subdirectory(parser) add_subdirectory(dataman) diff --git a/src/kvstore/CMakeLists.txt b/src/kvstore/CMakeLists.txt index ce2cfcfa602..fd0c61e7dd9 100644 --- a/src/kvstore/CMakeLists.txt +++ b/src/kvstore/CMakeLists.txt @@ -8,5 +8,7 @@ add_library( ) add_dependencies(kvstore_obj base_obj meta_client) +add_subdirectory(raftex) +add_subdirectory(wal) add_subdirectory(test) diff --git a/src/raftex/CMakeLists.txt b/src/kvstore/raftex/CMakeLists.txt similarity index 100% rename from src/raftex/CMakeLists.txt rename to src/kvstore/raftex/CMakeLists.txt diff --git a/src/raftex/Host.cpp b/src/kvstore/raftex/Host.cpp similarity index 99% rename from src/raftex/Host.cpp rename to src/kvstore/raftex/Host.cpp index d098c9f0ee8..147df78b712 100644 --- a/src/raftex/Host.cpp +++ b/src/kvstore/raftex/Host.cpp @@ -5,9 +5,9 @@ */ #include "base/Base.h" -#include "raftex/Host.h" -#include "raftex/RaftPart.h" -#include "wal/FileBasedWal.h" +#include "kvstore/raftex/Host.h" +#include "kvstore/raftex/RaftPart.h" +#include "kvstore/wal/FileBasedWal.h" #include #include "network/NetworkUtils.h" diff --git a/src/raftex/Host.h b/src/kvstore/raftex/Host.h similarity index 100% rename from src/raftex/Host.h rename to src/kvstore/raftex/Host.h diff --git a/src/raftex/LogStrListIterator.cpp b/src/kvstore/raftex/LogStrListIterator.cpp similarity index 96% rename from src/raftex/LogStrListIterator.cpp rename to src/kvstore/raftex/LogStrListIterator.cpp index 9d47f0003ec..10b822e8de1 100644 --- a/src/raftex/LogStrListIterator.cpp +++ b/src/kvstore/raftex/LogStrListIterator.cpp @@ -5,7 +5,7 @@ */ #include "base/Base.h" -#include "raftex/LogStrListIterator.h" +#include "kvstore/raftex/LogStrListIterator.h" namespace nebula { namespace raftex { diff --git a/src/raftex/LogStrListIterator.h b/src/kvstore/raftex/LogStrListIterator.h similarity index 100% rename from src/raftex/LogStrListIterator.h rename to src/kvstore/raftex/LogStrListIterator.h diff --git a/src/raftex/README.md b/src/kvstore/raftex/README.md similarity index 100% rename from src/raftex/README.md rename to src/kvstore/raftex/README.md diff --git a/src/raftex/RaftPart.cpp b/src/kvstore/raftex/RaftPart.cpp similarity index 99% rename from src/raftex/RaftPart.cpp rename to src/kvstore/raftex/RaftPart.cpp index 9ef1d090604..c1b32aa371d 100644 --- a/src/raftex/RaftPart.cpp +++ b/src/kvstore/raftex/RaftPart.cpp @@ -5,7 +5,7 @@ */ #include "base/Base.h" -#include "raftex/RaftPart.h" +#include "kvstore/raftex/RaftPart.h" #include #include #include @@ -14,10 +14,10 @@ #include "thrift/ThriftClientManager.h" #include "network/NetworkUtils.h" #include "thread/NamedThread.h" -#include "wal/FileBasedWal.h" -#include "wal/BufferFlusher.h" -#include "raftex/LogStrListIterator.h" -#include "raftex/Host.h" +#include "kvstore/wal/FileBasedWal.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/raftex/LogStrListIterator.h" +#include "kvstore/raftex/Host.h" DEFINE_bool(accept_log_append_during_pulling, false, diff --git a/src/raftex/RaftPart.h b/src/kvstore/raftex/RaftPart.h similarity index 100% rename from src/raftex/RaftPart.h rename to src/kvstore/raftex/RaftPart.h diff --git a/src/raftex/RaftexService.cpp b/src/kvstore/raftex/RaftexService.cpp similarity index 98% rename from src/raftex/RaftexService.cpp rename to src/kvstore/raftex/RaftexService.cpp index 7e76749dc22..64182861ac8 100644 --- a/src/raftex/RaftexService.cpp +++ b/src/kvstore/raftex/RaftexService.cpp @@ -5,9 +5,9 @@ */ #include "base/Base.h" -#include "raftex/RaftexService.h" +#include "kvstore/raftex/RaftexService.h" #include -#include "raftex/RaftPart.h" +#include "kvstore/raftex/RaftPart.h" namespace nebula { namespace raftex { diff --git a/src/raftex/RaftexService.h b/src/kvstore/raftex/RaftexService.h similarity index 100% rename from src/raftex/RaftexService.h rename to src/kvstore/raftex/RaftexService.h diff --git a/src/raftex/test/CMakeLists.txt b/src/kvstore/raftex/test/CMakeLists.txt similarity index 100% rename from src/raftex/test/CMakeLists.txt rename to src/kvstore/raftex/test/CMakeLists.txt diff --git a/src/raftex/test/LeaderElectionTest.cpp b/src/kvstore/raftex/test/LeaderElectionTest.cpp similarity index 96% rename from src/raftex/test/LeaderElectionTest.cpp rename to src/kvstore/raftex/test/LeaderElectionTest.cpp index af6433ce571..26bdc093c09 100644 --- a/src/raftex/test/LeaderElectionTest.cpp +++ b/src/kvstore/raftex/test/LeaderElectionTest.cpp @@ -11,10 +11,10 @@ #include "fs/FileUtils.h" #include "thread/GenericThreadPool.h" #include "network/NetworkUtils.h" -#include "wal/BufferFlusher.h" -#include "raftex/RaftexService.h" -#include "raftex/test/RaftexTestBase.h" -#include "raftex/test/TestShard.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/raftex/RaftexService.h" +#include "kvstore/raftex/test/RaftexTestBase.h" +#include "kvstore/raftex/test/TestShard.h" namespace nebula { namespace raftex { diff --git a/src/raftex/test/LogAppendTest.cpp b/src/kvstore/raftex/test/LogAppendTest.cpp similarity index 97% rename from src/raftex/test/LogAppendTest.cpp rename to src/kvstore/raftex/test/LogAppendTest.cpp index d7514414c7d..91ebc91f886 100644 --- a/src/raftex/test/LogAppendTest.cpp +++ b/src/kvstore/raftex/test/LogAppendTest.cpp @@ -11,10 +11,10 @@ #include "fs/FileUtils.h" #include "thread/GenericThreadPool.h" #include "network/NetworkUtils.h" -#include "wal/BufferFlusher.h" -#include "raftex/RaftexService.h" -#include "raftex/test/RaftexTestBase.h" -#include "raftex/test/TestShard.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/raftex/RaftexService.h" +#include "kvstore/raftex/test/RaftexTestBase.h" +#include "kvstore/raftex/test/TestShard.h" DECLARE_uint32(heartbeat_interval); diff --git a/src/raftex/test/LogCASTest.cpp b/src/kvstore/raftex/test/LogCASTest.cpp similarity index 98% rename from src/raftex/test/LogCASTest.cpp rename to src/kvstore/raftex/test/LogCASTest.cpp index 66896e76050..01ac17a1743 100644 --- a/src/raftex/test/LogCASTest.cpp +++ b/src/kvstore/raftex/test/LogCASTest.cpp @@ -11,10 +11,10 @@ #include "fs/FileUtils.h" #include "thread/GenericThreadPool.h" #include "network/NetworkUtils.h" -#include "wal/BufferFlusher.h" -#include "raftex/RaftexService.h" -#include "raftex/test/RaftexTestBase.h" -#include "raftex/test/TestShard.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/raftex/RaftexService.h" +#include "kvstore/raftex/test/RaftexTestBase.h" +#include "kvstore/raftex/test/TestShard.h" DECLARE_uint32(heartbeat_interval); diff --git a/src/raftex/test/RaftexTestBase.cpp b/src/kvstore/raftex/test/RaftexTestBase.cpp similarity index 97% rename from src/raftex/test/RaftexTestBase.cpp rename to src/kvstore/raftex/test/RaftexTestBase.cpp index 54e8fe26d55..bcd8ad0ca0e 100644 --- a/src/raftex/test/RaftexTestBase.cpp +++ b/src/kvstore/raftex/test/RaftexTestBase.cpp @@ -5,10 +5,10 @@ */ #include "base/Base.h" -#include "raftex/test/RaftexTestBase.h" -#include "wal/BufferFlusher.h" -#include "raftex/RaftexService.h" -#include "raftex/test/TestShard.h" +#include "kvstore/raftex/test/RaftexTestBase.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/raftex/RaftexService.h" +#include "kvstore/raftex/test/TestShard.h" #include "thrift/ThriftClientManager.h" namespace nebula { diff --git a/src/raftex/test/RaftexTestBase.h b/src/kvstore/raftex/test/RaftexTestBase.h similarity index 100% rename from src/raftex/test/RaftexTestBase.h rename to src/kvstore/raftex/test/RaftexTestBase.h diff --git a/src/raftex/test/TestShard.cpp b/src/kvstore/raftex/test/TestShard.cpp similarity index 94% rename from src/raftex/test/TestShard.cpp rename to src/kvstore/raftex/test/TestShard.cpp index b4b1c265efc..ac182fdbe8a 100644 --- a/src/raftex/test/TestShard.cpp +++ b/src/kvstore/raftex/test/TestShard.cpp @@ -5,10 +5,10 @@ */ #include "base/Base.h" -#include "raftex/test/TestShard.h" -#include "raftex/RaftexService.h" -#include "wal/FileBasedWal.h" -#include "wal/BufferFlusher.h" +#include "kvstore/raftex/test/TestShard.h" +#include "kvstore/raftex/RaftexService.h" +#include "kvstore/wal/FileBasedWal.h" +#include "kvstore/wal/BufferFlusher.h" namespace nebula { namespace raftex { diff --git a/src/raftex/test/TestShard.h b/src/kvstore/raftex/test/TestShard.h similarity index 97% rename from src/raftex/test/TestShard.h rename to src/kvstore/raftex/test/TestShard.h index 4f7bf622581..f7c12b5de1c 100644 --- a/src/raftex/test/TestShard.h +++ b/src/kvstore/raftex/test/TestShard.h @@ -8,7 +8,7 @@ #define RAFTEX_TEST_TESTSHARD_H_ #include "base/Base.h" -#include "raftex/RaftPart.h" +#include "kvstore/raftex/RaftPart.h" namespace nebula { namespace raftex { diff --git a/src/wal/BufferFlusher.cpp b/src/kvstore/wal/BufferFlusher.cpp similarity index 96% rename from src/wal/BufferFlusher.cpp rename to src/kvstore/wal/BufferFlusher.cpp index 28d0c17a3f4..4ae06ed8498 100644 --- a/src/wal/BufferFlusher.cpp +++ b/src/kvstore/wal/BufferFlusher.cpp @@ -5,8 +5,8 @@ */ #include "base/Base.h" -#include "wal/BufferFlusher.h" -#include "wal/FileBasedWal.h" +#include "kvstore/wal/BufferFlusher.h" +#include "kvstore/wal/FileBasedWal.h" namespace nebula { namespace wal { diff --git a/src/wal/BufferFlusher.h b/src/kvstore/wal/BufferFlusher.h similarity index 95% rename from src/wal/BufferFlusher.h rename to src/kvstore/wal/BufferFlusher.h index 6d74cc5fd10..f82b84a5cd9 100644 --- a/src/wal/BufferFlusher.h +++ b/src/kvstore/wal/BufferFlusher.h @@ -9,7 +9,7 @@ #include "base/Base.h" #include "thread/NamedThread.h" -#include "wal/InMemoryLogBuffer.h" +#include "kvstore/wal/InMemoryLogBuffer.h" namespace nebula { namespace wal { diff --git a/src/wal/CMakeLists.txt b/src/kvstore/wal/CMakeLists.txt similarity index 100% rename from src/wal/CMakeLists.txt rename to src/kvstore/wal/CMakeLists.txt diff --git a/src/wal/FileBasedWal.cpp b/src/kvstore/wal/FileBasedWal.cpp similarity index 99% rename from src/wal/FileBasedWal.cpp rename to src/kvstore/wal/FileBasedWal.cpp index 579a85ced12..45f3aad1c5e 100644 --- a/src/wal/FileBasedWal.cpp +++ b/src/kvstore/wal/FileBasedWal.cpp @@ -5,9 +5,9 @@ */ #include "base/Base.h" -#include "wal/FileBasedWal.h" -#include "wal/FileBasedWalIterator.h" -#include "wal/BufferFlusher.h" +#include "kvstore/wal/FileBasedWal.h" +#include "kvstore/wal/FileBasedWalIterator.h" +#include "kvstore/wal/BufferFlusher.h" #include "fs/FileUtils.h" namespace nebula { diff --git a/src/wal/FileBasedWal.h b/src/kvstore/wal/FileBasedWal.h similarity index 98% rename from src/wal/FileBasedWal.h rename to src/kvstore/wal/FileBasedWal.h index 78131ffd990..9e065d8f0cf 100644 --- a/src/wal/FileBasedWal.h +++ b/src/kvstore/wal/FileBasedWal.h @@ -9,9 +9,9 @@ #include "base/Base.h" #include "base/Cord.h" -#include "wal/Wal.h" -#include "wal/InMemoryLogBuffer.h" -#include "wal/WalFileInfo.h" +#include "kvstore/wal/Wal.h" +#include "kvstore/wal/InMemoryLogBuffer.h" +#include "kvstore/wal/WalFileInfo.h" namespace nebula { namespace wal { diff --git a/src/wal/FileBasedWalIterator.cpp b/src/kvstore/wal/FileBasedWalIterator.cpp similarity index 98% rename from src/wal/FileBasedWalIterator.cpp rename to src/kvstore/wal/FileBasedWalIterator.cpp index 70ef102cdb0..0085260737c 100644 --- a/src/wal/FileBasedWalIterator.cpp +++ b/src/kvstore/wal/FileBasedWalIterator.cpp @@ -5,9 +5,9 @@ */ #include "base/Base.h" -#include "wal/FileBasedWalIterator.h" -#include "wal/FileBasedWal.h" -#include "wal/WalFileInfo.h" +#include "kvstore/wal/FileBasedWalIterator.h" +#include "kvstore/wal/FileBasedWal.h" +#include "kvstore/wal/WalFileInfo.h" namespace nebula { namespace wal { diff --git a/src/wal/FileBasedWalIterator.h b/src/kvstore/wal/FileBasedWalIterator.h similarity index 97% rename from src/wal/FileBasedWalIterator.h rename to src/kvstore/wal/FileBasedWalIterator.h index db851dfda7d..f8d533fe6f4 100644 --- a/src/wal/FileBasedWalIterator.h +++ b/src/kvstore/wal/FileBasedWalIterator.h @@ -9,7 +9,7 @@ #include "base/Base.h" #include "base/LogIterator.h" -#include "wal/InMemoryLogBuffer.h" +#include "kvstore/wal/InMemoryLogBuffer.h" namespace nebula { namespace wal { diff --git a/src/wal/InMemoryLogBuffer.cpp b/src/kvstore/wal/InMemoryLogBuffer.cpp similarity index 98% rename from src/wal/InMemoryLogBuffer.cpp rename to src/kvstore/wal/InMemoryLogBuffer.cpp index 190e4b0a9a8..dd0d6389674 100644 --- a/src/wal/InMemoryLogBuffer.cpp +++ b/src/kvstore/wal/InMemoryLogBuffer.cpp @@ -5,7 +5,7 @@ */ #include "base/Base.h" -#include "wal/InMemoryLogBuffer.h" +#include "kvstore/wal/InMemoryLogBuffer.h" namespace nebula { namespace wal { diff --git a/src/wal/InMemoryLogBuffer.h b/src/kvstore/wal/InMemoryLogBuffer.h similarity index 100% rename from src/wal/InMemoryLogBuffer.h rename to src/kvstore/wal/InMemoryLogBuffer.h diff --git a/src/wal/Wal.h b/src/kvstore/wal/Wal.h similarity index 100% rename from src/wal/Wal.h rename to src/kvstore/wal/Wal.h diff --git a/src/wal/WalFileInfo.h b/src/kvstore/wal/WalFileInfo.h similarity index 95% rename from src/wal/WalFileInfo.h rename to src/kvstore/wal/WalFileInfo.h index c9d075553c3..bbc8ded92c0 100644 --- a/src/wal/WalFileInfo.h +++ b/src/kvstore/wal/WalFileInfo.h @@ -9,8 +9,8 @@ #include "base/Base.h" #include "base/Cord.h" -#include "wal/Wal.h" -#include "wal/InMemoryLogBuffer.h" +#include "kvstore/wal/Wal.h" +#include "kvstore/wal/InMemoryLogBuffer.h" namespace nebula { namespace wal { diff --git a/src/wal/test/CMakeLists.txt b/src/kvstore/wal/test/CMakeLists.txt similarity index 100% rename from src/wal/test/CMakeLists.txt rename to src/kvstore/wal/test/CMakeLists.txt diff --git a/src/wal/test/FileBasedWalTest.cpp b/src/kvstore/wal/test/FileBasedWalTest.cpp similarity index 99% rename from src/wal/test/FileBasedWalTest.cpp rename to src/kvstore/wal/test/FileBasedWalTest.cpp index 6855001d1ce..d25d193f662 100644 --- a/src/wal/test/FileBasedWalTest.cpp +++ b/src/kvstore/wal/test/FileBasedWalTest.cpp @@ -6,8 +6,8 @@ #include "base/Base.h" #include -#include "wal/FileBasedWal.h" -#include "wal/BufferFlusher.h" +#include "kvstore/wal/FileBasedWal.h" +#include "kvstore/wal/BufferFlusher.h" #include "fs/TempDir.h" namespace nebula {