Merge branch '3.0' of https://github.com/taosdata/TDengine into refact/tsdb_last
This commit is contained in:
commit
aee90f913f
|
@ -25,7 +25,7 @@ taosKeeper 安装方式:
|
||||||
<!-- taosKeeper 需要在操作系统终端执行,该工具支持两种配置方式:[命令行参数](#命令行参数启动) 和 [配置文件](#配置文件启动)。命令行参数优先级高于配置文件参数。-->
|
<!-- taosKeeper 需要在操作系统终端执行,该工具支持两种配置方式:[命令行参数](#命令行参数启动) 和 [配置文件](#配置文件启动)。命令行参数优先级高于配置文件参数。-->
|
||||||
taosKeeper 需要在操作系统终端执行,该工具支持 [配置文件启动](#配置文件启动)。
|
taosKeeper 需要在操作系统终端执行,该工具支持 [配置文件启动](#配置文件启动)。
|
||||||
|
|
||||||
**在运行 taosKeeper 之前要确保 TDengine 集群与 taosAdapter 已经在正确运行。**
|
**在运行 taosKeeper 之前要确保 TDengine 集群与 taosAdapter 已经在正确运行。** 并且 TDengine 已经开启监控服务,具体请参考:[TDengine 监控配置](../config/#监控相关)。
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
### 命令行参数启动
|
### 命令行参数启动
|
||||||
|
@ -93,7 +93,7 @@ taosKeeper 作为 TDengine 监控指标的导出工具,可以将 TDengine 产
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ taos
|
$ taos
|
||||||
#
|
# 如上示例,使用 log 库作为监控日志存储位置
|
||||||
> use log;
|
> use log;
|
||||||
> select * from cluster_info limit 1;
|
> select * from cluster_info limit 1;
|
||||||
```
|
```
|
|
@ -1,4 +0,0 @@
|
||||||
---
|
|
||||||
sidebar_label: taosX
|
|
||||||
title: 使用 taosX 在集群间复制数据
|
|
||||||
---
|
|
|
@ -193,7 +193,7 @@ docker run -d \
|
||||||
|
|
||||||
如上图所示,在 Query 中选中 `TDengine` 数据源,在下方查询框可输入相应 SQL 进行查询,具体说明如下:
|
如上图所示,在 Query 中选中 `TDengine` 数据源,在下方查询框可输入相应 SQL 进行查询,具体说明如下:
|
||||||
|
|
||||||
- INPUT SQL:输入要查询的语句(该 SQL 语句的结果集应为两列多行),例如:`select avg(mem_system) from log.dn where ts >= $from and ts < $to interval($interval)` ,其中,from、to 和 interval 为 TDengine 插件的内置变量,表示从 Grafana 插件面板获取的查询范围和时间间隔。除了内置变量外,`也支持可以使用自定义模板变量`。
|
- INPUT SQL:输入要查询的语句(该 SQL 语句的结果集应为两列多行),例如:`select _wstart, avg(mem_system) from log.dnodes_info where ts >= $from and ts < $to interval($interval)` ,其中,from、to 和 interval 为 TDengine 插件的内置变量,表示从 Grafana 插件面板获取的查询范围和时间间隔。除了内置变量外,`也支持可以使用自定义模板变量`。
|
||||||
- ALIAS BY:可设置当前查询别名。
|
- ALIAS BY:可设置当前查询别名。
|
||||||
- GENERATE SQL: 点击该按钮会自动替换相应变量,并生成最终执行的语句。
|
- GENERATE SQL: 点击该按钮会自动替换相应变量,并生成最终执行的语句。
|
||||||
|
|
||||||
|
@ -205,7 +205,11 @@ docker run -d \
|
||||||
|
|
||||||
### 导入 Dashboard
|
### 导入 Dashboard
|
||||||
|
|
||||||
在数据源配置页面,您可以为该数据源导入 TDinsight 面板,作为 TDengine 集群的监控可视化工具。该 Dashboard 已发布在 Grafana:[Dashboard 15167 - TDinsight](https://grafana.com/grafana/dashboards/15167)) 。其他安装方式和相关使用说明请见 [TDinsight 用户手册](/reference/tdinsight/)。
|
在数据源配置页面,您可以为该数据源导入 TDinsight 面板,作为 TDengine 集群的监控可视化工具。如果 TDengine 服务端为 3.0 版本请选择 `TDinsight for 3.x` 导入。
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
其中适配 TDengine 2.* 的 Dashboard 已发布在 Grafana:[Dashboard 15167 - TDinsight](https://grafana.com/grafana/dashboards/15167)) 。其他安装方式和相关使用说明请见 [TDinsight 用户手册](/reference/tdinsight/)。
|
||||||
|
|
||||||
使用 TDengine 作为数据源的其他面板,可以[在此搜索](https://grafana.com/grafana/dashboards/?dataSource=tdengine-datasource)。以下是一份不完全列表:
|
使用 TDengine 作为数据源的其他面板,可以[在此搜索](https://grafana.com/grafana/dashboards/?dataSource=tdengine-datasource)。以下是一份不完全列表:
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.3 KiB |
|
@ -180,11 +180,29 @@ int metaDelJsonVarFromIdx(SMeta *pMeta, const SMetaEntry *pCtbEntry, const SSche
|
||||||
}
|
}
|
||||||
|
|
||||||
int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) {
|
int metaCreateSTable(SMeta *pMeta, int64_t version, SVCreateStbReq *pReq) {
|
||||||
SMetaEntry me = {0};
|
SMetaEntry me = {0};
|
||||||
|
int kLen = 0;
|
||||||
|
int vLen = 0;
|
||||||
|
const void *pKey = NULL;
|
||||||
|
const void *pVal = NULL;
|
||||||
|
void *pBuf = NULL;
|
||||||
|
int32_t szBuf = 0;
|
||||||
|
void *p = NULL;
|
||||||
|
|
||||||
// validate req
|
// validate req
|
||||||
if (tdbTbGet(pMeta->pNameIdx, pReq->name, strlen(pReq->name), NULL, NULL) == 0) {
|
void *pData = NULL;
|
||||||
return 0;
|
int nData = 0;
|
||||||
|
if (tdbTbGet(pMeta->pNameIdx, pReq->name, strlen(pReq->name) + 1, &pData, &nData) == 0) {
|
||||||
|
tb_uid_t uid = *(tb_uid_t *)pData;
|
||||||
|
tdbFree(pData);
|
||||||
|
SMetaInfo info;
|
||||||
|
metaGetInfo(pMeta, uid, &info);
|
||||||
|
if (info.uid == info.suid) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
terrno = TSDB_CODE_TDB_TABLE_ALREADY_EXIST;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// set structs
|
// set structs
|
||||||
|
|
|
@ -3,6 +3,21 @@ system sh/deploy.sh -n dnode1 -i 1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
|
print =============== conflict stb
|
||||||
|
sql create database db vgroups 1;
|
||||||
|
sql use db;
|
||||||
|
sql create table stb (ts timestamp, i int) tags (j int);
|
||||||
|
sql_error create table stb using stb tags (1);
|
||||||
|
sql_error create table stb (ts timestamp, i int);
|
||||||
|
|
||||||
|
sql create table ctb (ts timestamp, i int);
|
||||||
|
sql_error create table ctb (ts timestamp, i int) tags (j int);
|
||||||
|
|
||||||
|
sql create table ntb (ts timestamp, i int);
|
||||||
|
sql_error create table ntb (ts timestamp, i int) tags (j int);
|
||||||
|
|
||||||
|
sql drop database db
|
||||||
|
|
||||||
print =============== create database d1
|
print =============== create database d1
|
||||||
sql create database d1
|
sql create database d1
|
||||||
sql use d1
|
sql use d1
|
||||||
|
|
Loading…
Reference in New Issue