提交 78001a28 编写于 作者: S Shengliang Guan

[TD-10430] rename some files

上级 ad96d32b
......@@ -21,7 +21,6 @@ extern "C" {
#endif
#include "dnodeInt.h"
int32_t dnodeInitCheck();
void dnodeCleanupCheck();
......
......@@ -13,17 +13,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _TD_DNODE_EPS_H_
#define _TD_DNODE_EPS_H_
#ifndef _TD_DNODE_DNODE_EPS_H_
#define _TD_DNODE_DNODE_EPS_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "dnodeInt.h"
int32_t dnodeInitEps();
void dnodeCleanupEps();
void dnodeUpdateEps(SDnodeEps *data);
int32_t dnodeInitDnodeEps();
void dnodeCleanupDnodeEps();
void dnodeUpdateDnodeEps(SDnodeEps *data);
bool dnodeIsDnodeEpChanged(int32_t dnodeId, char *epstr);
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 /*_TD_DNODE_EPS_H_*/
\ No newline at end of file
#endif /*_TD_DNODE_DNODE_EPS_H_*/
\ No newline at end of file
......@@ -25,7 +25,7 @@ typedef enum {
DN_RUN_STAT_INIT,
DN_RUN_STAT_RUNNING,
DN_RUN_STAT_STOPPED
} EDnRunStat;
} EDnStat;
int32_t dnodeInitMain();
void dnodeCleanupMain();
......@@ -36,7 +36,7 @@ void dnodeReportStartupFinished(char *name, char *desc);
void dnodeProcessStartupReq(SRpcMsg *pMsg);
void dnodeProcessCreateMnodeReq(SRpcMsg *pMsg);
void dnodeProcessConfigDnodeReq(SRpcMsg *pMsg);
EDnRunStat dnodeGetRunStat();
EDnStat dnodeGetRunStat();
void dnodeSetRunStat();
void* dnodeGetTimer();
......
......@@ -18,7 +18,7 @@
#include "cJSON.h"
#include "thash.h"
#include "tglobal.h"
#include "dnodeEps.h"
#include "dnodeDnodeEps.h"
#include "dnodeCfg.h"
static struct {
......@@ -192,7 +192,7 @@ static int32_t dnodeWriteEps() {
return 0;
}
int32_t dnodeInitEps() {
int32_t dnodeInitDnodeEps() {
tsDeps.dnodeHash = taosHashInit(4, taosGetDefaultHashFunction(TSDB_DATA_TYPE_INT), true, HASH_ENTRY_LOCK);
if (tsDeps.dnodeHash == NULL) return -1;
......@@ -209,7 +209,7 @@ int32_t dnodeInitEps() {
return ret;
}
void dnodeCleanupEps() {
void dnodeCleanupDnodeEps() {
pthread_mutex_lock(&tsDeps.mutex);
if (tsDeps.dnodeList != NULL) {
......@@ -227,7 +227,7 @@ void dnodeCleanupEps() {
pthread_mutex_destroy(&tsDeps.mutex);
}
void dnodeUpdateEps(SDnodeEps *data) {
void dnodeUpdateDnodeEps(SDnodeEps *data) {
if (data == NULL || data->dnodeNum <= 0) return;
data->dnodeNum = htonl(data->dnodeNum);
......
......@@ -24,7 +24,7 @@
#include "tstep.h"
#include "dnodeCfg.h"
#include "dnodeCheck.h"
#include "dnodeEps.h"
#include "dnodeDnodeEps.h"
#include "dnodeMain.h"
#include "dnodeMnodeEps.h"
#include "dnodeStatus.h"
......@@ -64,7 +64,7 @@ int32_t dnodeInit() {
taosStepAdd(tsSteps, "dnode-rpc", rpcInit, rpcCleanup);
taosStepAdd(tsSteps, "dnode-check", dnodeInitCheck, dnodeCleanupCheck);
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-wal", walInit, walCleanUp);
//taosStepAdd(tsSteps, "dnode-sync", syncInit, syncCleanUp);
......
......@@ -29,7 +29,7 @@
#include "mnode.h"
static struct {
EDnRunStat runStatus;
EDnStat runStatus;
void * dnodeTimer;
SStartupStep startup;
} tsDmain;
......@@ -260,8 +260,8 @@ void dnodeProcessConfigDnodeReq(SRpcMsg *pMsg) {
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; }
\ No newline at end of file
......@@ -18,7 +18,7 @@
#include "cJSON.h"
#include "tglobal.h"
#include "dnodeCfg.h"
#include "dnodeEps.h"
#include "dnodeDnodeEps.h"
#include "dnodeMnodeEps.h"
#include "mnode.h"
......
......@@ -19,7 +19,7 @@
#include "ttimer.h"
#include "tglobal.h"
#include "dnodeCfg.h"
#include "dnodeEps.h"
#include "dnodeDnodeEps.h"
#include "dnodeMnodeEps.h"
#include "dnodeStatus.h"
#include "dnodeMain.h"
......@@ -114,7 +114,7 @@ void dnodeProcessStatusRsp(SRpcMsg *pMsg) {
vnodeSetAccess(pStatusRsp->vgAccess, pCfg->numOfVnodes);
SDnodeEps *pEps = (SDnodeEps *)((char *)pStatusRsp->vgAccess + pCfg->numOfVnodes * sizeof(SVgroupAccess));
dnodeUpdateEps(pEps);
dnodeUpdateDnodeEps(pEps);
taosTmrReset(dnodeSendStatusMsg, tsStatusInterval * 1000, NULL, tsStatus.dnodeTimer, &tsStatus.statusTimer);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册