From bc6bee69b1f86ccac7931012bb00de3e2edf6d23 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Mon, 1 Nov 2021 16:04:58 +0800 Subject: [PATCH] refact --- source/server/vnode/CMakeLists.txt | 24 +------------------ source/server/vnode/impl/CMakeLists.txt | 22 +++++++++++++++++ .../server/vnode/{ => impl}/inc/vnodeCommit.h | 0 .../server/vnode/{ => impl}/inc/vnodeFile.h | 0 source/server/vnode/{ => impl}/inc/vnodeInt.h | 0 .../server/vnode/{ => impl}/inc/vnodeMain.h | 0 .../vnode/{ => impl}/inc/vnodeMemAllocator.h | 0 .../server/vnode/{ => impl}/inc/vnodeMgmt.h | 0 .../server/vnode/{ => impl}/inc/vnodeRead.h | 0 .../vnode/{ => impl}/inc/vnodeReadMsg.h | 0 .../server/vnode/{ => impl}/inc/vnodeWrite.h | 0 .../vnode/{ => impl}/inc/vnodeWriteMsg.h | 0 .../server/vnode/{ => impl}/src/vnodeCommit.c | 0 .../server/vnode/{ => impl}/src/vnodeFile.c | 0 source/server/vnode/{ => impl}/src/vnodeInt.c | 0 .../server/vnode/{ => impl}/src/vnodeMain.c | 0 .../vnode/{ => impl}/src/vnodeMemAllocator.c | 0 .../server/vnode/{ => impl}/src/vnodeMgmt.c | 0 .../server/vnode/{ => impl}/src/vnodeRead.c | 0 .../vnode/{ => impl}/src/vnodeReadMsg.c | 0 .../server/vnode/{ => impl}/src/vnodeWrite.c | 0 .../vnode/{ => impl}/src/vnodeWriteMsg.c | 0 .../vnode/{ => impl}/test/CMakeLists.txt | 0 .../{ => impl}/test/vnodeMemAllocatorTest.cpp | 0 .../vnode/{ => impl}/test/vnodeTests.cpp | 0 25 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 source/server/vnode/impl/CMakeLists.txt rename source/server/vnode/{ => impl}/inc/vnodeCommit.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeFile.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeInt.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeMain.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeMemAllocator.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeMgmt.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeRead.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeReadMsg.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeWrite.h (100%) rename source/server/vnode/{ => impl}/inc/vnodeWriteMsg.h (100%) rename source/server/vnode/{ => impl}/src/vnodeCommit.c (100%) rename source/server/vnode/{ => impl}/src/vnodeFile.c (100%) rename source/server/vnode/{ => impl}/src/vnodeInt.c (100%) rename source/server/vnode/{ => impl}/src/vnodeMain.c (100%) rename source/server/vnode/{ => impl}/src/vnodeMemAllocator.c (100%) rename source/server/vnode/{ => impl}/src/vnodeMgmt.c (100%) rename source/server/vnode/{ => impl}/src/vnodeRead.c (100%) rename source/server/vnode/{ => impl}/src/vnodeReadMsg.c (100%) rename source/server/vnode/{ => impl}/src/vnodeWrite.c (100%) rename source/server/vnode/{ => impl}/src/vnodeWriteMsg.c (100%) rename source/server/vnode/{ => impl}/test/CMakeLists.txt (100%) rename source/server/vnode/{ => impl}/test/vnodeMemAllocatorTest.cpp (100%) rename source/server/vnode/{ => impl}/test/vnodeTests.cpp (100%) diff --git a/source/server/vnode/CMakeLists.txt b/source/server/vnode/CMakeLists.txt index 573cea79b5..a4a9cff002 100644 --- a/source/server/vnode/CMakeLists.txt +++ b/source/server/vnode/CMakeLists.txt @@ -1,26 +1,4 @@ add_subdirectory(meta) add_subdirectory(tq) add_subdirectory(tsdb) - -aux_source_directory(src VNODE_SRC) -add_library(vnode STATIC ${VNODE_SRC}) -target_include_directories( - vnode - PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode" - private "${CMAKE_CURRENT_SOURCE_DIR}/inc" -) -target_link_libraries( - vnode - PUBLIC transport - PUBLIC meta - PUBLIC tq - PUBLIC tsdb - PUBLIC wal - PUBLIC sync - PUBLIC cjson -) - -# test -if(${BUILD_TEST}) - add_subdirectory(test) -endif(${BUILD_TEST}) \ No newline at end of file +add_subdirectory(impl) \ No newline at end of file diff --git a/source/server/vnode/impl/CMakeLists.txt b/source/server/vnode/impl/CMakeLists.txt new file mode 100644 index 0000000000..81744df79c --- /dev/null +++ b/source/server/vnode/impl/CMakeLists.txt @@ -0,0 +1,22 @@ +aux_source_directory(src VNODE_SRC) +add_library(vnode STATIC ${VNODE_SRC}) +target_include_directories( + vnode + PUBLIC "${CMAKE_SOURCE_DIR}/include/server/vnode" + private "${CMAKE_CURRENT_SOURCE_DIR}/inc" +) +target_link_libraries( + vnode + PUBLIC transport + PUBLIC meta + PUBLIC tq + PUBLIC tsdb + PUBLIC wal + PUBLIC sync + PUBLIC cjson +) + +# test +if(${BUILD_TEST}) + add_subdirectory(test) +endif(${BUILD_TEST}) \ No newline at end of file diff --git a/source/server/vnode/inc/vnodeCommit.h b/source/server/vnode/impl/inc/vnodeCommit.h similarity index 100% rename from source/server/vnode/inc/vnodeCommit.h rename to source/server/vnode/impl/inc/vnodeCommit.h diff --git a/source/server/vnode/inc/vnodeFile.h b/source/server/vnode/impl/inc/vnodeFile.h similarity index 100% rename from source/server/vnode/inc/vnodeFile.h rename to source/server/vnode/impl/inc/vnodeFile.h diff --git a/source/server/vnode/inc/vnodeInt.h b/source/server/vnode/impl/inc/vnodeInt.h similarity index 100% rename from source/server/vnode/inc/vnodeInt.h rename to source/server/vnode/impl/inc/vnodeInt.h diff --git a/source/server/vnode/inc/vnodeMain.h b/source/server/vnode/impl/inc/vnodeMain.h similarity index 100% rename from source/server/vnode/inc/vnodeMain.h rename to source/server/vnode/impl/inc/vnodeMain.h diff --git a/source/server/vnode/inc/vnodeMemAllocator.h b/source/server/vnode/impl/inc/vnodeMemAllocator.h similarity index 100% rename from source/server/vnode/inc/vnodeMemAllocator.h rename to source/server/vnode/impl/inc/vnodeMemAllocator.h diff --git a/source/server/vnode/inc/vnodeMgmt.h b/source/server/vnode/impl/inc/vnodeMgmt.h similarity index 100% rename from source/server/vnode/inc/vnodeMgmt.h rename to source/server/vnode/impl/inc/vnodeMgmt.h diff --git a/source/server/vnode/inc/vnodeRead.h b/source/server/vnode/impl/inc/vnodeRead.h similarity index 100% rename from source/server/vnode/inc/vnodeRead.h rename to source/server/vnode/impl/inc/vnodeRead.h diff --git a/source/server/vnode/inc/vnodeReadMsg.h b/source/server/vnode/impl/inc/vnodeReadMsg.h similarity index 100% rename from source/server/vnode/inc/vnodeReadMsg.h rename to source/server/vnode/impl/inc/vnodeReadMsg.h diff --git a/source/server/vnode/inc/vnodeWrite.h b/source/server/vnode/impl/inc/vnodeWrite.h similarity index 100% rename from source/server/vnode/inc/vnodeWrite.h rename to source/server/vnode/impl/inc/vnodeWrite.h diff --git a/source/server/vnode/inc/vnodeWriteMsg.h b/source/server/vnode/impl/inc/vnodeWriteMsg.h similarity index 100% rename from source/server/vnode/inc/vnodeWriteMsg.h rename to source/server/vnode/impl/inc/vnodeWriteMsg.h diff --git a/source/server/vnode/src/vnodeCommit.c b/source/server/vnode/impl/src/vnodeCommit.c similarity index 100% rename from source/server/vnode/src/vnodeCommit.c rename to source/server/vnode/impl/src/vnodeCommit.c diff --git a/source/server/vnode/src/vnodeFile.c b/source/server/vnode/impl/src/vnodeFile.c similarity index 100% rename from source/server/vnode/src/vnodeFile.c rename to source/server/vnode/impl/src/vnodeFile.c diff --git a/source/server/vnode/src/vnodeInt.c b/source/server/vnode/impl/src/vnodeInt.c similarity index 100% rename from source/server/vnode/src/vnodeInt.c rename to source/server/vnode/impl/src/vnodeInt.c diff --git a/source/server/vnode/src/vnodeMain.c b/source/server/vnode/impl/src/vnodeMain.c similarity index 100% rename from source/server/vnode/src/vnodeMain.c rename to source/server/vnode/impl/src/vnodeMain.c diff --git a/source/server/vnode/src/vnodeMemAllocator.c b/source/server/vnode/impl/src/vnodeMemAllocator.c similarity index 100% rename from source/server/vnode/src/vnodeMemAllocator.c rename to source/server/vnode/impl/src/vnodeMemAllocator.c diff --git a/source/server/vnode/src/vnodeMgmt.c b/source/server/vnode/impl/src/vnodeMgmt.c similarity index 100% rename from source/server/vnode/src/vnodeMgmt.c rename to source/server/vnode/impl/src/vnodeMgmt.c diff --git a/source/server/vnode/src/vnodeRead.c b/source/server/vnode/impl/src/vnodeRead.c similarity index 100% rename from source/server/vnode/src/vnodeRead.c rename to source/server/vnode/impl/src/vnodeRead.c diff --git a/source/server/vnode/src/vnodeReadMsg.c b/source/server/vnode/impl/src/vnodeReadMsg.c similarity index 100% rename from source/server/vnode/src/vnodeReadMsg.c rename to source/server/vnode/impl/src/vnodeReadMsg.c diff --git a/source/server/vnode/src/vnodeWrite.c b/source/server/vnode/impl/src/vnodeWrite.c similarity index 100% rename from source/server/vnode/src/vnodeWrite.c rename to source/server/vnode/impl/src/vnodeWrite.c diff --git a/source/server/vnode/src/vnodeWriteMsg.c b/source/server/vnode/impl/src/vnodeWriteMsg.c similarity index 100% rename from source/server/vnode/src/vnodeWriteMsg.c rename to source/server/vnode/impl/src/vnodeWriteMsg.c diff --git a/source/server/vnode/test/CMakeLists.txt b/source/server/vnode/impl/test/CMakeLists.txt similarity index 100% rename from source/server/vnode/test/CMakeLists.txt rename to source/server/vnode/impl/test/CMakeLists.txt diff --git a/source/server/vnode/test/vnodeMemAllocatorTest.cpp b/source/server/vnode/impl/test/vnodeMemAllocatorTest.cpp similarity index 100% rename from source/server/vnode/test/vnodeMemAllocatorTest.cpp rename to source/server/vnode/impl/test/vnodeMemAllocatorTest.cpp diff --git a/source/server/vnode/test/vnodeTests.cpp b/source/server/vnode/impl/test/vnodeTests.cpp similarity index 100% rename from source/server/vnode/test/vnodeTests.cpp rename to source/server/vnode/impl/test/vnodeTests.cpp -- GitLab