Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
CritasWang committed Feb 7, 2024
1 parent f262a9f commit b887407
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 67 deletions.
28 changes: 14 additions & 14 deletions docs/src/.vuepress/navbar/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ export const enNavbar = navbar([
// text: 'Release',
// link: '/Download/',
// },
{
text: 'Community',
children: [
{ text: 'About', link: '/Community/About' },
{ text: 'Feedback', link: '/Community/Feedback' },
],
},
{
text: 'Development',
children: [
{ text: 'Become a Committer', link: '/Development/Community-Project-Committers' },
{ text: 'Power by', link: '/Development/Powered-By' },
],
},
// {
// text: 'Community',
// children: [
// { text: 'About', link: '/Community/About' },
// { text: 'Feedback', link: '/Community/Feedback' },
// ],
// },
// {
// text: 'Development',
// children: [
// { text: 'Become a Committer', link: '/Development/Community-Project-Committers' },
// { text: 'Power by', link: '/Development/Powered-By' },
// ],
// },
{
text: 'ASF',
children: [
Expand Down
46 changes: 22 additions & 24 deletions docs/src/UserGuide/latest/QuickStart/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ There are two ways to use TsFile in your own project.
* Use as jars: Compile the source codes and build to jars

```shell
git clone https://github.com/apache/iotdb.git
cd iotdb-core/tsfile
git clone https://github.com/apache/tsfile.git
mvn clean package -Dmaven.test.skip=true
```

Then, all the jars are in folder named `target/`. Import `target/tsfile-0.12.0-jar-with-dependencies.jar` to your project.
Then, all the jars are in folder named `target/`. Import `target/tsfile-1.0.0.jar` to your project.

* Use as a maven dependency:

Expand All @@ -46,21 +45,20 @@ Then, all the jars are in folder named `target/`. Import `target/tsfile-0.12.0-j
* Get the source codes

```shell
git clone https://github.com/apache/iotdb.git
git clone https://github.com/apache/tsfile.git
```

* Compile the source codes and deploy

```shell
cd iotdb-core/tsfile
mvn clean install -Dmaven.test.skip=true
```

* add dependencies into your project:

```xml
<dependency>
<groupId>org.apache.iotdb</groupId>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<version>1.0.0</version>
</dependency>
Expand Down Expand Up @@ -94,7 +92,7 @@ Then, all the jars are in folder named `target/`. Import `target/tsfile-0.12.0-j

```xml
<dependency>
<groupId>org.apache.iotdb</groupId>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<version>1.0.0</version>
</dependency>
Expand Down Expand Up @@ -292,20 +290,20 @@ Please note, we should redo the step of adding measurements before writing new d
You should install TsFile to your local maven repository.

```shell
mvn clean install -pl iotdb-core/tsfile -am -DskipTests
mvn clean install -am -DskipTests
```

You could write a TsFile by constructing **TSRecord** if you have the **non-aligned** (e.g. not all sensors contain values) time series data.

A more thorough example can be found at `/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileWriteWithTSRecord.java`
A more thorough example can be found at `/example/src/main/java/org/apache/tsfile/tsfile/TsFileWriteWithTSRecord.java`

You could write a TsFile by constructing **Tablet** if you have the **aligned** time series data.

A more thorough example can be found at `/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileWriteWithTablet.java`
A more thorough example can be found at `/example/src/main/java/org/apache/tsfile/tsfile/TsFileWriteWithTablet.java`

You could write data into a closed TsFile by using **ForceAppendTsFileWriter**.

A more thorough example can be found at `/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileForceAppendWrite.java`
A more thorough example can be found at `/example/src/main/java/org/apache/tsfile/tsfile/TsFileForceAppendWrite.java`



Expand Down Expand Up @@ -500,23 +498,23 @@ You should install TsFile to your local maven repository.


A more thorough example with query statement can be found at
`/tsfile/example/src/main/java/org/apache/iotdb/tsfile/TsFileRead.java`
`/example/src/main/java/org/apache/tsfile/TsFileRead.java`

```java
package org.apache.iotdb.tsfile;
package org.apache.tsfile;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.iotdb.tsfile.read.ReadOnlyTsFile;
import org.apache.iotdb.tsfile.read.TsFileSequenceReader;
import org.apache.iotdb.tsfile.read.common.Path;
import org.apache.iotdb.tsfile.read.expression.IExpression;
import org.apache.iotdb.tsfile.read.expression.QueryExpression;
import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression;
import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression;
import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression;
import org.apache.iotdb.tsfile.read.filter.TimeFilter;
import org.apache.iotdb.tsfile.read.filter.ValueFilter;
import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet;
import org.apache.tsfile.read.ReadOnlyTsFile;
import org.apache.tsfile.read.TsFileSequenceReader;
import org.apache.tsfile.read.common.Path;
import org.apache.tsfile.read.expression.IExpression;
import org.apache.tsfile.read.expression.QueryExpression;
import org.apache.tsfile.read.expression.impl.BinaryExpression;
import org.apache.tsfile.read.expression.impl.GlobalTimeExpression;
import org.apache.tsfile.read.expression.impl.SingleSeriesExpression;
import org.apache.tsfile.read.filter.TimeFilter;
import org.apache.tsfile.read.filter.ValueFilter;
import org.apache.tsfile.read.query.dataset.QueryDataSet;

/**
* The class is to show how to read TsFile file named "test.tsfile".
Expand Down
56 changes: 27 additions & 29 deletions docs/src/zh/UserGuide/latest/QuickStart/QuickStart.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ TsFile 是在 IoTDB 中使用的时间序列的文件格式。在这个章节中
* 使用 jar 包:编译源码生成 jar 包

```shell
git clone https://github.com/apache/iotdb.git
cd iotdb-core/tsfile/
git clone https://github.com/apache/tsfile.git
mvn clean package -Dmaven.test.skip=true
```

Expand All @@ -44,23 +43,22 @@ mvn clean package -Dmaven.test.skip=true
1. 下载源码

```shell
git clone https://github.com/apache/iotdb.git
git clone https://github.com/apache/tsfile.git
```
2. 编译源码和部署到本地仓库

```shell
cd iotdb-core/tsfile/
mvn clean install -Dmaven.test.skip=true
```
3. 在您自己的工程中增加依赖:

```xml
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>tsfile</artifactId>
<version>0.12.0</version>
</dependency>
```
```xml
<dependency>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<version>1.0.0</version>
</dependency>
```

或者,您可以直接使用官方的 Maven 仓库:

Expand Down Expand Up @@ -90,7 +88,7 @@ mvn clean install -Dmaven.test.skip=true

```xml
<dependency>
<groupId>org.apache.iotdb</groupId>
<groupId>org.apache.tsfile</groupId>
<artifactId>tsfile</artifactId>
<version>1.0.0</version>
</dependency>
Expand Down Expand Up @@ -271,15 +269,15 @@ TsFile 可以通过以下三个步骤生成,完整的代码参见"写入 TsFil
您需要安装 TsFile 到本地的 Maven 仓库中。

```shell
mvn clean install -pl iotdb-core/tsfile -am -DskipTests
mvn clean install -am -DskipTests
```

如果存在**非对齐**的时序数据(比如:不是所有的传感器都有值),您可以通过构造** TSRecord **来写入。

更详细的例子可以在

```
/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileWriteWithTSRecord.java
/example/src/main/java/org/apache/tsfile/TsFileWriteWithTSRecord.java
```

中查看
Expand All @@ -289,14 +287,14 @@ mvn clean install -pl iotdb-core/tsfile -am -DskipTests
更详细的例子可以在

```
/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileWriteWithTablet.java
/example/src/main/java/org/apache/tsfile/TsFileWriteWithTablet.java
```
中查看

在已关闭的 TsFile 文件中写入新数据的详细例子可以在

```
/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileForceAppendWrite.java
/example/src/main/java/org/apache/tsfile/TsFileForceAppendWrite.java
```
中查看

Expand Down Expand Up @@ -473,23 +471,23 @@ public QueryDataSet query(QueryExpression queryExpression, long partitionStartOf
您需要安装 TsFile 到本地的 Maven 仓库中。

有关查询语句的更详细示例,请参见
`/example/tsfile/src/main/java/org/apache/iotdb/tsfile/TsFileRead.java`
`/example/src/main/java/org/apache/tsfile/TsFileRead.java`

```java
package org.apache.iotdb.tsfile;
package org.apache.tsfile;
import java.io.IOException;
import java.util.ArrayList;
import org.apache.iotdb.tsfile.read.ReadOnlyTsFile;
import org.apache.iotdb.tsfile.read.TsFileSequenceReader;
import org.apache.iotdb.tsfile.read.common.Path;
import org.apache.iotdb.tsfile.read.expression.IExpression;
import org.apache.iotdb.tsfile.read.expression.QueryExpression;
import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression;
import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression;
import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression;
import org.apache.iotdb.tsfile.read.filter.TimeFilter;
import org.apache.iotdb.tsfile.read.filter.ValueFilter;
import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet;
import org.apache.tsfile.read.ReadOnlyTsFile;
import org.apache.tsfile.read.TsFileSequenceReader;
import org.apache.tsfile.read.common.Path;
import org.apache.tsfile.read.expression.IExpression;
import org.apache.tsfile.read.expression.QueryExpression;
import org.apache.tsfile.read.expression.impl.BinaryExpression;
import org.apache.tsfile.read.expression.impl.GlobalTimeExpression;
import org.apache.tsfile.read.expression.impl.SingleSeriesExpression;
import org.apache.tsfile.read.filter.TimeFilter;
import org.apache.tsfile.read.filter.ValueFilter;
import org.apache.tsfile.read.query.dataset.QueryDataSet;

/**
* The class is to show how to read TsFile file named "test.tsfile".
Expand Down

0 comments on commit b887407

Please sign in to comment.