提交 4e5be409 编写于 作者: sangshuduo's avatar sangshuduo

Merge branch 'develop' into feat/sangshuduo/TD-14141-update-taostools

...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
## 报告错误 ## 报告错误
* 任何用户都可以通过 **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)** 向我们报告错误。请您对所遇到的问题进行**详细描述**,最好提供重现错误的详细步骤。 - 任何用户都可以通过 **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)** 向我们报告错误。请您对所遇到的问题进行**详细描述**,最好提供重现错误的详细步骤。
* 欢迎提供包含由 Bug 生成的日志文件的附录。 - 欢迎提供包含由 Bug 生成的日志文件的附录。
## 需要强调的代码提交规则 ## 需要强调的代码提交规则
* 在提交代码之前,需要**同意贡献者许可协议(CLA)**。点击 [TaosData CLA](https://www.taosdata.com/en/contributor/) 链接阅读协议。如果您不接受该协议,请停止提交。 - 在提交代码之前,需要**同意贡献者许可协议(CLA)**。点击 [TaosData CLA](https://cla-assistant.io/taosdata/TDengine) 阅读并签署协议。如果您不接受该协议,请停止提交。
* 请在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中解决问题或添加注册功能。 - 请在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中解决问题或添加注册功能。
* 如果在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中没有找到相应的问题或功能,请**创建一个新的 issue** - 如果在 [GitHub issue tracker](https://github.com/taosdata/TDengine/issues) 中没有找到相应的问题或功能,请**创建一个新的 issue**
* 将代码提交到我们的存储库时,请创建**包含问题编号的 PR** - 将代码提交到我们的存储库时,请创建**包含问题编号的 PR**
## 贡献指南 ## 贡献指南
...@@ -21,8 +21,10 @@ ...@@ -21,8 +21,10 @@
2. **主动语态**总体上优于被动语态。主动语态中的句子会突出执行动作的人,而不是被动语态突出动作的接受者。 2. **主动语态**总体上优于被动语态。主动语态中的句子会突出执行动作的人,而不是被动语态突出动作的接受者。
3. 文档写作建议 3. 文档写作建议
* 正确拼写产品名称 “TDengine”。 “TD” 用大写字母,“TD” 和 “engine” 之间没有空格 **(正确拼写:TDengine)**
* 在句号或其他标点符号后只留一个空格。 - 正确拼写产品名称 “TDengine”。 “TD” 用大写字母,“TD” 和 “engine” 之间没有空格 **(正确拼写:TDengine)**
- 在句号或其他标点符号后只留一个空格。
4. 尽量**使用简单句**,而不是复杂句。 4. 尽量**使用简单句**,而不是复杂句。
## 给贡献者的礼品 ## 给贡献者的礼品
...@@ -46,11 +48,11 @@ ...@@ -46,11 +48,11 @@
width="200" width="200"
/> />
TDengine 社区致力于让更多的开发者理解和使用它。 TDengine 社区致力于让更多的开发者理解和使用它。
请填写**贡献者提交表**以选择您想收到的礼物。 请填写**贡献者提交表**以选择您想收到的礼物。
- [贡献者提交表](https://page.ma.scrmtech.com/form/index?pf_uid=27715_2095&id=12100) - [贡献者提交表](https://page.ma.scrmtech.com/form/index?pf_uid=27715_2095&id=12100)
## 联系我们 ## 联系我们
如果您有什么问题需要解决,或者有什么问题需要解答,可以添加微信:TDengineECO 如果您有什么问题需要解决,或者有什么问题需要解答,可以添加微信:TDengineECO
\ No newline at end of file
# Contributing # Contributing
We appreciate contributions from all developers. Feel free to follow us, fork the repository, report bugs, and even submit your code on GitHub. However, we would like developers to follow the guidelines in this document to ensure effective cooperation. We appreciate contributions from all developers. Feel free to follow us, fork the repository, report bugs, and even submit your code on GitHub. However, we would like developers to follow the guidelines in this document to ensure effective cooperation.
## Reporting a bug ## Reporting a bug
* Any users can report bugs to us through the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**. We would appreciate if you could provide **a detailed description** of the problem you encountered, including steps to reproduce it. - Any users can report bugs to us through the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**. We would appreciate if you could provide **a detailed description** of the problem you encountered, including steps to reproduce it.
* Attaching log files caused by the bug is really appreciated.
- Attaching log files caused by the bug is really appreciated.
## Guidelines for committing code ## Guidelines for committing code
* You must agree to the **Contributor License Agreement(CLA) before submitting your code patch**. Follow the **[TAOSData CLA](https://www.taosdata.com/en/contributor/)** link to read through the agreement. If you do not accept the agreement, your contributions cannot be accepted. - You must agree to the **Contributor License Agreement(CLA) before submitting your code patch**. Follow the **[TAOSData CLA](https://cla-assistant.io/taosdata/TDengine)** link to read through and sign the agreement. If you do not accept the agreement, your contributions cannot be accepted.
* Please solve an issue or add a feature registered in the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**.
* If no corresponding issue or feature is found in the issue tracker, please **create one**.
* When submitting your code to our repository, please create a pull request with the **issue number** included.
- Please solve an issue or add a feature registered in the **[GitHub issue tracker](https://github.com/taosdata/TDengine/issues)**.
- If no corresponding issue or feature is found in the issue tracker, please **create one**.
- When submitting your code to our repository, please create a pull request with the **issue number** included.
## Guidelines for communicating ## Guidelines for communicating
1. Please be **nice and polite** in the description. 1. Please be **nice and polite** in the description.
3. **Active voice is better than passive voice in general**. Sentences in the active voice will highlight who is performing the action rather than the recipient of the action highlighted by the passive voice. 2. **Active voice is better than passive voice in general**. Sentences in the active voice will highlight who is performing the action rather than the recipient of the action highlighted by the passive voice.
4. Documentation writing advice 3. Documentation writing advice
* Spell the product name "TDengine" correctly. "TD" is written in capital letters, and there is no space between "TD" and "engine" (**Correct spelling: TDengine**).
* Please **capitalize the first letter** of every sentence. - Spell the product name "TDengine" correctly. "TD" is written in capital letters, and there is no space between "TD" and "engine" (**Correct spelling: TDengine**).
* Leave **only one space** after periods or other punctuation marks. - Please **capitalize the first letter** of every sentence.
* Use **American spelling**. - Leave **only one space** after periods or other punctuation marks.
* When possible, **use second person** rather than first person (e.g.“You are recommended to use a reverse proxy such as Nginx.” rather than “We recommend to use a reverse proxy such as Nginx.”). - Use **American spelling**.
5. Use **simple sentences**, rather than complex sentences. - When possible, **use second person** rather than first person (e.g.“You are recommended to use a reverse proxy such as Nginx.” rather than “We recommend to use a reverse proxy such as Nginx.”).
5. Use **simple sentences**, rather than complex sentences.
## Gifts for the contributors ## Gifts for the contributors
Developers, as long as you contribute to TDengine, whether it's code contributions to fix bugs or feature requests, or documentation changes, **you are eligible for a very special Contributor Souvenir Gift!** Developers, as long as you contribute to TDengine, whether it's code contributions to fix bugs or feature requests, or documentation changes, **you are eligible for a very special Contributor Souvenir Gift!**
**You can choose one of the following gifts:** **You can choose one of the following gifts:**
<p align="left"> <p align="left">
<img <img
src="docs/assets/contributing-cup.jpg" src="docs/assets/contributing-cup.jpg"
...@@ -57,13 +53,11 @@ Developers, as long as you contribute to TDengine, whether it's code contributio ...@@ -57,13 +53,11 @@ Developers, as long as you contribute to TDengine, whether it's code contributio
width="200" width="200"
/> />
The TDengine community is committed to making TDengine accepted and used by more developers.
The TDengine community is committed to making TDengine accepted and used by more developers.
Just fill out the **Contributor Submission Form** to choose your desired gift. Just fill out the **Contributor Submission Form** to choose your desired gift.
- [Contributor Submission Form](https://page.ma.scrmtech.com/form/index?pf_uid=27715_2095&id=12100)
- [Contributor Submission Form](https://page.ma.scrmtech.com/form/index?pf_uid=27715_2095&id=12100)
## Contact us ## Contact us
......
...@@ -67,6 +67,14 @@ Schemaless writes process row data according to the following principles. ...@@ -67,6 +67,14 @@ Schemaless writes process row data according to the following principles.
Note that tag_key1, tag_key2 are not the original order of the tags entered by the user but the result of using the tag names in ascending order of the strings. Therefore, tag_key1 is not the first tag entered in the line protocol. Note that tag_key1, tag_key2 are not the original order of the tags entered by the user but the result of using the tag names in ascending order of the strings. Therefore, tag_key1 is not the first tag entered in the line protocol.
The string's MD5 hash value "md5_val" is calculated after the ranking is completed. The calculation result is then combined with the string to generate the table name: "t_md5_val". "t*" is a fixed prefix that every table generated by this mapping relationship has. The string's MD5 hash value "md5_val" is calculated after the ranking is completed. The calculation result is then combined with the string to generate the table name: "t_md5_val". "t*" is a fixed prefix that every table generated by this mapping relationship has.
>Example for how subtable name is generated:
>
> - Format super table name, tag name and tag value to a new string: "`measurement`,`tag_key1`=3i64,`tag_key2`=3i64"
> - Encrypt above string with MD5 to following string: "68e766edd3747cdeec5a96caeaed7721"
> - Split encrypted string from the middle into two new strings and reverse both strings: "de7c74d3ed66e768","2177edeaca965aec"
> - Combine above strings with prefix t_ and get a new string which is the subtable name: "t_de7c74d3ed66e7682177edeaca965aec"
2. If the super table obtained by parsing the line protocol does not exist, this super table is created. 2. If the super table obtained by parsing the line protocol does not exist, this super table is created.
If the subtable obtained by the parse line protocol does not exist, Schemaless creates the sub-table according to the subtable name determined in steps 1 or 2. If the subtable obtained by the parse line protocol does not exist, Schemaless creates the sub-table according to the subtable name determined in steps 1 or 2.
4. If the specified tag or regular column in the data row does not exist, the corresponding tag or regular column is added to the super table (only incremental). 4. If the specified tag or regular column in the data row does not exist, the corresponding tag or regular column is added to the super table (only incremental).
......
...@@ -16,6 +16,7 @@ The following preparations are required for EMQX to add TDengine data sources co ...@@ -16,6 +16,7 @@ The following preparations are required for EMQX to add TDengine data sources co
Depending on the current operating system, users can download the installation package from the [EMQX official website](https://www.emqx.io/downloads) and execute the installation. After installation, use `sudo emqx start` or `sudo systemctl start emqx` to start the EMQX service. Depending on the current operating system, users can download the installation package from the [EMQX official website](https://www.emqx.io/downloads) and execute the installation. After installation, use `sudo emqx start` or `sudo systemctl start emqx` to start the EMQX service.
Note: this chapter is based on EMQX v4.4.5. Other version of EMQX probably change its user interface, configuration methods or functions.
## Create Database and Table ## Create Database and Table
......
...@@ -71,6 +71,14 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000 ...@@ -71,6 +71,14 @@ st,t1=3,t2=4,t3=t3 c1=3i64,c3="passit",c2=false,c4=4f64 1626006833639000000
需要注意的是,这里的 tag_key1, tag_key2 并不是用户输入的标签的原始顺序,而是使用了标签名称按照字符串升序排列后的结果。所以,tag_key1 并不是在行协议中输入的第一个标签。 需要注意的是,这里的 tag_key1, tag_key2 并不是用户输入的标签的原始顺序,而是使用了标签名称按照字符串升序排列后的结果。所以,tag_key1 并不是在行协议中输入的第一个标签。
排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t\*” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。 排列完成以后计算该字符串的 MD5 散列值 "md5_val"。然后将计算的结果与字符串组合生成表名:“t_md5_val”。其中的 “t\*” 是固定的前缀,每个通过该映射关系自动生成的表都具有该前缀。
>子表名生成规则示例:
>
> - 格式化超级表名,标签名以及标签值组成字符串:"`measurement`,`tag_key1`=3i64,`tag_key2`=3i64"
> - 对上面的字符串进行 md5 加密,加密后的字符串为: "68e766edd3747cdeec5a96caeaed7721"
> - 将加密的字符串冲中间分成两部分,然后分别倒置:"de7c74d3ed66e768","2177edeaca965aec"
> - 将倒置后的字符串与前缀 t_ 组成一个新的字符串,新的字符串就是子表名:"t_de7c74d3ed66e7682177edeaca965aec"
2. 如果解析行协议获得的超级表不存在,则会创建这个超级表。 2. 如果解析行协议获得的超级表不存在,则会创建这个超级表。
3. 如果解析行协议获得子表不存在,则 Schemaless 会按照步骤 1 或 2 确定的子表名来创建子表。 3. 如果解析行协议获得子表不存在,则 Schemaless 会按照步骤 1 或 2 确定的子表名来创建子表。
4. 如果数据行中指定的标签列或普通列不存在,则在超级表中增加对应的标签列或普通列(只增不减)。 4. 如果数据行中指定的标签列或普通列不存在,则在超级表中增加对应的标签列或普通列(只增不减)。
......
...@@ -17,6 +17,7 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em ...@@ -17,6 +17,7 @@ MQTT 是流行的物联网数据传输协议,[EMQX](https://github.com/emqx/em
用户可以根据当前的操作系统,到 EMQX 官网下载安装包,并执行安装。下载地址如下:<https://www.emqx.io/zh/downloads>。安装后使用 `sudo emqx start``sudo systemctl start emqx` 启动 EMQX 服务。 用户可以根据当前的操作系统,到 EMQX 官网下载安装包,并执行安装。下载地址如下:<https://www.emqx.io/zh/downloads>。安装后使用 `sudo emqx start``sudo systemctl start emqx` 启动 EMQX 服务。
注意:本文基于 EMQX v4.4.5 版本,其他版本由于相关配置界面、配置方法以及功能可能随着版本升级有所区别。
## 创建数据库和表 ## 创建数据库和表
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册