refact(cluster): node mgmt
This commit is contained in:
parent
3de4b0ad05
commit
271264f626
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
#include "tconfig.h"
|
#include "tconfig.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_IMP_H_
|
#ifndef _TD_DND_IMP_H_
|
||||||
#define _TD_DND_IMP_H_
|
#define _TD_DND_IMP_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
static void dmPrintDnodes(SDnodeData *pMgmt);
|
static void dmPrintDnodes(SDnodeData *pMgmt);
|
||||||
static bool dmIsEpChanged(SDnodeData *pMgmt, int32_t dnodeId, const char *ep);
|
static bool dmIsEpChanged(SDnodeData *pMgmt, int32_t dnodeId, const char *ep);
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
static bool dndRequireNode(SMgmtWrapper *pWrapper) {
|
static bool dndRequireNode(SMgmtWrapper *pWrapper) {
|
||||||
bool required = false;
|
bool required = false;
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
static int32_t dmProcessStatusRsp(SDnode *pDnode, SRpcMsg *pRsp) {
|
static int32_t dmProcessStatusRsp(SDnode *pDnode, SRpcMsg *pRsp) {
|
||||||
SDnode *pDnode = pMgmt->pDnode;
|
SDnode *pDnode = pMgmt->pDnode;
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
static void dmGetMonitorBasicInfo(SDnode *pDnode, SMonBasicInfo *pInfo) {
|
static void dmGetMonitorBasicInfo(SDnode *pDnode, SMonBasicInfo *pInfo) {
|
||||||
pInfo->protocol = 1;
|
pInfo->protocol = 1;
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
|
|
||||||
static int32_t dndInitVars(SDnode *pDnode, const SDnodeOpt *pOption) {
|
static int32_t dndInitVars(SDnode *pDnode, const SDnodeOpt *pOption) {
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
#define INTERNAL_USER "_dnd"
|
#define INTERNAL_USER "_dnd"
|
||||||
#define INTERNAL_CKEY "_key"
|
#define INTERNAL_CKEY "_key"
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndImp.h"
|
#include "dmImp.h"
|
||||||
|
|
||||||
static void *dmStatusThreadFp(void *param) {
|
static void *dmStatusThreadFp(void *param) {
|
||||||
SDnode *pDnode = param;
|
SDnode *pDnode = param;
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_DEF_H_
|
#ifndef _TD_DND_DEF_H_
|
||||||
#define _TD_DND_DEF_H_
|
#define _TD_DND_DEF_H_
|
||||||
|
|
||||||
#include "dndLog.h"
|
#include "dmLog.h"
|
||||||
|
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include "tcache.h"
|
#include "tcache.h"
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_INT_H_
|
#ifndef _TD_DND_INT_H_
|
||||||
#define _TD_DND_INT_H_
|
#define _TD_DND_INT_H_
|
||||||
|
|
||||||
#include "dndDef.h"
|
#include "dmDef.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
#include "wal.h"
|
#include "wal.h"
|
||||||
|
|
||||||
static int8_t once = DND_ENV_INIT;
|
static int8_t once = DND_ENV_INIT;
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#define MAXLEN 1024
|
#define MAXLEN 1024
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
const char *dndStatName(EDndRunStatus status) {
|
const char *dndStatName(EDndRunStatus status) {
|
||||||
switch (status) {
|
switch (status) {
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_BNODE_INT_H_
|
#ifndef _TD_DND_BNODE_INT_H_
|
||||||
#define _TD_DND_BNODE_INT_H_
|
#define _TD_DND_BNODE_INT_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#include "bnode.h"
|
#include "bnode.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_MNODE_INT_H_
|
#ifndef _TD_DND_MNODE_INT_H_
|
||||||
#define _TD_DND_MNODE_INT_H_
|
#define _TD_DND_MNODE_INT_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#include "mnode.h"
|
#include "mnode.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_QNODE_INT_H_
|
#ifndef _TD_DND_QNODE_INT_H_
|
||||||
#define _TD_DND_QNODE_INT_H_
|
#define _TD_DND_QNODE_INT_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#include "qnode.h"
|
#include "qnode.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_SNODE_INT_H_
|
#ifndef _TD_DND_SNODE_INT_H_
|
||||||
#define _TD_DND_SNODE_INT_H_
|
#define _TD_DND_SNODE_INT_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#include "snode.h"
|
#include "snode.h"
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#ifndef _TD_DND_VNODES_INT_H_
|
#ifndef _TD_DND_VNODES_INT_H_
|
||||||
#define _TD_DND_VNODES_INT_H_
|
#define _TD_DND_VNODES_INT_H_
|
||||||
|
|
||||||
#include "dndInt.h"
|
#include "dmInt.h"
|
||||||
|
|
||||||
#include "sync.h"
|
#include "sync.h"
|
||||||
#include "vnode.h"
|
#include "vnode.h"
|
||||||
|
|
Loading…
Reference in New Issue