From 80a01235f2b33b0e39c33b7cc1af5612cc742d37 Mon Sep 17 00:00:00 2001 From: afwerar <1296468573@qq.com> Date: Thu, 11 Aug 2022 14:37:43 +0800 Subject: [PATCH] doc: change 3.0 doc --- README-CN.md | 14 +------------ README.md | 16 ++------------- cmake/cmake.install | 4 +++- .../03-connector/03-connector.mdx | 1 - .../14-reference/09-support-platform/index.md | 20 +++++++++---------- .../03-connector/03-connector.mdx | 1 - .../14-reference/09-support-platform/index.md | 20 +++++++++---------- packaging/tools/install.sh | 19 ++++++++++++------ source/dnode/mgmt/node_mgmt/src/dmEnv.c | 14 +++++++++++++ tools/shell/src/shellArguments.c | 6 +++--- tools/shell/src/shellEngine.c | 2 +- 11 files changed, 57 insertions(+), 60 deletions(-) diff --git a/README-CN.md b/README-CN.md index b2ae777837..d3f9b47a0f 100644 --- a/README-CN.md +++ b/README-CN.md @@ -188,7 +188,7 @@ apt install autoconf cmake .. -DJEMALLOC_ENABLED=true ``` -在 X86-64、X86、arm64、arm32 和 mips64 平台上,TDengine 生成脚本可以自动检测机器架构。也可以手动配置 CPUTYPE 参数来指定 CPU 类型,如 aarch64 或 aarch32 等。 +在 X86-64、X86、arm64 平台上,TDengine 生成脚本可以自动检测机器架构。也可以手动配置 CPUTYPE 参数来指定 CPU 类型,如 aarch64 等。 aarch64: @@ -196,18 +196,6 @@ aarch64: cmake .. -DCPUTYPE=aarch64 && cmake --build . ``` -aarch32: - -```bash -cmake .. -DCPUTYPE=aarch32 && cmake --build . -``` - -mips64: - -```bash -cmake .. -DCPUTYPE=mips64 && cmake --build . -``` - ### Windows 系统 如果你使用的是 Visual Studio 2013 版本: diff --git a/README.md b/README.md index 2f38120b34..3ea8a571ef 100644 --- a/README.md +++ b/README.md @@ -205,8 +205,8 @@ apt install autoconf cmake .. -DJEMALLOC_ENABLED=true ``` -TDengine build script can detect the host machine's architecture on X86-64, X86, arm64, arm32 and mips64 platform. -You can also specify CPUTYPE option like aarch64 or aarch32 too if the detection result is not correct: +TDengine build script can detect the host machine's architecture on X86-64, X86, arm64 platform. +You can also specify CPUTYPE option like aarch64 too if the detection result is not correct: aarch64: @@ -214,18 +214,6 @@ aarch64: cmake .. -DCPUTYPE=aarch64 && cmake --build . ``` -aarch32: - -```bash -cmake .. -DCPUTYPE=aarch32 && cmake --build . -``` - -mips64: - -```bash -cmake .. -DCPUTYPE=mips64 && cmake --build . -``` - ### On Windows platform If you use the Visual Studio 2013, please open a command window by executing "cmd.exe". diff --git a/cmake/cmake.install b/cmake/cmake.install index 4b1ccbf6d5..07773d1015 100644 --- a/cmake/cmake.install +++ b/cmake/cmake.install @@ -22,7 +22,9 @@ ELSEIF (TD_WINDOWS) INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taos.exe DESTINATION .) INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosd.exe DESTINATION .) INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/udfd.exe DESTINATION .) - INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosBenchmark.exe DESTINATION .) + IF (BUILD_TOOLS) + INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/taosBenchmark.exe DESTINATION .) + ENDIF () IF (TD_MVN_INSTALLED) INSTALL(FILES ${LIBRARY_OUTPUT_PATH}/taos-jdbcdriver-2.0.38-dist.jar DESTINATION connector/jdbc) diff --git a/docs/en/14-reference/03-connector/03-connector.mdx b/docs/en/14-reference/03-connector/03-connector.mdx index 4468557900..baec6abe38 100644 --- a/docs/en/14-reference/03-connector/03-connector.mdx +++ b/docs/en/14-reference/03-connector/03-connector.mdx @@ -17,7 +17,6 @@ Currently, TDengine's native interface connectors can support platforms such as | **X86 64bit** | **Win32** | ● | ● | ● | ● | ○ | ○ | ● | | **X86 32bit** | **Win32** | ○ | ○ | ○ | ○ | ○ | ○ | ● | | **ARM64** | **Linux** | ● | ● | ● | ● | ○ | ○ | ● | -| **ARM32** | **Linux** | ● | ● | ● | ● | ○ | ○ | ● | | **MIPS** | **Linux** | ○ | ○ | ○ | ○ | ○ | ○ | ○ | Where ● means the official test verification passed, ○ means the unofficial test verification passed, -- means no assurance. diff --git a/docs/en/14-reference/09-support-platform/index.md b/docs/en/14-reference/09-support-platform/index.md index 656344eff4..ee2479e817 100644 --- a/docs/en/14-reference/09-support-platform/index.md +++ b/docs/en/14-reference/09-support-platform/index.md @@ -19,15 +19,15 @@ TDengine's connector can support a wide range of platforms, including X64/X86/AR The comparison matrix is as follows. -| **CPU** | **X64 64bit** | | | **X86 32bit** | **ARM64** | **ARM32** | **MIPS** | **Alpha** | -| ----------- | ------------- | --------- | --------- | ------------- | --------- | --------- | --------- | --------- | -| **OS** | **Linux** | **Win64** | **Win32** | **Win32** | **Linux** | **Linux** | **Linux** | **Linux** | -| **C/C++** | ● | ● | ● | ○ | ● | ● | ● | ● | -| **JDBC** | ● | ● | ● | ○ | ● | ● | ● | ● | -| **Python** | ● | ● | ● | ○ | ● | ● | ● | -- | -| **Go** | ● | ● | ● | ○ | ● | ● | ○ | -- | -| **NodeJs** | ● | ● | ○ | ○ | ● | ● | ○ | -- | -| **C#** | ● | ● | ○ | ○ | ○ | ○ | ○ | -- | -| **RESTful** | ● | ● | ● | ● | ● | ● | ● | ● | +| **CPU** | **X64 64bit** | | | **X86 32bit** | **ARM64** | **MIPS** | **Alpha** | +| ----------- | ------------- | --------- | --------- | ------------- | --------- | --------- | --------- | +| **OS** | **Linux** | **Win64** | **Win32** | **Win32** | **Linux** | **Linux** | **Linux** | +| **C/C++** | ● | ● | ● | ○ | ● | ● | ● | +| **JDBC** | ● | ● | ● | ○ | ● | ● | ● | +| **Python** | ● | ● | ● | ○ | ● | ● | -- | +| **Go** | ● | ● | ● | ○ | ● | ○ | -- | +| **NodeJs** | ● | ● | ○ | ○ | ● | ○ | -- | +| **C#** | ● | ● | ○ | ○ | ○ | ○ | -- | +| **RESTful** | ● | ● | ● | ● | ● | ● | ● | Note: ● means the official test is verified, ○ means the unofficial test is verified, -- means not verified. diff --git a/docs/zh/14-reference/03-connector/03-connector.mdx b/docs/zh/14-reference/03-connector/03-connector.mdx index 00b76af867..d681903aed 100644 --- a/docs/zh/14-reference/03-connector/03-connector.mdx +++ b/docs/zh/14-reference/03-connector/03-connector.mdx @@ -17,7 +17,6 @@ TDengine 提供了丰富的应用程序开发接口,为了便于用户快速 | **X86 64bit** | **Win32** | ● | ● | ● | ● | ○ | ○ | ● | | **X86 32bit** | **Win32** | ○ | ○ | ○ | ○ | ○ | ○ | ● | | **ARM64** | **Linux** | ● | ● | ● | ● | ○ | ○ | ● | -| **ARM32** | **Linux** | ○ | ○ | ○ | ○ | ○ | ○ | ● | | **MIPS 龙芯** | **Linux** | ○ | ○ | ○ | ○ | ○ | ○ | ○ | | **Alpha 申威** | **Linux** | ○ | ○ | -- | -- | -- | -- | ○ | | **X86 海光** | **Linux** | ○ | ○ | ○ | -- | -- | -- | ○ | diff --git a/docs/zh/14-reference/09-support-platform/index.md b/docs/zh/14-reference/09-support-platform/index.md index e676ab845a..02a3dbdd15 100644 --- a/docs/zh/14-reference/09-support-platform/index.md +++ b/docs/zh/14-reference/09-support-platform/index.md @@ -19,15 +19,15 @@ description: "TDengine 服务端、客户端和连接器支持的平台列表" 对照矩阵如下: -| **CPU** | **X64 64bit** | | | **X86 32bit** | **ARM64** | **ARM32** | **MIPS 龙芯** | **Alpha 申威** | **X64 海光** | -| ----------- | ------------- | --------- | --------- | ------------- | --------- | --------- | ------------- | -------------- | ------------ | -| **OS** | **Linux** | **Win64** | **Win32** | **Win32** | **Linux** | **Linux** | **Linux** | **Linux** | **Linux** | -| **C/C++** | ● | ● | ● | ○ | ● | ● | ● | ● | ● | -| **JDBC** | ● | ● | ● | ○ | ● | ● | ● | ● | ● | -| **Python** | ● | ● | ● | ○ | ● | ● | ● | -- | ● | -| **Go** | ● | ● | ● | ○ | ● | ● | ○ | -- | -- | -| **NodeJs** | ● | ● | ○ | ○ | ● | ● | ○ | -- | -- | -| **C#** | ● | ● | ○ | ○ | ○ | ○ | ○ | -- | -- | -| **RESTful** | ● | ● | ● | ● | ● | ● | ● | ● | ● | +| **CPU** | **X64 64bit** | | | **X86 32bit** | **ARM64** | **MIPS 龙芯** | **Alpha 申威** | **X64 海光** | +| ----------- | ------------- | --------- | --------- | ------------- | --------- | ------------- | -------------- | ------------ | +| **OS** | **Linux** | **Win64** | **Win32** | **Win32** | **Linux** | **Linux** | **Linux** | **Linux** | +| **C/C++** | ● | ● | ● | ○ | ● | ● | ● | ● | +| **JDBC** | ● | ● | ● | ○ | ● | ● | ● | ● | +| **Python** | ● | ● | ● | ○ | ● | ● | -- | ● | +| **Go** | ● | ● | ● | ○ | ● | ○ | -- | -- | +| **NodeJs** | ● | ● | ○ | ○ | ● | ○ | -- | -- | +| **C#** | ● | ● | ○ | ○ | ○ | ○ | -- | -- | +| **RESTful** | ● | ● | ● | ● | ● | ● | ● | ● | 注:● 表示官方测试验证通过,○ 表示非官方测试验证通过,-- 表示未经验证。 diff --git a/packaging/tools/install.sh b/packaging/tools/install.sh index beb0718987..eda2b052d1 100755 --- a/packaging/tools/install.sh +++ b/packaging/tools/install.sh @@ -194,6 +194,9 @@ function install_bin() { ${csudo}rm -f ${bin_link_dir}/${serverName} || : ${csudo}rm -f ${bin_link_dir}/${adapterName} || : ${csudo}rm -f ${bin_link_dir}/${uninstallScript} || : + ${csudo}rm -f ${bin_link_dir}/${demoName} || : + ${csudo}rm -f ${bin_link_dir}/${benchmarkName} || : + ${csudo}rm -f ${bin_link_dir}/${dumpName} || : ${csudo}rm -f ${bin_link_dir}/set_core || : ${csudo}rm -f ${bin_link_dir}/TDinsight.sh || : @@ -205,7 +208,6 @@ function install_bin() { [ -x ${install_main_dir}/bin/${adapterName} ] && ${csudo}ln -s ${install_main_dir}/bin/${adapterName} ${bin_link_dir}/${adapterName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${demoName} || : [ -x ${install_main_dir}/bin/${benchmarkName} ] && ${csudo}ln -s ${install_main_dir}/bin/${benchmarkName} ${bin_link_dir}/${benchmarkName} || : - [ -x ${install_main_dir}/bin/${tmqName} ] && ${csudo}ln -s ${install_main_dir}/bin/${tmqName} ${bin_link_dir}/${tmqName} || : [ -x ${install_main_dir}/bin/${dumpName} ] && ${csudo}ln -s ${install_main_dir}/bin/${dumpName} ${bin_link_dir}/${dumpName} || : [ -x ${install_main_dir}/bin/TDinsight.sh ] && ${csudo}ln -s ${install_main_dir}/bin/TDinsight.sh ${bin_link_dir}/TDinsight.sh || : [ -x ${install_main_dir}/bin/remove.sh ] && ${csudo}ln -s ${install_main_dir}/bin/remove.sh ${bin_link_dir}/${uninstallScript} || : @@ -964,12 +966,17 @@ function installProduct() { ## ==============================Main program starts from here============================ serverFqdn=$(hostname) if [ "$verType" == "server" ]; then - # Install server and client - if [ -x ${bin_dir}/${serverName} ]; then - update_flag=1 - updateProduct + # Check default 2.x data file. + if [ -x ${data_dir}/dnode/dnodeCfg.json ]; then + echo -e "\033[44;31;5mThe default data directory ${data_dir} contains old data of tdengine 2.x, please clear it before installing!\033[0m" else - installProduct + # Install server and client + if [ -x ${bin_dir}/${serverName} ]; then + update_flag=1 + updateProduct + else + installProduct + fi fi elif [ "$verType" == "client" ]; then interactiveFqdn=no diff --git a/source/dnode/mgmt/node_mgmt/src/dmEnv.c b/source/dnode/mgmt/node_mgmt/src/dmEnv.c index 5d72ce3b18..81da38076d 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmEnv.c +++ b/source/dnode/mgmt/node_mgmt/src/dmEnv.c @@ -53,14 +53,27 @@ static bool dmCheckDiskSpace() { osUpdate(); if (!osDataSpaceAvailable()) { dError("free disk size: %f GB, too little, require %f GB at least at least , quit", (double)tsDataSpace.size.avail / 1024.0 / 1024.0 / 1024.0, (double)tsDataSpace.reserved / 1024.0 / 1024.0 / 1024.0); + terrno = TSDB_CODE_NO_AVAIL_DISK; return false; } if (!osLogSpaceAvailable()) { dError("free disk size: %f GB, too little, require %f GB at least at least, quit", (double)tsLogSpace.size.avail / 1024.0 / 1024.0 / 1024.0, (double)tsLogSpace.reserved / 1024.0 / 1024.0 / 1024.0); + terrno = TSDB_CODE_NO_AVAIL_DISK; return false; } if (!osTempSpaceAvailable()) { dError("free disk size: %f GB, too little, require %f GB at least at least, quit", (double)tsTempSpace.size.avail / 1024.0 / 1024.0 / 1024.0, (double)tsTempSpace.reserved / 1024.0 / 1024.0 / 1024.0); + terrno = TSDB_CODE_NO_AVAIL_DISK; + return false; + } + return true; +} + +static bool dmCheckDataDirVersion() { + char checkDataDirJsonFileName[PATH_MAX]; + snprintf(checkDataDirJsonFileName, PATH_MAX, "%s/dnode/dnodeCfg.json", tsDataDir); + if (taosCheckExistFile(checkDataDirJsonFileName)) { + dError("The default data directory %s contains old data of tdengine 2.x, please clear it before running!", tsDataDir); return false; } return true; @@ -68,6 +81,7 @@ static bool dmCheckDiskSpace() { int32_t dmInit(int8_t rtype) { dInfo("start to init dnode env"); + if (!dmCheckDataDirVersion()) return -1; if (!dmCheckDiskSpace()) return -1; if (dmCheckRepeatInit(dmInstance()) != 0) return -1; if (dmInitSystem() != 0) return -1; diff --git a/tools/shell/src/shellArguments.c b/tools/shell/src/shellArguments.c index 818cc5425b..93f8b8a23b 100644 --- a/tools/shell/src/shellArguments.c +++ b/tools/shell/src/shellArguments.c @@ -280,7 +280,7 @@ int32_t shellParseArgsWithoutArgp(int argc, char *argv[]) { static void shellInitArgs(int argc, char *argv[]) { for (int i = 1; i < argc; i++) { if (strncmp(argv[i], "-p", 2) == 0) { - // printf(shell.info.clientVersion, tsOsName, taos_get_client_info()); + // printf(shell.info.clientVersion, taos_get_client_info()); if (strlen(argv[i]) == 2) { printf("Enter password: "); taosSetConsoleEcho(false); @@ -389,8 +389,8 @@ static int32_t shellCheckArgs() { int32_t shellParseArgs(int32_t argc, char *argv[]) { shellInitArgs(argc, argv); shell.info.clientVersion = - "Welcome to the TDengine shell from %s, Client Version:%s\r\n" - "Copyright (c) 2022 by TAOS Data, Inc. All rights reserved.\r\n\r\n"; + "Welcome to the TDengine Command Line Interface, Client Version:%s\r\n" + "Copyright (c) 2022 by TDengine, all rights reserved.\r\n\r\n"; shell.info.promptHeader = TAOS_CONSOLE_PROMPT_HEADER; shell.info.promptContinue = TAOS_CONSOLE_PROMPT_CONTINUE; shell.info.promptSize = 6; diff --git a/tools/shell/src/shellEngine.c b/tools/shell/src/shellEngine.c index f0bda82172..724ac8fbfd 100644 --- a/tools/shell/src/shellEngine.c +++ b/tools/shell/src/shellEngine.c @@ -1001,7 +1001,7 @@ void *shellThreadLoop(void *arg) { } int32_t shellExecute() { - printf(shell.info.clientVersion, shell.info.osname, taos_get_client_info()); + printf(shell.info.clientVersion, taos_get_client_info()); fflush(stdout); SShellArgs *pArgs = &shell.args; -- GitLab