提交 a17d9811 编写于 作者: S Shengliang Guan

rename some defs

上级 ad361ee1
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_H_ #ifndef _TD_MND_H_
#define _TD_MNODE_H_ #define _TD_MND_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -170,4 +170,4 @@ void mnodeProcessApplyMsg(SMnodeMsg *pMsg); ...@@ -170,4 +170,4 @@ void mnodeProcessApplyMsg(SMnodeMsg *pMsg);
} }
#endif #endif
#endif /*_TD_MNODE_H_*/ #endif /*_TD_MND_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_ACCT_H_ #ifndef _TD_MND_ACCT_H_
#define _TD_MNODE_ACCT_H_ #define _TD_MND_ACCT_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupAcct(); ...@@ -29,4 +29,4 @@ void mnodeCleanupAcct();
} }
#endif #endif
#endif /*_TD_MNODE_ACCT_H_*/ #endif /*_TD_MND_ACCT_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_AUTH_H_ #ifndef _TD_MND_AUTH_H_
#define _TD_MNODE_AUTH_H_ #define _TD_MND_AUTH_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupAuth(); ...@@ -29,4 +29,4 @@ void mnodeCleanupAuth();
} }
#endif #endif
#endif /*_TD_MNODE_AUTH_H_*/ #endif /*_TD_MND_AUTH_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_BALANCE_H_ #ifndef _TD_MND_BALANCE_H_
#define _TD_MNODE_BALANCE_H_ #define _TD_MND_BALANCE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupBalance(); ...@@ -29,4 +29,4 @@ void mnodeCleanupBalance();
} }
#endif #endif
#endif /*_TD_MNODE_BALANCE_H_*/ #endif /*_TD_MND_BALANCE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_CLUSTER_H_ #ifndef _TD_MND_CLUSTER_H_
#define _TD_MNODE_CLUSTER_H_ #define _TD_MND_CLUSTER_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupCluster(); ...@@ -29,4 +29,4 @@ void mnodeCleanupCluster();
} }
#endif #endif
#endif /*_TD_MNODE_CLUSTER_H_*/ #endif /*_TD_MND_CLUSTER_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_DATABASE_H_ #ifndef _TD_MND_DATABASE_H_
#define _TD_MNODE_DATABASE_H_ #define _TD_MND_DATABASE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupDb(); ...@@ -29,4 +29,4 @@ void mnodeCleanupDb();
} }
#endif #endif
#endif /*_TD_MNODE_DATABASE_H_*/ #endif /*_TD_MND_DATABASE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_DEF_H_ #ifndef _TD_MND_DEF_H_
#define _TD_MNODE_DEF_H_ #define _TD_MND_DEF_H_
#include "os.h" #include "os.h"
#include "taosmsg.h" #include "taosmsg.h"
...@@ -305,4 +305,4 @@ typedef struct SMnodeMsg { ...@@ -305,4 +305,4 @@ typedef struct SMnodeMsg {
} }
#endif #endif
#endif /*_TD_MNODE_DEF_H_*/ #endif /*_TD_MND_DEF_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_DNODE_H_ #ifndef _TD_MND_DNODE_H_
#define _TD_MNODE_DNODE_H_ #define _TD_MND_DNODE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupDnode(); ...@@ -29,4 +29,4 @@ void mnodeCleanupDnode();
} }
#endif #endif
#endif /*_TD_MNODE_DNODE_H_*/ #endif /*_TD_MND_DNODE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_FUNC_H_ #ifndef _TD_MND_FUNC_H_
#define _TD_MNODE_FUNC_H_ #define _TD_MND_FUNC_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupFunc(); ...@@ -29,4 +29,4 @@ void mnodeCleanupFunc();
} }
#endif #endif
#endif /*_TD_MNODE_FUNC_H_*/ #endif /*_TD_MND_FUNC_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_INT_H_ #ifndef _TD_MND_INT_H_
#define _TD_MNODE_INT_H_ #define _TD_MND_INT_H_
#include "mndDef.h" #include "mndDef.h"
#include "sdb.h" #include "sdb.h"
...@@ -67,4 +67,4 @@ void mnodeSetMsgHandle(SMnode *pMnode, int32_t msgType, MndMsgFp fp); ...@@ -67,4 +67,4 @@ void mnodeSetMsgHandle(SMnode *pMnode, int32_t msgType, MndMsgFp fp);
} }
#endif #endif
#endif /*_TD_MNODE_INT_H_*/ #endif /*_TD_MND_INT_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_MNODE_H_ #ifndef _TD_MND_MNODE_H_
#define _TD_MNODE_MNODE_H_ #define _TD_MND_MNODE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -31,4 +31,4 @@ void mnodeGetMnodeEpSetForShell(SEpSet *epSet, bool redirect); ...@@ -31,4 +31,4 @@ void mnodeGetMnodeEpSetForShell(SEpSet *epSet, bool redirect);
} }
#endif #endif
#endif /*_TD_MNODE_MNODE_H_*/ #endif /*_TD_MND_MNODE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_OPER_H_ #ifndef _TD_MND_OPER_H_
#define _TD_MNODE_OPER_H_ #define _TD_MND_OPER_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -27,4 +27,4 @@ void mnodeCleanupOper(); ...@@ -27,4 +27,4 @@ void mnodeCleanupOper();
} }
#endif #endif
#endif /*_TD_MNODE_OPER_H_*/ #endif /*_TD_MND_OPER_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_PROFILE_H_ #ifndef _TD_MND_PROFILE_H_
#define _TD_MNODE_PROFILE_H_ #define _TD_MND_PROFILE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupProfile(); ...@@ -29,4 +29,4 @@ void mnodeCleanupProfile();
} }
#endif #endif
#endif /*_TD_MNODE_PROFILE_H_*/ #endif /*_TD_MND_PROFILE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_SHOW_H_ #ifndef _TD_MND_SHOW_H_
#define _TD_MNODE_SHOW_H_ #define _TD_MND_SHOW_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanUpShow(); ...@@ -29,4 +29,4 @@ void mnodeCleanUpShow();
} }
#endif #endif
#endif /*_TD_MNODE_SHOW_H_*/ #endif /*_TD_MND_SHOW_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_STABLE_H_ #ifndef _TD_MND_STABLE_H_
#define _TD_MNODE_STABLE_H_ #define _TD_MND_STABLE_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupStable(); ...@@ -29,4 +29,4 @@ void mnodeCleanupStable();
} }
#endif #endif
#endif /*_TD_MNODE_STABLE_H_*/ #endif /*_TD_MND_STABLE_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_SYNC_H_ #ifndef _TD_MND_SYNC_H_
#define _TD_MNODE_SYNC_H_ #define _TD_MND_SYNC_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -32,4 +32,4 @@ bool mnodeIsMaster(); ...@@ -32,4 +32,4 @@ bool mnodeIsMaster();
} }
#endif #endif
#endif /*_TD_MNODE_SYNC_H_*/ #endif /*_TD_MND_SYNC_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_TELEMETRY_H_ #ifndef _TD_MND_TELEMETRY_H_
#define _TD_MNODE_TELEMETRY_H_ #define _TD_MND_TELEMETRY_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -28,4 +28,4 @@ void mnodeCleanupTelem(); ...@@ -28,4 +28,4 @@ void mnodeCleanupTelem();
} }
#endif #endif
#endif /*_TD_MNODE_TELEMETRY_H_*/ #endif /*_TD_MND_TELEMETRY_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_USER_H_ #ifndef _TD_MND_USER_H_
#define _TD_MNODE_USER_H_ #define _TD_MND_USER_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupUser(); ...@@ -29,4 +29,4 @@ void mnodeCleanupUser();
} }
#endif #endif
#endif /*_TD_MNODE_USER_H_*/ #endif /*_TD_MND_USER_H_*/
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef _TD_MNODE_VGROUP_H_ #ifndef _TD_MND_VGROUP_H_
#define _TD_MNODE_VGROUP_H_ #define _TD_MND_VGROUP_H_
#include "mndInt.h" #include "mndInt.h"
...@@ -29,4 +29,4 @@ void mnodeCleanupVgroup(); ...@@ -29,4 +29,4 @@ void mnodeCleanupVgroup();
} }
#endif #endif
#endif /*_TD_MNODE_VGROUP_H_*/ #endif /*_TD_MND_VGROUP_H_*/
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_MND_INT_H_
#define _TD_MND_INT_H_
#include "mndDef.h"
#include "sdb.h"
#include "tstep.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef int32_t (*MndMsgFp)(SMnode *pMnode, SMnodeMsg *pMsg);
typedef struct SMnodeBak {
int32_t dnodeId;
int64_t clusterId;
tmr_h timer;
SSteps *pInitSteps;
SSteps *pStartSteps;
SMnodeOpt para;
MndMsgFp msgFp[TSDB_MSG_TYPE_MAX];
} SMnodeBak;
typedef struct SMnode {
int32_t dnodeId;
int64_t clusterId;
int8_t replica;
int8_t selfIndex;
SReplica replicas[TSDB_MAX_REPLICA];
tmr_h timer;
SSteps *pInitSteps;
SSteps *pStartSteps;
struct SSdb *pSdb;
struct SDnode *pServer;
MndMsgFp msgFp[TSDB_MSG_TYPE_MAX];
PutMsgToMnodeQFp putMsgToApplyMsgFp;
SendMsgToDnodeFp sendMsgToDnodeFp;
SendMsgToMnodeFp sendMsgToMnodeFp;
SendRedirectMsgFp sendRedirectMsgFp;
} SMnode;
tmr_h mnodeGetTimer();
int32_t mnodeGetDnodeId();
int64_t mnodeGetClusterId();
void mnodeSendMsgToDnode(SMnode *pMnode, struct SEpSet *epSet, struct SRpcMsg *rpcMsg);
void mnodeSendMsgToMnode(SMnode *pMnode, struct SRpcMsg *rpcMsg);
void mnodeSendRedirectMsg(SMnode *pMnode, struct SRpcMsg *rpcMsg, bool forShell);
void mnodeSetMsgHandle(SMnode *pMnode, int32_t msgType, MndMsgFp fp);
#ifdef __cplusplus
}
#endif
#endif /*_TD_MND_INT_H_*/
/*
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
*
* This program is free software: you can use, redistribute, and/or modify
* it under the terms of the GNU Affero General Public License, version 3
* or later ("AGPL"), as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_MND_USER_H_
#define _TD_MND_USER_H_
#include "mndInt.h"
#ifdef __cplusplus
extern "C" {
#endif
int32_t mnodeInitUser();
void mnodeCleanupUser();
#ifdef __cplusplus
}
#endif
#endif /*_TD_MND_USER_H_*/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册