From da47eeecd2eee475e99ca932aa86ceabff93b655 Mon Sep 17 00:00:00 2001 From: slguan Date: Fri, 7 Feb 2020 12:58:01 +0800 Subject: [PATCH] #1177 --- src/dnode/inc/dnodeRead.h | 6 ++++++ src/dnode/inc/dnodeVnodeMgmt.h | 3 ++- src/dnode/inc/dnodeWrite.h | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/dnode/inc/dnodeRead.h b/src/dnode/inc/dnodeRead.h index c7339e9bfb..1cd2e44342 100644 --- a/src/dnode/inc/dnodeRead.h +++ b/src/dnode/inc/dnodeRead.h @@ -20,6 +20,12 @@ extern "C" { #endif +/* + * Dnode handle read messages + * The processing result is returned by callback function with pShellObj parameter +*/ +int32_t dnodeReadData(SQueryMeterMsg *msg, void *pShellObj, void (*callback)(SQueryMeterRsp *rspMsg, void *pShellObj)); + #ifdef __cplusplus } #endif diff --git a/src/dnode/inc/dnodeVnodeMgmt.h b/src/dnode/inc/dnodeVnodeMgmt.h index 10ac2a712f..9c677ba9e0 100644 --- a/src/dnode/inc/dnodeVnodeMgmt.h +++ b/src/dnode/inc/dnodeVnodeMgmt.h @@ -53,7 +53,7 @@ int32_t dnodeConfigVnode(int vid, SVnodeCfg *cfg); /* * Modify vnode replication information */ -int32_t dnodeConfigVnodePeers(int vid, SVpeerCfg *cfg); +int32_t dnodeConfigVnodePeers(int vid, /*SVpeerCfgMsg *cfg*/); /* * Remove vnode from local repository @@ -65,6 +65,7 @@ int32_t dnodeDropVnode(int vid); */ tsdb_repo_t* dnodeGetVnode(int vid); + #ifdef __cplusplus } #endif diff --git a/src/dnode/inc/dnodeWrite.h b/src/dnode/inc/dnodeWrite.h index 2a334fa75c..5d33c73051 100644 --- a/src/dnode/inc/dnodeWrite.h +++ b/src/dnode/inc/dnodeWrite.h @@ -20,6 +20,32 @@ extern "C" { #endif +/* + * Check if table already exists + */ +int32_t dnodeCheckTableExist(int vid, int sid, int64_t uid); + +/* + * Create table with specified configuration and open it + */ +int32_t dnodeCreateTable(int vid, int sid, SMeterObj *table); + +/* + * Modify table configuration information + */ +int32_t dnodeAlterTable(int vid, SMeterObj *table); + +/* + * Remove table from local repository + */ +int32_t dnodeDropTable(int vid, int sid, int64_t uid); + +/* + * Write data based on dnode + */ +int32_t dnodeWriteData(SShellSubmitMsg *msg); + + #ifdef __cplusplus } #endif -- GitLab