shm
This commit is contained in:
parent
352174a5ce
commit
edccd79561
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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_DND_BNODE_HANDLE_H_
|
||||
#define _TD_DND_BNODE_HANDLE_H_
|
||||
|
||||
#include "mmInt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void bmInitMsgHandles(SMgmtWrapper *pWrapper);
|
||||
SMsgHandle bmGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_TD_DND_BNODE_HANDLE_H_*/
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "bmHandle.h"
|
||||
#include "bmWorker.h"
|
||||
|
||||
void bmInitMsgHandles(SMgmtWrapper *pWrapper) {
|
||||
}
|
||||
|
||||
SMsgHandle bmGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex) {
|
||||
SBnodeMgmt *pMgmt = pWrapper->pMgmt;
|
||||
return pMgmt->msgHandles[msgIndex];
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "bmInt.h"
|
||||
#include "bmHandle.h"
|
||||
|
||||
SMgmtFp bmGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = bmGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
|
@ -254,6 +254,8 @@ SMgmtWrapper *dndGetWrapper(SDnode *pDnode, ENodeType nodeType) ;
|
|||
|
||||
void dndProcessRpcMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SRpcMsg *pMsg, SEpSet *pEpSet);
|
||||
|
||||
SMgmtFp dndGetMgmtFp();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -33,9 +33,9 @@ void dndGetMnodeEpSet(SDnode *pDnode, SEpSet *pEpSet);
|
|||
|
||||
void dndSendRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg);
|
||||
void dndSendStatusReq(SDnode *pDnode);
|
||||
void dndProcessMgmtMsg(SDnode *pDnode, SRpcMsg *pRpcMsg, SEpSet *pEpSet);
|
||||
void dndProcessStartupReq(SDnode *pDnode, SRpcMsg *pMsg);
|
||||
|
||||
void dndProcessMgmtMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg) ;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#define _DEFAULT_SOURCE
|
||||
#include "dndHandle.h"
|
||||
#include "dndWorker.h"
|
||||
#include "dndMgmt.h"
|
||||
|
||||
static void dndSetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgType, NodeMsgFp nodeMsgFp) {
|
||||
SDnodeMgmt *pMgmt = pWrapper->pMgmt;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "dndInt.h"
|
||||
#include "dndHandle.h"
|
||||
|
||||
static int8_t once = DND_ENV_INIT;
|
||||
|
||||
|
@ -140,4 +141,10 @@ void dndeHandleEvent(SDnode *pDnode, EDndEvent event) {
|
|||
|
||||
SMgmtWrapper *dndGetWrapper(SDnode *pDnode, ENodeType nodeType) {
|
||||
return &pDnode->mgmts[nodeType];
|
||||
}
|
||||
}
|
||||
|
||||
SMgmtFp dndGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = dndGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
||||
|
|
|
@ -120,6 +120,7 @@ SDnode *dndCreate(SDndCfg *pCfg) {
|
|||
goto _OVER;
|
||||
}
|
||||
|
||||
pDnode->mgmts[DNODE].fp = dndGetMgmtFp();
|
||||
pDnode->mgmts[MNODE].fp = mmGetMgmtFp();
|
||||
pDnode->mgmts[VNODES].fp = vmGetMgmtFp();
|
||||
pDnode->mgmts[QNODE].fp = qmGetMgmtFp();
|
||||
|
|
|
@ -425,4 +425,21 @@ static void dndProcessMgmtQueue(SDnode *pDnode, SRpcMsg *pMsg) {
|
|||
taosFreeQitem(pMsg);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int32_t dndInitMgmt(SDnode *pDnode) {return 0;}
|
||||
void dndStopMgmt(SDnode *pDnode) {}
|
||||
|
||||
void dndCleanupMgmt(SDnode *pDnode){}
|
||||
|
||||
|
||||
void dndSendStatusReq(SDnode *pDnode){}
|
||||
|
||||
|
||||
void dndGetMnodeEpSet(SDnode *pDnode, SEpSet *pEpSet) {}
|
||||
|
||||
|
||||
void dndProcessStartupReq(SDnode *pDnode, SRpcMsg *pReq){}
|
||||
void dndProcessMgmtMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg){}
|
|
@ -20,6 +20,7 @@
|
|||
SMgmtFp mmGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = mmGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -266,4 +266,8 @@ static void mmConsumeMsgQueue(SDnode *pDnode, SMndMsg *pMsg) {
|
|||
taosFreeQitem(pMsg);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void mmProcessWriteMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {}
|
||||
void mmProcessSyncMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {}
|
||||
void mmProcessReadMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg) {}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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_DND_QNODE_HANDLE_H_
|
||||
#define _TD_DND_QNODE_HANDLE_H_
|
||||
|
||||
#include "qmInt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void qmInitMsgHandles(SMgmtWrapper *pWrapper);
|
||||
SMsgHandle qmGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_TD_DND_QNODE_HANDLE_H_*/
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "qmHandle.h"
|
||||
#include "qmWorker.h"
|
||||
|
||||
void qmInitMsgHandles(SMgmtWrapper *pWrapper) {
|
||||
}
|
||||
|
||||
SMsgHandle qmGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex) {
|
||||
SQnodeMgmt *pMgmt = pWrapper->pMgmt;
|
||||
return pMgmt->msgHandles[msgIndex];
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "qmInt.h"
|
||||
#include "qmHandle.h"
|
||||
|
||||
SMgmtFp qmGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = qmGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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_DND_SNODE_HANDLE_H_
|
||||
#define _TD_DND_SNODE_HANDLE_H_
|
||||
|
||||
#include "mmInt.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void smInitMsgHandles(SMgmtWrapper *pWrapper);
|
||||
SMsgHandle smGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_TD_DND_SNODE_HANDLE_H_*/
|
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "smHandle.h"
|
||||
#include "smWorker.h"
|
||||
|
||||
void smInitMsgHandles(SMgmtWrapper *pWrapper) {
|
||||
}
|
||||
|
||||
SMsgHandle smGetMsgHandle(SMgmtWrapper *pWrapper, int32_t msgIndex) {
|
||||
SBnodeMgmt *pMgmt = pWrapper->pMgmt;
|
||||
return pMgmt->msgHandles[msgIndex];
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "smInt.h"
|
||||
#include "smHandle.h"
|
||||
|
||||
SMgmtFp smGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = smGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "vmInt.h"
|
||||
#include "vmHandle.h"
|
||||
|
||||
SMgmtFp vmGetMgmtFp() {
|
||||
SMgmtFp mgmtFp = {0};
|
||||
mgmtFp.getMsgHandleFp = vmGetMsgHandle;
|
||||
return mgmtFp;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "vmWorker.h"
|
||||
|
||||
void vmProcessWriteMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg){}
|
||||
void vmProcessSyncMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg){}
|
||||
void vmProcessQueryMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg){}
|
||||
void vmProcessFetchMsg(SDnode *pDnode, SMgmtWrapper *pWrapper, SNodeMsg *pMsg){}
|
Loading…
Reference in New Issue