[TD-10430] rename some files
This commit is contained in:
parent
ad96d32b48
commit
78001a2887
|
@ -21,7 +21,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include "dnodeInt.h"
|
#include "dnodeInt.h"
|
||||||
|
|
||||||
|
|
||||||
int32_t dnodeInitCheck();
|
int32_t dnodeInitCheck();
|
||||||
void dnodeCleanupCheck();
|
void dnodeCleanupCheck();
|
||||||
|
|
||||||
|
|
|
@ -13,17 +13,17 @@
|
||||||
* 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_DNODE_EPS_H_
|
#ifndef _TD_DNODE_DNODE_EPS_H_
|
||||||
#define _TD_DNODE_EPS_H_
|
#define _TD_DNODE_DNODE_EPS_H_
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#include "dnodeInt.h"
|
#include "dnodeInt.h"
|
||||||
|
|
||||||
int32_t dnodeInitEps();
|
int32_t dnodeInitDnodeEps();
|
||||||
void dnodeCleanupEps();
|
void dnodeCleanupDnodeEps();
|
||||||
void dnodeUpdateEps(SDnodeEps *data);
|
void dnodeUpdateDnodeEps(SDnodeEps *data);
|
||||||
bool dnodeIsDnodeEpChanged(int32_t dnodeId, char *epstr);
|
bool dnodeIsDnodeEpChanged(int32_t dnodeId, char *epstr);
|
||||||
void dnodeGetDnodeEp(int32_t dnodeId, char *epstr, char *fqdn, uint16_t *port);
|
void dnodeGetDnodeEp(int32_t dnodeId, char *epstr, char *fqdn, uint16_t *port);
|
||||||
|
|
||||||
|
@ -31,4 +31,4 @@ void dnodeGetDnodeEp(int32_t dnodeId, char *epstr, char *fqdn, uint16_t *port
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /*_TD_DNODE_EPS_H_*/
|
#endif /*_TD_DNODE_DNODE_EPS_H_*/
|
|
@ -25,7 +25,7 @@ typedef enum {
|
||||||
DN_RUN_STAT_INIT,
|
DN_RUN_STAT_INIT,
|
||||||
DN_RUN_STAT_RUNNING,
|
DN_RUN_STAT_RUNNING,
|
||||||
DN_RUN_STAT_STOPPED
|
DN_RUN_STAT_STOPPED
|
||||||
} EDnRunStat;
|
} EDnStat;
|
||||||
|
|
||||||
int32_t dnodeInitMain();
|
int32_t dnodeInitMain();
|
||||||
void dnodeCleanupMain();
|
void dnodeCleanupMain();
|
||||||
|
@ -36,7 +36,7 @@ void dnodeReportStartupFinished(char *name, char *desc);
|
||||||
void dnodeProcessStartupReq(SRpcMsg *pMsg);
|
void dnodeProcessStartupReq(SRpcMsg *pMsg);
|
||||||
void dnodeProcessCreateMnodeReq(SRpcMsg *pMsg);
|
void dnodeProcessCreateMnodeReq(SRpcMsg *pMsg);
|
||||||
void dnodeProcessConfigDnodeReq(SRpcMsg *pMsg);
|
void dnodeProcessConfigDnodeReq(SRpcMsg *pMsg);
|
||||||
EDnRunStat dnodeGetRunStat();
|
EDnStat dnodeGetRunStat();
|
||||||
void dnodeSetRunStat();
|
void dnodeSetRunStat();
|
||||||
void* dnodeGetTimer();
|
void* dnodeGetTimer();
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include "thash.h"
|
#include "thash.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "dnodeEps.h"
|
#include "dnodeDnodeEps.h"
|
||||||
#include "dnodeCfg.h"
|
#include "dnodeCfg.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
|
@ -192,7 +192,7 @@ static int32_t dnodeWriteEps() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t dnodeInitEps() {
|
int32_t dnodeInitDnodeEps() {
|
||||||
tsDeps.dnodeHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_ENTRY_LOCK);
|
tsDeps.dnodeHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_ENTRY_LOCK);
|
||||||
if (tsDeps.dnodeHash == NULL) return -1;
|
if (tsDeps.dnodeHash == NULL) return -1;
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ int32_t dnodeInitEps() {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dnodeCleanupEps() {
|
void dnodeCleanupDnodeEps() {
|
||||||
pthread_mutex_lock(&tsDeps.mutex);
|
pthread_mutex_lock(&tsDeps.mutex);
|
||||||
|
|
||||||
if (tsDeps.dnodeList != NULL) {
|
if (tsDeps.dnodeList != NULL) {
|
||||||
|
@ -227,7 +227,7 @@ void dnodeCleanupEps() {
|
||||||
pthread_mutex_destroy(&tsDeps.mutex);
|
pthread_mutex_destroy(&tsDeps.mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dnodeUpdateEps(SDnodeEps *data) {
|
void dnodeUpdateDnodeEps(SDnodeEps *data) {
|
||||||
if (data == NULL || data->dnodeNum <= 0) return;
|
if (data == NULL || data->dnodeNum <= 0) return;
|
||||||
|
|
||||||
data->dnodeNum = htonl(data->dnodeNum);
|
data->dnodeNum = htonl(data->dnodeNum);
|
|
@ -24,7 +24,7 @@
|
||||||
#include "tstep.h"
|
#include "tstep.h"
|
||||||
#include "dnodeCfg.h"
|
#include "dnodeCfg.h"
|
||||||
#include "dnodeCheck.h"
|
#include "dnodeCheck.h"
|
||||||
#include "dnodeEps.h"
|
#include "dnodeDnodeEps.h"
|
||||||
#include "dnodeMain.h"
|
#include "dnodeMain.h"
|
||||||
#include "dnodeMnodeEps.h"
|
#include "dnodeMnodeEps.h"
|
||||||
#include "dnodeStatus.h"
|
#include "dnodeStatus.h"
|
||||||
|
@ -64,7 +64,7 @@ int32_t dnodeInit() {
|
||||||
taosStepAdd(tsSteps, "dnode-rpc", rpcInit, rpcCleanup);
|
taosStepAdd(tsSteps, "dnode-rpc", rpcInit, rpcCleanup);
|
||||||
taosStepAdd(tsSteps, "dnode-check", dnodeInitCheck, dnodeCleanupCheck);
|
taosStepAdd(tsSteps, "dnode-check", dnodeInitCheck, dnodeCleanupCheck);
|
||||||
taosStepAdd(tsSteps, "dnode-cfg", dnodeInitCfg, dnodeCleanupCfg);
|
taosStepAdd(tsSteps, "dnode-cfg", dnodeInitCfg, dnodeCleanupCfg);
|
||||||
taosStepAdd(tsSteps, "dnode-deps", dnodeInitEps, dnodeCleanupEps);
|
taosStepAdd(tsSteps, "dnode-deps", dnodeInitDnodeEps, dnodeCleanupDnodeEps);
|
||||||
taosStepAdd(tsSteps, "dnode-meps", dnodeInitMnodeEps, dnodeCleanupMnodeEps);
|
taosStepAdd(tsSteps, "dnode-meps", dnodeInitMnodeEps, dnodeCleanupMnodeEps);
|
||||||
//taosStepAdd(tsSteps, "dnode-wal", walInit, walCleanUp);
|
//taosStepAdd(tsSteps, "dnode-wal", walInit, walCleanUp);
|
||||||
//taosStepAdd(tsSteps, "dnode-sync", syncInit, syncCleanUp);
|
//taosStepAdd(tsSteps, "dnode-sync", syncInit, syncCleanUp);
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
#include "mnode.h"
|
#include "mnode.h"
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
EDnRunStat runStatus;
|
EDnStat runStatus;
|
||||||
void * dnodeTimer;
|
void * dnodeTimer;
|
||||||
SStartupStep startup;
|
SStartupStep startup;
|
||||||
} tsDmain;
|
} tsDmain;
|
||||||
|
@ -260,8 +260,8 @@ void dnodeProcessConfigDnodeReq(SRpcMsg *pMsg) {
|
||||||
rpcFreeCont(pMsg->pCont);
|
rpcFreeCont(pMsg->pCont);
|
||||||
}
|
}
|
||||||
|
|
||||||
EDnRunStat dnodeGetRunStat() { return tsDmain.runStatus; }
|
EDnStat dnodeGetRunStat() { return tsDmain.runStatus; }
|
||||||
|
|
||||||
void dnodeSetRunStat(EDnRunStat stat) { tsDmain.runStatus = stat; }
|
void dnodeSetRunStat(EDnStat stat) { tsDmain.runStatus = stat; }
|
||||||
|
|
||||||
void* dnodeGetTimer() { return tsDmain.dnodeTimer; }
|
void* dnodeGetTimer() { return tsDmain.dnodeTimer; }
|
|
@ -18,7 +18,7 @@
|
||||||
#include "cJSON.h"
|
#include "cJSON.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "dnodeCfg.h"
|
#include "dnodeCfg.h"
|
||||||
#include "dnodeEps.h"
|
#include "dnodeDnodeEps.h"
|
||||||
#include "dnodeMnodeEps.h"
|
#include "dnodeMnodeEps.h"
|
||||||
#include "mnode.h"
|
#include "mnode.h"
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "ttimer.h"
|
#include "ttimer.h"
|
||||||
#include "tglobal.h"
|
#include "tglobal.h"
|
||||||
#include "dnodeCfg.h"
|
#include "dnodeCfg.h"
|
||||||
#include "dnodeEps.h"
|
#include "dnodeDnodeEps.h"
|
||||||
#include "dnodeMnodeEps.h"
|
#include "dnodeMnodeEps.h"
|
||||||
#include "dnodeStatus.h"
|
#include "dnodeStatus.h"
|
||||||
#include "dnodeMain.h"
|
#include "dnodeMain.h"
|
||||||
|
@ -114,7 +114,7 @@ void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
|
||||||
vnodeSetAccess(pStatusRsp->vgAccess, pCfg->numOfVnodes);
|
vnodeSetAccess(pStatusRsp->vgAccess, pCfg->numOfVnodes);
|
||||||
|
|
||||||
SDnodeEps *pEps = (SDnodeEps *)((char *)pStatusRsp->vgAccess + pCfg->numOfVnodes * sizeof(SVgroupAccess));
|
SDnodeEps *pEps = (SDnodeEps *)((char *)pStatusRsp->vgAccess + pCfg->numOfVnodes * sizeof(SVgroupAccess));
|
||||||
dnodeUpdateEps(pEps);
|
dnodeUpdateDnodeEps(pEps);
|
||||||
|
|
||||||
taosTmrReset(dnodeSendStatusMsg, tsStatusInterval * 1000, NULL, tsStatus.dnodeTimer, &tsStatus.statusTimer);
|
taosTmrReset(dnodeSendStatusMsg, tsStatusInterval * 1000, NULL, tsStatus.dnodeTimer, &tsStatus.statusTimer);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue