From b219224e1f9717cc6da602000c738d48d425f15e Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Tue, 10 May 2022 16:54:26 +0800 Subject: [PATCH] refactror: node mgmt --- source/dnode/mgmt/CMakeLists.txt | 6 +++--- source/dnode/mgmt/mgmt_bnode/CMakeLists.txt | 2 +- source/dnode/mgmt/mgmt_mnode/CMakeLists.txt | 2 +- source/dnode/mgmt/mgmt_qnode/CMakeLists.txt | 2 +- source/dnode/mgmt/mgmt_snode/CMakeLists.txt | 2 +- source/dnode/mgmt/mgmt_vnode/CMakeLists.txt | 2 +- source/dnode/mgmt/{interface => node_common}/CMakeLists.txt | 6 +++--- source/dnode/mgmt/{interface => node_common}/inc/dmDef.h | 0 source/dnode/mgmt/{interface => node_common}/inc/dmInt.h | 0 source/dnode/mgmt/{interface => node_common}/inc/dmLog.h | 0 source/dnode/mgmt/{interface => node_common}/src/dmEnv.c | 0 source/dnode/mgmt/{interface => node_common}/src/dmFile.c | 0 source/dnode/mgmt/{interface => node_common}/src/dmInt.c | 0 source/dnode/mgmt/{implement => node_mgmt}/CMakeLists.txt | 0 source/dnode/mgmt/{implement => node_mgmt}/inc/dmImp.h | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmEps.c | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmExec.c | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmHandle.c | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmMonitor.c | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmObj.c | 0 .../dnode/mgmt/{implement => node_mgmt}/src/dmTransport.c | 0 source/dnode/mgmt/{implement => node_mgmt}/src/dmWorker.c | 0 22 files changed, 11 insertions(+), 11 deletions(-) rename source/dnode/mgmt/{interface => node_common}/CMakeLists.txt (53%) rename source/dnode/mgmt/{interface => node_common}/inc/dmDef.h (100%) rename source/dnode/mgmt/{interface => node_common}/inc/dmInt.h (100%) rename source/dnode/mgmt/{interface => node_common}/inc/dmLog.h (100%) rename source/dnode/mgmt/{interface => node_common}/src/dmEnv.c (100%) rename source/dnode/mgmt/{interface => node_common}/src/dmFile.c (100%) rename source/dnode/mgmt/{interface => node_common}/src/dmInt.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/CMakeLists.txt (100%) rename source/dnode/mgmt/{implement => node_mgmt}/inc/dmImp.h (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmEps.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmExec.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmHandle.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmMonitor.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmObj.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmTransport.c (100%) rename source/dnode/mgmt/{implement => node_mgmt}/src/dmWorker.c (100%) diff --git a/source/dnode/mgmt/CMakeLists.txt b/source/dnode/mgmt/CMakeLists.txt index 49ea54e928..bdc9f1741d 100644 --- a/source/dnode/mgmt/CMakeLists.txt +++ b/source/dnode/mgmt/CMakeLists.txt @@ -1,5 +1,5 @@ -add_subdirectory(interface) -add_subdirectory(implement) +add_subdirectory(node_mgmt) +add_subdirectory(node_common) add_subdirectory(mgmt_bnode) add_subdirectory(mgmt_mnode) add_subdirectory(mgmt_qnode) @@ -11,6 +11,6 @@ aux_source_directory(exe EXEC_SRC) add_executable(taosd ${EXEC_SRC}) target_include_directories( taosd - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/implement/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/node_mgmt/inc" ) target_link_libraries(taosd dnode) diff --git a/source/dnode/mgmt/mgmt_bnode/CMakeLists.txt b/source/dnode/mgmt/mgmt_bnode/CMakeLists.txt index 6a447dccf8..4c35a4ade6 100644 --- a/source/dnode/mgmt/mgmt_bnode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_bnode/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - mgmt_bnode dnode_interface + mgmt_bnode node_common ) \ No newline at end of file diff --git a/source/dnode/mgmt/mgmt_mnode/CMakeLists.txt b/source/dnode/mgmt/mgmt_mnode/CMakeLists.txt index 5ca9af5628..54171a2daf 100644 --- a/source/dnode/mgmt/mgmt_mnode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_mnode/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - mgmt_mnode dnode_interface + mgmt_mnode node_common ) \ No newline at end of file diff --git a/source/dnode/mgmt/mgmt_qnode/CMakeLists.txt b/source/dnode/mgmt/mgmt_qnode/CMakeLists.txt index bf31b2afc3..56c136db3d 100644 --- a/source/dnode/mgmt/mgmt_qnode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_qnode/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - mgmt_qnode dnode_interface + mgmt_qnode node_common ) \ No newline at end of file diff --git a/source/dnode/mgmt/mgmt_snode/CMakeLists.txt b/source/dnode/mgmt/mgmt_snode/CMakeLists.txt index b8a99c9d4d..0fb5e90666 100644 --- a/source/dnode/mgmt/mgmt_snode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_snode/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - mgmt_snode dnode_interface + mgmt_snode node_common ) \ No newline at end of file diff --git a/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt b/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt index 55a76cf772..d6dc3ee948 100644 --- a/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt +++ b/source/dnode/mgmt/mgmt_vnode/CMakeLists.txt @@ -5,5 +5,5 @@ target_include_directories( PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - mgmt_vnode dnode_interface + mgmt_vnode node_common ) \ No newline at end of file diff --git a/source/dnode/mgmt/interface/CMakeLists.txt b/source/dnode/mgmt/node_common/CMakeLists.txt similarity index 53% rename from source/dnode/mgmt/interface/CMakeLists.txt rename to source/dnode/mgmt/node_common/CMakeLists.txt index a99fc2703d..524f5f76d8 100644 --- a/source/dnode/mgmt/interface/CMakeLists.txt +++ b/source/dnode/mgmt/node_common/CMakeLists.txt @@ -1,10 +1,10 @@ aux_source_directory(src DNODE_INTERFACE) -add_library(dnode_interface STATIC ${DNODE_INTERFACE}) +add_library(node_common STATIC ${DNODE_INTERFACE}) target_include_directories( - dnode_interface + node_common PUBLIC "${TD_SOURCE_DIR}/include/dnode/mgmt" PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/inc" ) target_link_libraries( - dnode_interface cjson mnode vnode qnode snode bnode wal sync taos_static tfs monitor + node_common cjson mnode vnode qnode snode bnode wal sync taos_static tfs monitor ) \ No newline at end of file diff --git a/source/dnode/mgmt/interface/inc/dmDef.h b/source/dnode/mgmt/node_common/inc/dmDef.h similarity index 100% rename from source/dnode/mgmt/interface/inc/dmDef.h rename to source/dnode/mgmt/node_common/inc/dmDef.h diff --git a/source/dnode/mgmt/interface/inc/dmInt.h b/source/dnode/mgmt/node_common/inc/dmInt.h similarity index 100% rename from source/dnode/mgmt/interface/inc/dmInt.h rename to source/dnode/mgmt/node_common/inc/dmInt.h diff --git a/source/dnode/mgmt/interface/inc/dmLog.h b/source/dnode/mgmt/node_common/inc/dmLog.h similarity index 100% rename from source/dnode/mgmt/interface/inc/dmLog.h rename to source/dnode/mgmt/node_common/inc/dmLog.h diff --git a/source/dnode/mgmt/interface/src/dmEnv.c b/source/dnode/mgmt/node_common/src/dmEnv.c similarity index 100% rename from source/dnode/mgmt/interface/src/dmEnv.c rename to source/dnode/mgmt/node_common/src/dmEnv.c diff --git a/source/dnode/mgmt/interface/src/dmFile.c b/source/dnode/mgmt/node_common/src/dmFile.c similarity index 100% rename from source/dnode/mgmt/interface/src/dmFile.c rename to source/dnode/mgmt/node_common/src/dmFile.c diff --git a/source/dnode/mgmt/interface/src/dmInt.c b/source/dnode/mgmt/node_common/src/dmInt.c similarity index 100% rename from source/dnode/mgmt/interface/src/dmInt.c rename to source/dnode/mgmt/node_common/src/dmInt.c diff --git a/source/dnode/mgmt/implement/CMakeLists.txt b/source/dnode/mgmt/node_mgmt/CMakeLists.txt similarity index 100% rename from source/dnode/mgmt/implement/CMakeLists.txt rename to source/dnode/mgmt/node_mgmt/CMakeLists.txt diff --git a/source/dnode/mgmt/implement/inc/dmImp.h b/source/dnode/mgmt/node_mgmt/inc/dmImp.h similarity index 100% rename from source/dnode/mgmt/implement/inc/dmImp.h rename to source/dnode/mgmt/node_mgmt/inc/dmImp.h diff --git a/source/dnode/mgmt/implement/src/dmEps.c b/source/dnode/mgmt/node_mgmt/src/dmEps.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmEps.c rename to source/dnode/mgmt/node_mgmt/src/dmEps.c diff --git a/source/dnode/mgmt/implement/src/dmExec.c b/source/dnode/mgmt/node_mgmt/src/dmExec.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmExec.c rename to source/dnode/mgmt/node_mgmt/src/dmExec.c diff --git a/source/dnode/mgmt/implement/src/dmHandle.c b/source/dnode/mgmt/node_mgmt/src/dmHandle.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmHandle.c rename to source/dnode/mgmt/node_mgmt/src/dmHandle.c diff --git a/source/dnode/mgmt/implement/src/dmMonitor.c b/source/dnode/mgmt/node_mgmt/src/dmMonitor.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmMonitor.c rename to source/dnode/mgmt/node_mgmt/src/dmMonitor.c diff --git a/source/dnode/mgmt/implement/src/dmObj.c b/source/dnode/mgmt/node_mgmt/src/dmObj.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmObj.c rename to source/dnode/mgmt/node_mgmt/src/dmObj.c diff --git a/source/dnode/mgmt/implement/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmTransport.c rename to source/dnode/mgmt/node_mgmt/src/dmTransport.c diff --git a/source/dnode/mgmt/implement/src/dmWorker.c b/source/dnode/mgmt/node_mgmt/src/dmWorker.c similarity index 100% rename from source/dnode/mgmt/implement/src/dmWorker.c rename to source/dnode/mgmt/node_mgmt/src/dmWorker.c -- GitLab