rename modules to plugins
This commit is contained in:
parent
3aef011db2
commit
cdc3ce7248
|
@ -6,7 +6,7 @@ ADD_SUBDIRECTORY(util)
|
||||||
ADD_SUBDIRECTORY(rpc)
|
ADD_SUBDIRECTORY(rpc)
|
||||||
ADD_SUBDIRECTORY(client)
|
ADD_SUBDIRECTORY(client)
|
||||||
ADD_SUBDIRECTORY(kit)
|
ADD_SUBDIRECTORY(kit)
|
||||||
ADD_SUBDIRECTORY(modules)
|
ADD_SUBDIRECTORY(plugins)
|
||||||
ADD_SUBDIRECTORY(sdb)
|
ADD_SUBDIRECTORY(sdb)
|
||||||
ADD_SUBDIRECTORY(mnode)
|
ADD_SUBDIRECTORY(mnode)
|
||||||
ADD_SUBDIRECTORY(dnode)
|
ADD_SUBDIRECTORY(dnode)
|
||||||
|
|
|
@ -22,14 +22,8 @@ extern "C" {
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "tsched.h"
|
|
||||||
#include "dnode.h"
|
|
||||||
|
|
||||||
|
|
||||||
void dnodeProcessMsgFromMgmt(int8_t *pCont, int32_t contLen, int32_t msgType, void *pConn);
|
void dnodeProcessMsgFromMgmt(int8_t *pCont, int32_t contLen, int32_t msgType, void *pConn);
|
||||||
|
|
||||||
extern void *tsDnodeMgmtQhandle;
|
|
||||||
|
|
||||||
void dnodeSendVpeerCfgMsg(int32_t vnode);
|
void dnodeSendVpeerCfgMsg(int32_t vnode);
|
||||||
void dnodeSendMeterCfgMsg(int32_t vnode, int32_t sid);
|
void dnodeSendMeterCfgMsg(int32_t vnode, int32_t sid);
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,8 @@ extern void (*dnodeParseParameterK)();
|
||||||
extern int32_t tsMaxQueues;
|
extern int32_t tsMaxQueues;
|
||||||
extern void ** tsRpcQhandle;
|
extern void ** tsRpcQhandle;
|
||||||
extern void *tsQueryQhandle;
|
extern void *tsQueryQhandle;
|
||||||
|
extern void *tsDnodeMgmtQhandle;
|
||||||
|
|
||||||
|
|
||||||
int32_t dnodeInitSystem();
|
int32_t dnodeInitSystem();
|
||||||
void dnodeCleanUpSystem();
|
void dnodeCleanUpSystem();
|
||||||
|
|
|
@ -83,7 +83,7 @@ void dnodeProcessMsgFromMgmt(int8_t *pCont, int32_t contLen, int32_t msgType, vo
|
||||||
dError("invalid msg type:%d", msgType);
|
dError("invalid msg type:%d", msgType);
|
||||||
} else {
|
} else {
|
||||||
if (dnodeProcessShellMsgFp[msgType]) {
|
if (dnodeProcessShellMsgFp[msgType]) {
|
||||||
(*dnodeProcessShellMsgFp[msgType])(pConn, contLen, pConn);
|
(*dnodeProcessShellMsgFp[msgType])(pCont, contLen, pConn);
|
||||||
} else {
|
} else {
|
||||||
dError("%s is not processed", taosMsg[msgType]);
|
dError("%s is not processed", taosMsg[msgType]);
|
||||||
}
|
}
|
||||||
|
@ -190,7 +190,7 @@ void dnodeSendVpeerCfgMsg(int32_t vnode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->vnode = htonl(vnode);
|
cfg->vnode = htonl(vnode);
|
||||||
dnodeSendMsgToMnode(cfg, sizeof(SMeterCfgMsg));
|
dnodeSendMsgToMnode(cfg, sizeof(SVpeerCfgMsg), TSDB_MSG_TYPE_VNODE_CFG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dnodeSendMeterCfgMsg(int32_t vnode, int32_t sid) {
|
void dnodeSendMeterCfgMsg(int32_t vnode, int32_t sid) {
|
||||||
|
@ -200,7 +200,7 @@ void dnodeSendMeterCfgMsg(int32_t vnode, int32_t sid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg->vnode = htonl(vnode);
|
cfg->vnode = htonl(vnode);
|
||||||
dnodeSendMsgToMnode(cfg, sizeof(SMeterCfgMsg));
|
dnodeSendMsgToMnode(cfg, sizeof(SMeterCfgMsg), TSDB_MSG_TYPE_TABLE_CFG);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dnodeInitProcessShellMsg() {
|
void dnodeInitProcessShellMsg() {
|
||||||
|
|
|
@ -23,28 +23,6 @@ extern "C" {
|
||||||
#include "tglobalcfg.h"
|
#include "tglobalcfg.h"
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
|
|
||||||
#define httpError(...) \
|
|
||||||
if (httpDebugFlag & DEBUG_ERROR) { \
|
|
||||||
tprintf("ERROR HTP ", 255, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define httpWarn(...) \
|
|
||||||
if (httpDebugFlag & DEBUG_WARN) { \
|
|
||||||
tprintf("WARN HTP ", httpDebugFlag, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define httpTrace(...) \
|
|
||||||
if (httpDebugFlag & DEBUG_TRACE) { \
|
|
||||||
tprintf("HTP ", httpDebugFlag, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define httpDump(...) \
|
|
||||||
if (httpDebugFlag & DEBUG_TRACE) { \
|
|
||||||
taosPrintLongString("HTP ", httpDebugFlag, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define httpPrint(...) \
|
|
||||||
{ tprintf("HTP ", 255, __VA_ARGS__); }
|
|
||||||
|
|
||||||
#define httpLError(...) taosLogError(__VA_ARGS__) httpError(__VA_ARGS__)
|
|
||||||
#define httpLWarn(...) taosLogWarn(__VA_ARGS__) httpWarn(__VA_ARGS__)
|
|
||||||
#define httpLPrint(...) taosLogPrint(__VA_ARGS__) httpPrint(__VA_ARGS__)
|
|
||||||
|
|
||||||
int32_t httpGetReqCount();
|
int32_t httpGetReqCount();
|
||||||
|
|
||||||
|
|
|
@ -335,8 +335,18 @@ typedef struct {
|
||||||
char payload[]; /* payload for wildcard match in show tables */
|
char payload[]; /* payload for wildcard match in show tables */
|
||||||
} SShowObj;
|
} SShowObj;
|
||||||
|
|
||||||
|
|
||||||
|
extern int32_t (*mgmtInitSystem)();
|
||||||
|
extern void (*mgmtStopSystem)();
|
||||||
|
|
||||||
|
int32_t mgmtStartSystem();
|
||||||
|
void mgmtCleanUpSystem();
|
||||||
void mgmtProcessMsgFromDnode(int8_t *pCont, int32_t contLen, int32_t msgType, void *pConn);
|
void mgmtProcessMsgFromDnode(int8_t *pCont, int32_t contLen, int32_t msgType, void *pConn);
|
||||||
|
|
||||||
|
|
||||||
|
extern void (*mgmtCleanUpRedirect)();
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/*
|
||||||
|
* 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 __MONITOR_H__
|
||||||
|
#define __MONITOR_H__
|
||||||
|
|
||||||
|
#include "tglobalcfg.h"
|
||||||
|
#include "tlog.h"
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -162,7 +162,10 @@ int mgmtStartSystem() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t mgmtInitSystemImp() { return mgmtStartSystem(); }
|
int32_t mgmtInitSystemImp() {
|
||||||
|
return mgmtStartSystem();
|
||||||
|
}
|
||||||
|
|
||||||
int32_t (*mgmtInitSystem)() = mgmtInitSystemImp;
|
int32_t (*mgmtInitSystem)() = mgmtInitSystemImp;
|
||||||
|
|
||||||
int32_t mgmtCheckMgmtRunningImp() { return 0; }
|
int32_t mgmtCheckMgmtRunningImp() { return 0; }
|
||||||
|
@ -177,6 +180,7 @@ void mgmtStartMgmtTimerImp() {
|
||||||
void (*mgmtStartMgmtTimer)() = mgmtStartMgmtTimerImp;
|
void (*mgmtStartMgmtTimer)() = mgmtStartMgmtTimerImp;
|
||||||
|
|
||||||
void mgmtStopSystemImp() {}
|
void mgmtStopSystemImp() {}
|
||||||
|
|
||||||
void (*mgmtStopSystem)() = mgmtStopSystemImp;
|
void (*mgmtStopSystem)() = mgmtStopSystemImp;
|
||||||
|
|
||||||
void mgmtCleanUpRedirectImp() {}
|
void mgmtCleanUpRedirectImp() {}
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
/*
|
|
||||||
* 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 __MONITOR_H__
|
|
||||||
#define __MONITOR_H__
|
|
||||||
|
|
||||||
#include "tglobalcfg.h"
|
|
||||||
#include "tlog.h"
|
|
||||||
|
|
||||||
#define monitorError(...) \
|
|
||||||
if (monitorDebugFlag & DEBUG_ERROR) { \
|
|
||||||
tprintf("ERROR MON ", 255, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define monitorWarn(...) \
|
|
||||||
if (monitorDebugFlag & DEBUG_WARN) { \
|
|
||||||
tprintf("WARN MON ", monitorDebugFlag, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define monitorTrace(...) \
|
|
||||||
if (monitorDebugFlag & DEBUG_TRACE) { \
|
|
||||||
tprintf("MON ", monitorDebugFlag, __VA_ARGS__); \
|
|
||||||
}
|
|
||||||
#define monitorPrint(...) \
|
|
||||||
{ tprintf("MON ", 255, __VA_ARGS__); }
|
|
||||||
|
|
||||||
#define monitorLError(...) taosLogError(__VA_ARGS__) monitorError(__VA_ARGS__)
|
|
||||||
#define monitorLWarn(...) taosLogWarn(__VA_ARGS__) monitorWarn(__VA_ARGS__)
|
|
||||||
#define monitorLPrint(...) taosLogPrint(__VA_ARGS__) monitorPrint(__VA_ARGS__)
|
|
||||||
|
|
||||||
#endif
|
|
|
@ -197,6 +197,48 @@ extern uint32_t cdebugFlag;
|
||||||
#define mLWarn(...) taosLogWarn(__VA_ARGS__) mWarn(__VA_ARGS__)
|
#define mLWarn(...) taosLogWarn(__VA_ARGS__) mWarn(__VA_ARGS__)
|
||||||
#define mLPrint(...) taosLogPrint(__VA_ARGS__) mPrint(__VA_ARGS__)
|
#define mLPrint(...) taosLogPrint(__VA_ARGS__) mPrint(__VA_ARGS__)
|
||||||
|
|
||||||
|
#define httpError(...) \
|
||||||
|
if (httpDebugFlag & DEBUG_ERROR) { \
|
||||||
|
tprintf("ERROR HTP ", 255, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define httpWarn(...) \
|
||||||
|
if (httpDebugFlag & DEBUG_WARN) { \
|
||||||
|
tprintf("WARN HTP ", httpDebugFlag, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define httpTrace(...) \
|
||||||
|
if (httpDebugFlag & DEBUG_TRACE) { \
|
||||||
|
tprintf("HTP ", httpDebugFlag, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define httpDump(...) \
|
||||||
|
if (httpDebugFlag & DEBUG_TRACE) { \
|
||||||
|
taosPrintLongString("HTP ", httpDebugFlag, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define httpPrint(...) \
|
||||||
|
{ tprintf("HTP ", 255, __VA_ARGS__); }
|
||||||
|
|
||||||
|
#define httpLError(...) taosLogError(__VA_ARGS__) httpError(__VA_ARGS__)
|
||||||
|
#define httpLWarn(...) taosLogWarn(__VA_ARGS__) httpWarn(__VA_ARGS__)
|
||||||
|
#define httpLPrint(...) taosLogPrint(__VA_ARGS__) httpPrint(__VA_ARGS__)
|
||||||
|
|
||||||
|
#define monitorError(...) \
|
||||||
|
if (monitorDebugFlag & DEBUG_ERROR) { \
|
||||||
|
tprintf("ERROR MON ", 255, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define monitorWarn(...) \
|
||||||
|
if (monitorDebugFlag & DEBUG_WARN) { \
|
||||||
|
tprintf("WARN MON ", monitorDebugFlag, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define monitorTrace(...) \
|
||||||
|
if (monitorDebugFlag & DEBUG_TRACE) { \
|
||||||
|
tprintf("MON ", monitorDebugFlag, __VA_ARGS__); \
|
||||||
|
}
|
||||||
|
#define monitorPrint(...) \
|
||||||
|
{ tprintf("MON ", 255, __VA_ARGS__); }
|
||||||
|
|
||||||
|
#define monitorLError(...) taosLogError(__VA_ARGS__) monitorError(__VA_ARGS__)
|
||||||
|
#define monitorLWarn(...) taosLogWarn(__VA_ARGS__) monitorWarn(__VA_ARGS__)
|
||||||
|
#define monitorLPrint(...) taosLogPrint(__VA_ARGS__) monitorPrint(__VA_ARGS__)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue