diff --git a/source/dnode/mgmt/CMakeLists.txt b/source/dnode/mgmt/CMakeLists.txt index 35ea166983..81c434eb27 100644 --- a/source/dnode/mgmt/CMakeLists.txt +++ b/source/dnode/mgmt/CMakeLists.txt @@ -1,12 +1,10 @@ -aux_source_directory(src DNODE_SRC) -aux_source_directory(dnode/src DNODE_SRC) -aux_source_directory(qnode/src DNODE_SRC) -aux_source_directory(bnode/src DNODE_SRC) -aux_source_directory(snode/src DNODE_SRC) -aux_source_directory(vnode/src DNODE_SRC) -aux_source_directory(mnode/src DNODE_SRC) -aux_source_directory(container/src DNODE_SRC) - +aux_source_directory(dm/src DNODE_SRC) +aux_source_directory(qm/src DNODE_SRC) +aux_source_directory(bm/src DNODE_SRC) +aux_source_directory(sm/src DNODE_SRC) +aux_source_directory(vm/src DNODE_SRC) +aux_source_directory(mm/src DNODE_SRC) +aux_source_directory(main/src DNODE_SRC) add_library(dnode STATIC ${DNODE_SRC}) target_link_libraries( dnode cjson mnode vnode qnode snode bnode wal sync taos tfs monitor @@ -14,16 +12,22 @@ target_link_libraries( target_include_directories( dnode PUBLIC "${CMAKE_SOURCE_DIR}/include/dnode/mgmt" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/dnode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qnode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/bnode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/snode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/vnode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/mnode/inc" - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/container/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/dm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/qm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/bm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/sm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/vm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/mm/inc" + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/main/inc" ) -add_subdirectory(main) +aux_source_directory(main/exe EXEC_SRC) +add_executable(taosd ${EXEC_SRC}) +target_include_directories( + taosd + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/main/inc" +) +target_link_libraries(taosd dnode) if(${BUILD_TEST}) add_subdirectory(test) diff --git a/source/dnode/mgmt/bnode/inc/bm.h b/source/dnode/mgmt/bm/inc/bm.h similarity index 100% rename from source/dnode/mgmt/bnode/inc/bm.h rename to source/dnode/mgmt/bm/inc/bm.h diff --git a/source/dnode/mgmt/bnode/inc/bmInt.h b/source/dnode/mgmt/bm/inc/bmInt.h similarity index 100% rename from source/dnode/mgmt/bnode/inc/bmInt.h rename to source/dnode/mgmt/bm/inc/bmInt.h diff --git a/source/dnode/mgmt/bnode/src/bmInt.c b/source/dnode/mgmt/bm/src/bmInt.c similarity index 100% rename from source/dnode/mgmt/bnode/src/bmInt.c rename to source/dnode/mgmt/bm/src/bmInt.c diff --git a/source/dnode/mgmt/bnode/src/bmMsg.c b/source/dnode/mgmt/bm/src/bmMsg.c similarity index 100% rename from source/dnode/mgmt/bnode/src/bmMsg.c rename to source/dnode/mgmt/bm/src/bmMsg.c diff --git a/source/dnode/mgmt/bnode/src/bmWorker.c b/source/dnode/mgmt/bm/src/bmWorker.c similarity index 100% rename from source/dnode/mgmt/bnode/src/bmWorker.c rename to source/dnode/mgmt/bm/src/bmWorker.c diff --git a/source/dnode/mgmt/dnode/inc/dm.h b/source/dnode/mgmt/dm/inc/dm.h similarity index 100% rename from source/dnode/mgmt/dnode/inc/dm.h rename to source/dnode/mgmt/dm/inc/dm.h diff --git a/source/dnode/mgmt/dnode/inc/dmInt.h b/source/dnode/mgmt/dm/inc/dmInt.h similarity index 100% rename from source/dnode/mgmt/dnode/inc/dmInt.h rename to source/dnode/mgmt/dm/inc/dmInt.h diff --git a/source/dnode/mgmt/dnode/src/dmFile.c b/source/dnode/mgmt/dm/src/dmFile.c similarity index 100% rename from source/dnode/mgmt/dnode/src/dmFile.c rename to source/dnode/mgmt/dm/src/dmFile.c diff --git a/source/dnode/mgmt/dnode/src/dmInt.c b/source/dnode/mgmt/dm/src/dmInt.c similarity index 100% rename from source/dnode/mgmt/dnode/src/dmInt.c rename to source/dnode/mgmt/dm/src/dmInt.c diff --git a/source/dnode/mgmt/dnode/src/dmMsg.c b/source/dnode/mgmt/dm/src/dmMsg.c similarity index 100% rename from source/dnode/mgmt/dnode/src/dmMsg.c rename to source/dnode/mgmt/dm/src/dmMsg.c diff --git a/source/dnode/mgmt/dnode/src/dmWorker.c b/source/dnode/mgmt/dm/src/dmWorker.c similarity index 100% rename from source/dnode/mgmt/dnode/src/dmWorker.c rename to source/dnode/mgmt/dm/src/dmWorker.c diff --git a/source/dnode/mgmt/main/CMakeLists.txt b/source/dnode/mgmt/main/CMakeLists.txt deleted file mode 100644 index baa486b91f..0000000000 --- a/source/dnode/mgmt/main/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -aux_source_directory(src EXEC_SRC) -add_executable(taosd ${EXEC_SRC}) - -target_include_directories( - taosd - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/inc" -) - -target_link_libraries(taosd dnode) diff --git a/source/dnode/mgmt/main/src/dndMain.c b/source/dnode/mgmt/main/exe/dndMain.c similarity index 64% rename from source/dnode/mgmt/main/src/dndMain.c rename to source/dnode/mgmt/main/exe/dndMain.c index 3aff3446da..53e27d187d 100644 --- a/source/dnode/mgmt/main/src/dndMain.c +++ b/source/dnode/mgmt/main/exe/dndMain.c @@ -14,7 +14,8 @@ */ #define _DEFAULT_SOURCE -#include "dndMain.h" +#include "dnd.h" +#include "tconfig.h" static struct { bool dumpConfig; @@ -42,7 +43,7 @@ static void dndSetSignalHandle() { taosSetSignal(SIGBREAK, dndSigintHandle); } -static int32_t dndParseOption(int32_t argc, char const *argv[]) { +static int32_t dndParseArgs(int32_t argc, char const *argv[]) { for (int32_t i = 1; i < argc; ++i) { if (strcmp(argv[i], "-c") == 0) { if (i < argc - 1) { @@ -55,10 +56,14 @@ static int32_t dndParseOption(int32_t argc, char const *argv[]) { printf("'-c' requires a parameter, default is %s\n", configDir); return -1; } - } else if (strcmp(argv[i], "-C") == 0) { - global.dumpConfig = true; + } else if (strcmp(argv[i], "-a") == 0) { + tstrncpy(global.apolloUrl, argv[++i], PATH_MAX); + } else if (strcmp(argv[i], "-e") == 0) { + tstrncpy(global.envFile, argv[++i], PATH_MAX); } else if (strcmp(argv[i], "-k") == 0) { global.generateGrant = true; + } else if (strcmp(argv[i], "-C") == 0) { + global.dumpConfig = true; } else if (strcmp(argv[i], "-V") == 0) { global.printVersion = true; } else { @@ -68,9 +73,45 @@ static int32_t dndParseOption(int32_t argc, char const *argv[]) { return 0; } +static void dndGenerateGrant() { + // grantParseParameter(); +} + +static void dndPrintVersion() { +#ifdef TD_ENTERPRISE + char *releaseName = "enterprise"; +#else + char *releaseName = "community"; +#endif + printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version); + printf("gitinfo: %s\n", gitinfo); + printf("buildInfo: %s\n", buildinfo); +} + +static void dndDumpCfg() { + SConfig *pCfg = taosGetCfg(); + cfgDumpCfg(pCfg, 0, 1); +} + +SDnodeOpt dndGetOpt() { + SConfig *pCfg = taosGetCfg(); + SDnodeOpt option = {0}; + + option.numOfSupportVnodes = cfgGetItem(pCfg, "supportVnodes")->i32; + tstrncpy(option.dataDir, tsDataDir, sizeof(option.dataDir)); + tstrncpy(option.firstEp, tsFirst, sizeof(option.firstEp)); + tstrncpy(option.secondEp, tsSecond, sizeof(option.firstEp)); + option.serverPort = tsServerPort; + tstrncpy(option.localFqdn, tsLocalFqdn, sizeof(option.localFqdn)); + snprintf(option.localEp, sizeof(option.localEp), "%s:%u", option.localFqdn, option.serverPort); + option.pDisks = tsDiskCfg; + option.numOfDisks = tsDiskCfgNum; + return option; +} + static int32_t dndRunDnode() { if (dndInit() != 0) { - dInfo("failed to initialize dnode environment since %s", terrstr()); + dError("failed to initialize environment since %s", terrstr()); return -1; } @@ -99,11 +140,12 @@ static int32_t dndRunDnode() { int main(int argc, char const *argv[]) { if (!taosCheckSystemIsSmallEnd()) { - dError("failed to start TDengine since on non-small-end machines"); + printf("failed to start since on non-small-end machines\n"); return -1; } - if (dndParseOption(argc, argv) != 0) { + if (dndParseArgs(argc, argv) != 0) { + printf("failed to start since parse args error\n"); return -1; } @@ -118,12 +160,12 @@ int main(int argc, char const *argv[]) { } if (taosCreateLog("taosdlog", 1, configDir, global.envFile, global.apolloUrl, NULL, 0) != 0) { - dError("failed to start TDengine since read log config error"); + printf("failed to start since read log config error\n"); return -1; } if (taosInitCfg(configDir, global.envFile, global.apolloUrl, NULL, 0) != 0) { - dError("failed to start TDengine since read config error"); + dError("failed to start since read config error"); return -1; } diff --git a/source/dnode/mgmt/container/inc/dnd.h b/source/dnode/mgmt/main/inc/dnd.h similarity index 100% rename from source/dnode/mgmt/container/inc/dnd.h rename to source/dnode/mgmt/main/inc/dnd.h diff --git a/source/dnode/mgmt/container/inc/dndInt.h b/source/dnode/mgmt/main/inc/dndInt.h similarity index 100% rename from source/dnode/mgmt/container/inc/dndInt.h rename to source/dnode/mgmt/main/inc/dndInt.h diff --git a/source/dnode/mgmt/main/inc/dndMain.h b/source/dnode/mgmt/main/inc/dndMain.h deleted file mode 100644 index 1958d628a0..0000000000 --- a/source/dnode/mgmt/main/inc/dndMain.h +++ /dev/null @@ -1,48 +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 _TD_DND_MAIN_H_ -#define _TD_DND_MAIN_H_ - -#include "dnode.h" - -#include "taoserror.h" -#include "tconfig.h" -#include "tglobal.h" -#include "tlog.h" -#include "version.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define dFatal(...) { if (dDebugFlag & DEBUG_FATAL) { taosPrintLog("DND FATAL ", DEBUG_FATAL, 255, __VA_ARGS__); }} -#define dError(...) { if (dDebugFlag & DEBUG_ERROR) { taosPrintLog("DND ERROR ", DEBUG_ERROR, 255, __VA_ARGS__); }} -#define dWarn(...) { if (dDebugFlag & DEBUG_WARN) { taosPrintLog("DND WARN ", DEBUG_WARN, 255, __VA_ARGS__); }} -#define dInfo(...) { if (dDebugFlag & DEBUG_INFO) { taosPrintLog("DND ", DEBUG_INFO, 255, __VA_ARGS__); }} -#define dDebug(...) { if (dDebugFlag & DEBUG_DEBUG) { taosPrintLog("DND ", DEBUG_DEBUG, dDebugFlag, __VA_ARGS__); }} -#define dTrace(...) { if (dDebugFlag & DEBUG_TRACE) { taosPrintLog("DND ", DEBUG_TRACE, dDebugFlag, __VA_ARGS__); }} - -void dndDumpCfg(); -void dndPrintVersion(); -void dndGenerateGrant(); -SDnodeOpt dndGetOpt(); - -#ifdef __cplusplus -} -#endif - -#endif /*_TD_DND_MAIN_H_*/ diff --git a/source/dnode/mgmt/container/src/dndExec.c b/source/dnode/mgmt/main/src/dndExec.c similarity index 100% rename from source/dnode/mgmt/container/src/dndExec.c rename to source/dnode/mgmt/main/src/dndExec.c diff --git a/source/dnode/mgmt/container/src/dndFile.c b/source/dnode/mgmt/main/src/dndFile.c similarity index 100% rename from source/dnode/mgmt/container/src/dndFile.c rename to source/dnode/mgmt/main/src/dndFile.c diff --git a/source/dnode/mgmt/container/src/dndInt.c b/source/dnode/mgmt/main/src/dndInt.c similarity index 100% rename from source/dnode/mgmt/container/src/dndInt.c rename to source/dnode/mgmt/main/src/dndInt.c diff --git a/source/dnode/mgmt/container/src/dndMonitor.c b/source/dnode/mgmt/main/src/dndMonitor.c similarity index 100% rename from source/dnode/mgmt/container/src/dndMonitor.c rename to source/dnode/mgmt/main/src/dndMonitor.c diff --git a/source/dnode/mgmt/container/src/dndMsg.c b/source/dnode/mgmt/main/src/dndMsg.c similarity index 100% rename from source/dnode/mgmt/container/src/dndMsg.c rename to source/dnode/mgmt/main/src/dndMsg.c diff --git a/source/dnode/mgmt/container/src/dndObj.c b/source/dnode/mgmt/main/src/dndObj.c similarity index 100% rename from source/dnode/mgmt/container/src/dndObj.c rename to source/dnode/mgmt/main/src/dndObj.c diff --git a/source/dnode/mgmt/container/src/dndTransport.c b/source/dnode/mgmt/main/src/dndTransport.c similarity index 100% rename from source/dnode/mgmt/container/src/dndTransport.c rename to source/dnode/mgmt/main/src/dndTransport.c diff --git a/source/dnode/mgmt/main/src/dndUtil.c b/source/dnode/mgmt/main/src/dndUtil.c deleted file mode 100644 index e07ef68c77..0000000000 --- a/source/dnode/mgmt/main/src/dndUtil.c +++ /dev/null @@ -1,55 +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 . - */ - -#define _DEFAULT_SOURCE -#include "dndMain.h" - -void dndGenerateGrant() { -#if 0 - grantParseParameter(); -#endif -} - -void dndPrintVersion() { -#ifdef TD_ENTERPRISE - char *releaseName = "enterprise"; -#else - char *releaseName = "community"; -#endif - printf("%s version: %s compatible_version: %s\n", releaseName, version, compatible_version); - printf("gitinfo: %s\n", gitinfo); - printf("builuInfo: %s\n", buildinfo); -} - -void dndDumpCfg() { - SConfig *pCfg = taosGetCfg(); - cfgDumpCfg(pCfg, 0, 1); -} - -SDnodeOpt dndGetOpt() { - SConfig *pCfg = taosGetCfg(); - SDnodeOpt option = {0}; - - option.numOfSupportVnodes = cfgGetItem(pCfg, "supportVnodes")->i32; - tstrncpy(option.dataDir, tsDataDir, sizeof(option.dataDir)); - tstrncpy(option.firstEp, tsFirst, sizeof(option.firstEp)); - tstrncpy(option.secondEp, tsSecond, sizeof(option.firstEp)); - option.serverPort = tsServerPort; - tstrncpy(option.localFqdn, tsLocalFqdn, sizeof(option.localFqdn)); - snprintf(option.localEp, sizeof(option.localEp), "%s:%u", option.localFqdn, option.serverPort); - option.pDisks = tsDiskCfg; - option.numOfDisks = tsDiskCfgNum; - return option; -} diff --git a/source/dnode/mgmt/mnode/inc/mm.h b/source/dnode/mgmt/mm/inc/mm.h similarity index 100% rename from source/dnode/mgmt/mnode/inc/mm.h rename to source/dnode/mgmt/mm/inc/mm.h diff --git a/source/dnode/mgmt/mnode/inc/mmInt.h b/source/dnode/mgmt/mm/inc/mmInt.h similarity index 100% rename from source/dnode/mgmt/mnode/inc/mmInt.h rename to source/dnode/mgmt/mm/inc/mmInt.h diff --git a/source/dnode/mgmt/mnode/src/mmFile.c b/source/dnode/mgmt/mm/src/mmFile.c similarity index 100% rename from source/dnode/mgmt/mnode/src/mmFile.c rename to source/dnode/mgmt/mm/src/mmFile.c diff --git a/source/dnode/mgmt/mnode/src/mmInt.c b/source/dnode/mgmt/mm/src/mmInt.c similarity index 100% rename from source/dnode/mgmt/mnode/src/mmInt.c rename to source/dnode/mgmt/mm/src/mmInt.c diff --git a/source/dnode/mgmt/mnode/src/mmMsg.c b/source/dnode/mgmt/mm/src/mmMsg.c similarity index 100% rename from source/dnode/mgmt/mnode/src/mmMsg.c rename to source/dnode/mgmt/mm/src/mmMsg.c diff --git a/source/dnode/mgmt/mnode/src/mmWorker.c b/source/dnode/mgmt/mm/src/mmWorker.c similarity index 100% rename from source/dnode/mgmt/mnode/src/mmWorker.c rename to source/dnode/mgmt/mm/src/mmWorker.c diff --git a/source/dnode/mgmt/qnode/inc/qm.h b/source/dnode/mgmt/qm/inc/qm.h similarity index 100% rename from source/dnode/mgmt/qnode/inc/qm.h rename to source/dnode/mgmt/qm/inc/qm.h diff --git a/source/dnode/mgmt/qnode/inc/qmInt.h b/source/dnode/mgmt/qm/inc/qmInt.h similarity index 100% rename from source/dnode/mgmt/qnode/inc/qmInt.h rename to source/dnode/mgmt/qm/inc/qmInt.h diff --git a/source/dnode/mgmt/qnode/src/qmInt.c b/source/dnode/mgmt/qm/src/qmInt.c similarity index 100% rename from source/dnode/mgmt/qnode/src/qmInt.c rename to source/dnode/mgmt/qm/src/qmInt.c diff --git a/source/dnode/mgmt/qnode/src/qmMsg.c b/source/dnode/mgmt/qm/src/qmMsg.c similarity index 100% rename from source/dnode/mgmt/qnode/src/qmMsg.c rename to source/dnode/mgmt/qm/src/qmMsg.c diff --git a/source/dnode/mgmt/qnode/src/qmWorker.c b/source/dnode/mgmt/qm/src/qmWorker.c similarity index 100% rename from source/dnode/mgmt/qnode/src/qmWorker.c rename to source/dnode/mgmt/qm/src/qmWorker.c diff --git a/source/dnode/mgmt/snode/inc/sm.h b/source/dnode/mgmt/sm/inc/sm.h similarity index 100% rename from source/dnode/mgmt/snode/inc/sm.h rename to source/dnode/mgmt/sm/inc/sm.h diff --git a/source/dnode/mgmt/snode/inc/smInt.h b/source/dnode/mgmt/sm/inc/smInt.h similarity index 100% rename from source/dnode/mgmt/snode/inc/smInt.h rename to source/dnode/mgmt/sm/inc/smInt.h diff --git a/source/dnode/mgmt/snode/src/smInt.c b/source/dnode/mgmt/sm/src/smInt.c similarity index 100% rename from source/dnode/mgmt/snode/src/smInt.c rename to source/dnode/mgmt/sm/src/smInt.c diff --git a/source/dnode/mgmt/snode/src/smMsg.c b/source/dnode/mgmt/sm/src/smMsg.c similarity index 100% rename from source/dnode/mgmt/snode/src/smMsg.c rename to source/dnode/mgmt/sm/src/smMsg.c diff --git a/source/dnode/mgmt/snode/src/smWorker.c b/source/dnode/mgmt/sm/src/smWorker.c similarity index 100% rename from source/dnode/mgmt/snode/src/smWorker.c rename to source/dnode/mgmt/sm/src/smWorker.c diff --git a/source/dnode/mgmt/vnode/inc/vm.h b/source/dnode/mgmt/vm/inc/vm.h similarity index 100% rename from source/dnode/mgmt/vnode/inc/vm.h rename to source/dnode/mgmt/vm/inc/vm.h diff --git a/source/dnode/mgmt/vnode/inc/vmInt.h b/source/dnode/mgmt/vm/inc/vmInt.h similarity index 100% rename from source/dnode/mgmt/vnode/inc/vmInt.h rename to source/dnode/mgmt/vm/inc/vmInt.h diff --git a/source/dnode/mgmt/vnode/src/vmFile.c b/source/dnode/mgmt/vm/src/vmFile.c similarity index 100% rename from source/dnode/mgmt/vnode/src/vmFile.c rename to source/dnode/mgmt/vm/src/vmFile.c diff --git a/source/dnode/mgmt/vnode/src/vmInt.c b/source/dnode/mgmt/vm/src/vmInt.c similarity index 100% rename from source/dnode/mgmt/vnode/src/vmInt.c rename to source/dnode/mgmt/vm/src/vmInt.c diff --git a/source/dnode/mgmt/vnode/src/vmMsg.c b/source/dnode/mgmt/vm/src/vmMsg.c similarity index 100% rename from source/dnode/mgmt/vnode/src/vmMsg.c rename to source/dnode/mgmt/vm/src/vmMsg.c diff --git a/source/dnode/mgmt/vnode/src/vmWorker.c b/source/dnode/mgmt/vm/src/vmWorker.c similarity index 100% rename from source/dnode/mgmt/vnode/src/vmWorker.c rename to source/dnode/mgmt/vm/src/vmWorker.c diff --git a/tests/script/sh/exec.sh b/tests/script/sh/exec.sh index 8d7dba2de2..1a9a6a2c52 100755 --- a/tests/script/sh/exec.sh +++ b/tests/script/sh/exec.sh @@ -74,7 +74,7 @@ BUILD_DIR=$TAOS_DIR/$BIN_DIR SIM_DIR=$TAOS_DIR/sim NODE_DIR=$SIM_DIR/$NODE_NAME -EXE_DIR=$BUILD_DIR/source/dnode/mgmt/main +EXE_DIR=$BUILD_DIR/source/dnode/mgmt CFG_DIR=$NODE_DIR/cfg LOG_DIR=$NODE_DIR/log DATA_DIR=$NODE_DIR/data