diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 446ff97e780a24aa5880187e8048951bc7673e88..eabc57ff1b882dfc135627cdd56b98f663bb9b04 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -7713,15 +7713,15 @@ int32_t validateDNodeConfig(SMiscInfo* pOptions) { const int tokenBalance = 2; const int tokenMonitor = 3; const int tokenDebugFlag = 4; - const int tokenDebugFlagEnd = 20; - const int tokenOfflineInterval = 21; - const int tokenKeepTimeOffset = 22; + const int tokenDebugFlagEnd = 19; + const int tokenOfflineInterval = 20; + const int tokenKeepTimeOffset = 21; const SDNodeDynConfOption cfgOptions[] = { {"resetLog", 8}, {"resetQueryCache", 15}, {"balance", 7}, {"monitor", 7}, {"debugFlag", 9}, {"monDebugFlag", 12}, {"vDebugFlag", 10}, {"mDebugFlag", 10}, {"cDebugFlag", 10}, {"httpDebugFlag", 13}, {"qDebugflag", 10}, {"sdbDebugFlag", 12}, {"uDebugFlag", 10}, {"tsdbDebugFlag", 13}, {"sDebugflag", 10}, {"rpcDebugFlag", 12}, - {"dDebugFlag", 10}, {"mqttDebugFlag", 13}, {"wDebugFlag", 10}, {"tmrDebugFlag", 12}, + {"dDebugFlag", 10}, {"wDebugFlag", 10}, {"tmrDebugFlag", 12}, {"cqDebugFlag", 11}, {"offlineInterval", 15}, {"keepTimeOffset", 14}, diff --git a/src/common/inc/tglobal.h b/src/common/inc/tglobal.h index fc4b1f0102b93ea263273ae3cc2c631771e1c286..3add0b566dffb88d0a60e70c6098fd6586d3b689 100644 --- a/src/common/inc/tglobal.h +++ b/src/common/inc/tglobal.h @@ -142,15 +142,6 @@ extern int8_t tsTelegrafUseFieldNum; extern int8_t tsHttpDbNameMandatory; extern int32_t tsHttpKeepAlive; -// mqtt -extern int8_t tsEnableMqttModule; -extern char tsMqttHostName[]; -extern char tsMqttPort[]; -extern char tsMqttUser[]; -extern char tsMqttPass[]; -extern char tsMqttClientId[]; -extern char tsMqttTopic[]; - // monitor extern int8_t tsEnableMonitorModule; extern int8_t tsMonitorReplica; @@ -216,7 +207,6 @@ extern int32_t jniDebugFlag; extern int32_t tmrDebugFlag; extern int32_t sdbDebugFlag; extern int32_t httpDebugFlag; -extern int32_t mqttDebugFlag; extern int32_t monDebugFlag; extern int32_t uDebugFlag; extern int32_t rpcDebugFlag; diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index b27c62ed53c5c878ddf2b675ebc4f41cc394f8a6..616c5fba890a03a2f59a6bee6ae7d2f79ee52760 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -187,15 +187,6 @@ int8_t tsTelegrafUseFieldNum = 0; int8_t tsHttpDbNameMandatory = 0; int32_t tsHttpKeepAlive = 30000; -// mqtt -int8_t tsEnableMqttModule = 0; // not finished yet, not started it by default -char tsMqttHostName[TSDB_MQTT_HOSTNAME_LEN] = "test.mosquitto.org"; -char tsMqttPort[TSDB_MQTT_PORT_LEN] = "1883"; -char tsMqttUser[TSDB_MQTT_USER_LEN] = {0}; -char tsMqttPass[TSDB_MQTT_PASS_LEN] = {0}; -char tsMqttClientId[TSDB_MQTT_CLIENT_ID_LEN] = "TDengineMqttSubscriber"; -char tsMqttTopic[TSDB_MQTT_TOPIC_LEN] = "/test"; // # - // monitor int8_t tsEnableMonitorModule = 1; int8_t tsMonitorReplica = 1; @@ -264,7 +255,6 @@ uint32_t cDebugFlag = 131; int32_t jniDebugFlag = 131; int32_t odbcDebugFlag = 131; int32_t httpDebugFlag = 131; -int32_t mqttDebugFlag = 131; int32_t monDebugFlag = 131; uint32_t qDebugFlag = 131; int32_t rpcDebugFlag = 131; @@ -321,7 +311,6 @@ void taosSetAllDebugFlag() { jniDebugFlag = debugFlag; odbcDebugFlag = debugFlag; httpDebugFlag = debugFlag; - mqttDebugFlag = debugFlag; monDebugFlag = debugFlag; qDebugFlag = debugFlag; rpcDebugFlag = debugFlag; @@ -1051,36 +1040,6 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "mqttHostName"; - cfg.ptr = tsMqttHostName; - cfg.valType = TAOS_CFG_VTYPE_STRING; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT; - cfg.minValue = 0; - cfg.maxValue = 0; - cfg.ptrLength = TSDB_MQTT_HOSTNAME_LEN; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosInitConfigOption(cfg); - - cfg.option = "mqttPort"; - cfg.ptr = tsMqttPort; - cfg.valType = TAOS_CFG_VTYPE_STRING; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT; - cfg.minValue = 0; - cfg.maxValue = 0; - cfg.ptrLength = TSDB_MQTT_PORT_LEN; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosInitConfigOption(cfg); - - cfg.option = "mqttTopic"; - cfg.ptr = tsMqttTopic; - cfg.valType = TAOS_CFG_VTYPE_STRING; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT; - cfg.minValue = 0; - cfg.maxValue = 0; - cfg.ptrLength = TSDB_MQTT_TOPIC_LEN; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosInitConfigOption(cfg); - cfg.option = "compressMsgSize"; cfg.ptr = &tsCompressMsgSize; cfg.valType = TAOS_CFG_VTYPE_INT32; @@ -1305,16 +1264,6 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "mqtt"; - cfg.ptr = &tsEnableMqttModule; - cfg.valType = TAOS_CFG_VTYPE_INT8; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; - cfg.minValue = 0; - cfg.maxValue = 1; - cfg.ptrLength = 1; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosInitConfigOption(cfg); - cfg.option = "monitor"; cfg.ptr = &tsEnableMonitorModule; cfg.valType = TAOS_CFG_VTYPE_INT8; @@ -1567,16 +1516,6 @@ static void doInitGlobalConfig(void) { cfg.unitType = TAOS_CFG_UTYPE_NONE; taosInitConfigOption(cfg); - cfg.option = "mqttDebugFlag"; - cfg.ptr = &mqttDebugFlag; - cfg.valType = TAOS_CFG_VTYPE_INT32; - cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG; - cfg.minValue = 0; - cfg.maxValue = 255; - cfg.ptrLength = 0; - cfg.unitType = TAOS_CFG_UTYPE_NONE; - taosInitConfigOption(cfg); - cfg.option = "monDebugFlag"; cfg.ptr = &monDebugFlag; cfg.valType = TAOS_CFG_VTYPE_INT32; diff --git a/src/dnode/CMakeLists.txt b/src/dnode/CMakeLists.txt index ac91b498309bd951fab5860b223162ef40aff606..359f4534dfbeb3ea071f1301302a307121a60ef5 100644 --- a/src/dnode/CMakeLists.txt +++ b/src/dnode/CMakeLists.txt @@ -47,10 +47,6 @@ IF (TD_USB_DONGLE) TARGET_LINK_LIBRARIES(taosd usb_dongle) ENDIF () -IF (TD_MQTT) - TARGET_LINK_LIBRARIES(taosd mqtt) -ENDIF () - IF (TD_TOPIC) TARGET_LINK_LIBRARIES(taosd topic) ENDIF () diff --git a/src/dnode/src/dnodeModule.c b/src/dnode/src/dnodeModule.c index 39f9e352793ffcab885438309980c0c530e048ad..682d3f877d0350df76b4cceff50b283ac0c53d79 100644 --- a/src/dnode/src/dnodeModule.c +++ b/src/dnode/src/dnodeModule.c @@ -17,7 +17,6 @@ #include "os.h" #include "mnode.h" #include "http.h" -#include "tmqtt.h" #include "monitor.h" #include "dnodeModule.h" @@ -61,18 +60,6 @@ static void dnodeAllocModules() { } #endif -#ifdef _MQTT - tsModule[TSDB_MOD_MQTT].enable = (tsEnableMqttModule == 1); - tsModule[TSDB_MOD_MQTT].name = "mqtt"; - tsModule[TSDB_MOD_MQTT].initFp = mqttInitSystem; - tsModule[TSDB_MOD_MQTT].cleanUpFp = mqttCleanUpSystem; - tsModule[TSDB_MOD_MQTT].startFp = mqttStartSystem; - tsModule[TSDB_MOD_MQTT].stopFp = mqttStopSystem; - if (tsEnableMqttModule) { - dnodeSetModuleStatus(TSDB_MOD_MQTT); - } -#endif - tsModule[TSDB_MOD_MONITOR].enable = (tsEnableMonitorModule == 1); tsModule[TSDB_MOD_MONITOR].name = "monitor"; tsModule[TSDB_MOD_MONITOR].initFp = monInitSystem; diff --git a/src/inc/taosdef.h b/src/inc/taosdef.h index 436f6cc3abcd8b062d81810b0c426c3e7cf9c167..2562dee8e476a85dc63d70798094b3653b8ae978 100644 --- a/src/inc/taosdef.h +++ b/src/inc/taosdef.h @@ -249,13 +249,6 @@ do { \ #define TSDB_STEP_NAME_LEN 32 #define TSDB_STEP_DESC_LEN 128 -#define TSDB_MQTT_HOSTNAME_LEN 64 -#define TSDB_MQTT_PORT_LEN 8 -#define TSDB_MQTT_USER_LEN 24 -#define TSDB_MQTT_PASS_LEN 24 -#define TSDB_MQTT_TOPIC_LEN 64 -#define TSDB_MQTT_CLIENT_ID_LEN 32 - #define TSDB_DB_TYPE_DEFAULT 0 #define TSDB_DB_TYPE_TOPIC 1 @@ -461,8 +454,7 @@ typedef enum { TSDB_MOD_MNODE = 0, TSDB_MOD_HTTP = 1, TSDB_MOD_MONITOR = 2, - TSDB_MOD_MQTT = 3, - TSDB_MOD_MAX = 4 + TSDB_MOD_MAX = 3 } EModuleType; typedef enum { diff --git a/src/inc/tmqtt.h b/src/inc/tmqtt.h deleted file mode 100644 index 256e61fbae897cd77c1e7cc780c4c4c587293e28..0000000000000000000000000000000000000000 --- a/src/inc/tmqtt.h +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. - * - * 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 . - */ - -#ifndef TDENGINE_MQTT_H -#define TDENGINE_MQTT_H - -#ifdef __cplusplus -extern "C" { -#endif - -int32_t mqttInitSystem(); -int32_t mqttStartSystem(); -void mqttStopSystem(); -void mqttCleanUpSystem(); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index 93d754d70dfd90efbf166497e309a2659bc1c1a3..80b8be7d833def37090f5fd54f7c73c2c6768b5c 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -1044,7 +1044,7 @@ int32_t mnodeRetrieveModules(SShowObj *pShow, char *data, int32_t rows, void *pC int32_t numOfRows = 0; char* pWrite; - char* moduleName[5] = { "MNODE", "HTTP", "MONITOR", "MQTT", "UNKNOWN" }; + char* moduleName[4] = { "MNODE", "HTTP", "MONITOR", "UNKNOWN" }; int32_t cols; while (numOfRows < rows) { diff --git a/src/util/inc/tconfig.h b/src/util/inc/tconfig.h index a2c293772213fe804bc49fb2b74b9cc557dca269..fd9a340a25a752b18ab07a8fbb2691038af3b71b 100644 --- a/src/util/inc/tconfig.h +++ b/src/util/inc/tconfig.h @@ -20,7 +20,7 @@ extern "C" { #endif -#define TSDB_CFG_MAX_NUM 136 +#define TSDB_CFG_MAX_NUM 131 #define TSDB_CFG_PRINT_LEN 23 #define TSDB_CFG_OPTION_LEN 24 #define TSDB_CFG_VALUE_LEN 41 diff --git a/tests/script/general/alter/dnode.sim b/tests/script/general/alter/dnode.sim index 7b31218fc231cfdbb79ca97573cfc6f6f149037d..871aa6a6f8edd67380e6142bd3808ca55eb87199 100644 --- a/tests/script/general/alter/dnode.sim +++ b/tests/script/general/alter/dnode.sim @@ -36,7 +36,6 @@ sql alter dnode 1 tsdbDebugFlag 135 sql alter dnode 1 sDebugflag 135 sql alter dnode 1 rpcDebugFlag 135 sql alter dnode 1 dDebugFlag 135 -sql alter dnode 1 mqttDebugFlag 135 sql alter dnode 1 wDebugFlag 135 sql alter dnode 1 tmrDebugFlag 135 sql_error alter dnode 2 wDebugFlag 135 @@ -68,4 +67,4 @@ sql alter dnode 1 balance "vnode:2-dnode:1" -x step4 step4: print ======= over -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT