Skip to content

Commit

Permalink
Merge branch 'master' into pull_up_file_close
Browse files Browse the repository at this point in the history
# Conflicts:
#	server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
  • Loading branch information
jt2594838 committed Jan 3, 2020
2 parents c3907d3 + 0734ec1 commit fdfb35f
Show file tree
Hide file tree
Showing 86 changed files with 2,141 additions and 1,127 deletions.
27 changes: 14 additions & 13 deletions docs/Development-Chinese.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,41 +37,42 @@ IoTDB 官网:https://iotdb.apache.org/

关注方法:用想接收邮件的邮箱向 dev-subscribe@iotdb.apache.org 发一封邮件,主题内容不限,收到回复后,再次向确认地址发一封确认邮件(确认地址比较长,推荐qq邮箱)。

## 新功能、Bug 反馈、改进等目标记录
## 新功能、Bug 反馈、改进等

Jira 上提 issue:https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-9?filter=allopenissues
所有希望 IoTDB 做的功能或修的 bug,都可以在 Jira 上提 issue:https://issues.apache.org/jira/projects/IOTDB/issues/IOTDB-9?filter=allopenissues

选择 issue 类型:bug、improvement、new feature等。新建的 issue 会自动向邮件列表中同步邮件,之后的讨论可在 jira 上留言,也可以在邮件列表进行。当问题解决后请关闭 issue。
可以选择 issue 类型:bug、improvement、new feature等。新建的 issue 会自动向邮件列表中同步邮件,之后的讨论可在 jira 上留言,也可以在邮件列表进行。当问题解决后请关闭 issue。

## 邮件讨论内容(英文)

* 初来乍到:大家好,我是xxx,新加入 IoTDB 社区,希望。
* 第一次参与邮件列表可以简单介绍一下自己。(Hi, I'm xxx ...)

* 小试牛刀:Hi,我正在解决这个 issue,给个链接,我预计的解决方案是xxx。
* 开发功能前可以发邮件声明一下自己想做的任务。(Hi,I'm working on issue IOTDB-XXX,My plan is ...)

## 贡献代码

可以去 jira 上领取现有 issue 或者自己创建 issue 再领取,评论说我要做这个 issue 就可以。
可以到 jira 上领取现有 issue 或者自己创建 issue 再领取,评论说我要做这个 issue 就可以。

* 克隆仓库到自己的本地的仓库,clone到本地,关联apache仓库为上游 upstream 仓库。
* 从 master 切出新的分支,分支名根据这个分支的功能决定,一般叫 f_【新功能】 或者 fix_【bug】
* 从 master 切出新的分支,分支名根据这个分支的功能决定,一般叫 f_new_feature(如f_storage_engine) 或者 fix_bug(如fix_query_cache_bug)
* 在 idea 中添加code style为 根目录的 java-google-style.xml
* 修改代码,增加测试用例(单元测试、集成测试)
* 集成测试参考: server/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneIT
* 提交 PR, 以 [IOTDB-jira号] 开头
* dev发邮件:我已经提交PR,附上pr链接
* 发邮件到 dev 邮件列表:(I've submitted a PR for issue IOTDB-xxx [link])
* 根据其他人的审阅意见进行修改,继续更新,直到合并
* 关闭 jira issue

## 二、IoTDB 调试方式

* 服务器主函数:server/src/main/java/org/apache/iotdb/db/service/IoTDB,可以debug启动
* 客户端:client/src/main/java/org/apache/iotdb/client,linux 用 Clinet,windows 用WinClint,可以直接启动,需要参数"-h 127.0.0.1 -p 6667 -u root -pw root"
* 服务器的 rpc 实现(主要用来客户端和服务器通信,一般在这里开始打断点):server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl
推荐使用 Intellij idea。```mvn clean package -DskipTests``` 之后把 ```server/target/generated-sources/antlr4``````service-rpc/target/generated-sources/thrift``` 标记为 ```Source Root```

* 服务器主函数:```server/src/main/java/org/apache/iotdb/db/service/IoTDB```,可以debug模式启动
* 客户端:```client/src/main/java/org/apache/iotdb/client/```,linux 用 Clinet,windows 用 WinClint,可以直接启动,需要参数"-h 127.0.0.1 -p 6667 -u root -pw root"
* 服务器的 rpc 实现(主要用来客户端和服务器通信,一般在这里开始打断点):```server/src/main/java/org/apache/iotdb/db/service/TSServiceImpl```
* jdbc所有语句:executeStatement(TSExecuteStatementReq req)
* jdbc查询语句:executeQueryStatement(TSExecuteStatementReq req) * native写入接口:insert(TSInsertReq req)


* 写入引擎 org.apache.iotdb.db.engine.StorageEngine
* 存储引擎 org.apache.iotdb.db.engine.StorageEngine
* 查询引擎 org.apache.iotdb.db.qp.QueryProcessor

198 changes: 198 additions & 0 deletions docs/Development-VoteRelease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

# How to validate a staged release (如何给发布版本投票)

For non-Chinese users, please read https://cwiki.apache.org/confluence/display/IOTDB/Validating+a+staged+Release

## 下载投票的 版本/rc 下的所有内容

https://dist.apache.org/repos/dist/dev/incubator/iotdb/

## 导入发布经理的公钥

https://dist.apache.org/repos/dist/dev/incubator/iotdb/KEYS

最下边有 Release Manager (RM) 的公钥

安装 gpg2

### 第一种方法

```
公钥的开头是这种
pub rsa4096 2019-10-15 [SC]
10F3B3F8A1201B79AA43F2E00FC7F131CAA00430
或这种
pub rsa4096/28662AC6 2019-12-23 [SC]
```

下载公钥

```
gpg2 --receive-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (或 28662AC6)
或 (指定 keyserver)
gpg2 --keyserver p80.pool.sks-keyservers.net --recv-keys 10F3B3F8A1201B79AA43F2E00FC7F131CAA00430 (或 28662AC6)
```

### 第二种方法

把下边这段复制到一个文本文件中,起个名叫 ```key.asc```

```
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
...
-----END PGP PUBLIC KEY BLOCK-----
```

导入 RM 的公钥到自己电脑

```
gpg2 --import key.asc
```

## 验证源码发布版

* (孵化阶段)验证是否名字中有 ```incubating```

* 验证是否有 DISCLAIMER、NOTICE、LICENSE,以及内容是否正确。

* 验证 README、RELEASE_NOTES

* 验证 header

```
mvn -B apache-rat:check
```

* 验证签名和哈希值

```
gpg2 --verify apache-iotdb-0.9.0-incubating-source-release.zip.asc apache-iotdb-0.9.0-incubating-source-release.zip
出现 Good Singnature
shasum -a512 apache-iotdb-0.9.0-incubating-source-release.zip
和对应的 .sha512 对比,一样就可以。
```

* 验证编译

```
mvnw.sh install
应该最后全 SUCCESS
```

## 验证二进制发布版

* (孵化阶段)验证是否名字中有 ```incubating```

* 验证是否有 DISCLAIMER、NOTICE、LICENSE,以及内容是否正确。

* 验证 README、RELEASE_NOTES

* 验证签名和哈希值

```
gpg2 --verify apache-iotdb-0.9.0-incubating-bin.zip.asc apache-iotdb-0.9.0-incubating-bin.zip
出现 Good Singnature
shasum -a512 apache-iotdb-0.9.0-incubating-bin.zip
和对应的 .sha512 对比,一样就可以。
```

* 验证是否能启动以及示例语句是否正确执行

```
./sbin/start-server.sh
./sbin/start-client.sh
SET STORAGE GROUP TO root.turbine;
CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA;
insert into root.turbine.d1(timestamp,s0) values(1,1);
insert into root.turbine.d1(timestamp,s0) values(2,2);
insert into root.turbine.d1(timestamp,s0) values(3,3);
select * from root;
打印如下内容:
+-----------------------------------+------------------+
| Time|root.turbine.d1.s0|
+-----------------------------------+------------------+
| 1970-01-01T08:00:00.001+08:00| 1.0|
| 1970-01-01T08:00:00.002+08:00| 2.0|
| 1970-01-01T08:00:00.003+08:00| 3.0|
+-----------------------------------+------------------+
```

## 示例邮件

验证通过之后可以发邮件了

```
Hi,
+1 (PMC could binding)
The source release:
Incubating in name [ok]
Has DISCLAIMER [ok]
LICENSE and NOTICE [ok]
signatures and hashes [ok]
All files have ASF header [ok]
could compile from source: ./mvnw.sh clean install [ok]
The binary distribution:
Incubating in name [ok]
Has DISCLAIMER [ok]
LICENSE and NOTICE [ok]
signatures and hashes [ok]
Could run with the following statements [ok]
SET STORAGE GROUP TO root.turbine;
CREATE TIMESERIES root.turbine.d1.s0 WITH DATATYPE=DOUBLE, ENCODING=GORILLA;
insert into root.turbine.d1(timestamp,s0) values(1,1);
insert into root.turbine.d1(timestamp,s0) values(2,2);
insert into root.turbine.d1(timestamp,s0) values(3,3);
select * from root;
Thanks,
xxx
```


## 小工具

* 打印出包含某些字符的行(只看最上边的输出就可以,下边的文件不需要看)

```
find . -type f -exec grep -i "copyright" {} \; -print | sort -u
find **/src -type f -exec grep -i "copyright" {} \; -print | sort -u
```
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,19 @@

# 第4章: 客户端

# 编程 - Session
# 编程 - 原生接口

## 依赖

* JDK >= 1.8
* Maven >= 3.1

## 仅在client模块中打包

在根目录下运行:
> mvn clean package -pl client -am -Dmaven.test.skip=true
## 安装到本地 maven 库

在根目录下运行:
> mvn clean install -pl session -am -Dmaven.test.skip=true
## 在 maven 中使用 session 接口
## 在 maven 中使用原生接口

```
<dependencies>
Expand All @@ -50,10 +45,10 @@
</dependencies>
```

## Session 接口使用示例
## 原生接口使用示例
下面将给出Session对应的接口的简要介绍和对应参数:

### 启动Session的相关命令:
### 建立连接

* 初始化Session
​ Session(String host, int port)
Expand All @@ -66,7 +61,7 @@
* 关闭Session
​ Session.close()

### Session的相关数据操作命令
### 数据操作接口

* 设置存储组

Expand Down Expand Up @@ -101,6 +96,6 @@

### 示例代码

浏览上述接口的详细信息,请参阅代码session/src/main/java/org/apache/iotdb/session/Session.java
浏览上述接口的详细信息,请参阅代码 ```session/src/main/java/org/apache/iotdb/session/Session.java```

使用上述接口的示例代码在example/session/src/main/java/org/apache/iotdb/SessionExample.java,在此文件中包含了开启session和执行批量插入等操作
使用上述接口的示例代码在 ```example/session/src/main/java/org/apache/iotdb/SessionExample.java```
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,20 @@
-->

# Chapter 4: Client
# Programming - Session
# Programming - Native API
## Usage

### Dependencies

* JDK >= 1.8
* Maven >= 3.1

### How to package only client module

In root directory:
> mvn clean package -pl client -am -Dmaven.test.skip=true
### How to install in local maven repository

In root directory:
> mvn clean install -pl client -am -Dmaven.test.skip=true
> mvn clean install -pl session -am -DskipTests
### Using IoTDB Session with Maven
### Using IoTDB Native API with Maven

```
<dependencies>
Expand All @@ -51,11 +46,11 @@ In root directory:
```


### Examples with Session interfaces
### Examples with Native API

Here we show the commonly used interfaces and their parameters in the Session:
Here we show the commonly used interfaces and their parameters in the Native API:

#### Run the Session
#### Run the Native API

* Initialize a Session

Expand All @@ -73,7 +68,7 @@ Here we show the commonly used interfaces and their parameters in the Session:

​ Session.close()

#### Operate the Session
#### Operations

* Set storage group

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@
* JDK >= 1.8
* Maven >= 3.1

## How to package only jdbc project

In root directory:
```
mvn clean package -pl jdbc -am -Dmaven.test.skip=true
```

## How to install in local maven repository

In root directory:
Expand All @@ -50,7 +43,7 @@ mvn clean install -pl jdbc -am -Dmaven.test.skip=true
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-jdbc</artifactId>
<version>0.8.0</version>
<version>0.10.0</version>
</dependency>
</dependencies>
```
Expand Down

0 comments on commit fdfb35f

Please sign in to comment.