Skip to content

Commit

Permalink
chore: reformat config file (#524)
Browse files Browse the repository at this point in the history
* 将 restful 端口从 6666 设为 7888

* 将 filesystem 默认端口从 6667 设为 6668

* 重新排序config文件
  • Loading branch information
aqni authored Dec 20, 2024
1 parent 40d9824 commit fd13107
Show file tree
Hide file tree
Showing 30 changed files with 144 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .github/actions/dbConfWriter/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ runs:
with:
paths: ${{ inputs.Root-Dir-Path }}/conf/config.properties
statements: |
s/^#storageEngineList=127.0.0.1#6667#filesystem/storageEngineList=127.0.0.1#6667#filesystem/g
s/^#storageEngineList=127.0.0.1#[0-9]*#filesystem/storageEngineList=127.0.0.1#6668#filesystem/g
s#dir=data#dir=${PWD}/test/iginx_mn#g
s/data.config.write.buffer.size=104857600/data.config.write.buffer.size=1048576/g
s/write.buffer.size=104857600/write.buffer.size=1048576/g
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/dbRunner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ runs:
with:
paths: conf/config.properties
statements: |
s/^#storageEngineList=127.0.0.1#6667#filesystem/storageEngineList=127.0.0.1#6667#filesystem/g
s/^#storageEngineList=127.0.0.1#[0-9]*#filesystem/storageEngineList=127.0.0.1#6668#filesystem/g
s#dir=data#dir=${{ steps.project.outputs.workspace }}/test/iginx_mn#g
s#dummy_dir=dummy#dummy_dir=${{ steps.project.outputs.workspace }}/test/mn#g
s/data.config.write.buffer.size=104857600/data.config.write.buffer.size=1048576/g
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/iginxRunner/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ runs:
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx.sh"
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx.sh" 6888 6666
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx.sh" 6888 7888
elif [ "$RUNNER_OS" == "Windows" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_windows.sh"
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_windows.sh" 6888 6666
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_windows.sh" 6888 7888
elif [ "$RUNNER_OS" == "macOS" ]; then
chmod +x "${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_macos.sh"
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_macos.sh" 6888 6666
"${GITHUB_WORKSPACE}/.github/scripts/iginx/iginx_macos.sh" 6888 7888
fi
- if: inputs.if-test-udf=='false' && inputs.if-stop=='true'
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/service/portMapper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ runs:
echo "port3=6669" >> $GITHUB_OUTPUT
;;
"FileSystem")
echo "port1=6667" >> $GITHUB_OUTPUT
echo "port2=6668" >> $GITHUB_OUTPUT
echo "port3=6669" >> $GITHUB_OUTPUT
echo "port1=6668" >> $GITHUB_OUTPUT
echo "port2=6669" >> $GITHUB_OUTPUT
echo "port3=6670" >> $GITHUB_OUTPUT
;;
"MySQL")
echo "port1=3306" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/dataSources/startup/filesystem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ set -e

cp -f conf/config.properties.bak $7

sed -i"" -e "s/^storageEngineList=127.0.0.1#6667#iotdb12/#storageEngineList=127.0.0.1#6667#iotdb12/" $7
sed -i"" -e "s/^storageEngineList/#storageEngineList/" $7

sed -i"" -e "s/^#storageEngineList=127.0.0.1#6667#filesystem/storageEngineList=127.0.0.1#$1#filesystem/g" $7
sed -i"" -e "s/^#storageEngineList=127.0.0.1#[0-9]*#filesystem/storageEngineList=127.0.0.1#$1#filesystem/g" $7

sed -i"" -e "s/#iginx_port=6888#/#iginx_port=$2#/g" $7

Expand Down
4 changes: 2 additions & 2 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@
<value>#storageEngineList=127.0.0.1#6667#iotdb</value>
</replacement>
<replacement>
<token>#storageEngineList=127.0.0.1#6667#filesystem.*</token>
<value>storageEngineList=127.0.0.1#6667#filesystem#dir=data#iginx_port=6888</value>
<token>#storageEngineList=127.0.0.1#6668#filesystem.*</token>
<value>storageEngineList=127.0.0.1#6668#filesystem#dir=data#iginx_port=6888</value>
</replacement>
<replacement>
<token>UD[ATS]F,.*,.*,.*[.]py</token>
Expand Down
123 changes: 70 additions & 53 deletions conf/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,62 @@ username=root
# iginx 本身的密码
password=root

##########################
### 数据库配置
##########################

# 数据库列表,使用','分隔不同实例
storageEngineList=127.0.0.1#6667#iotdb12#username=root#password=root#sessionPoolSize=20#has_data=false#is_read_only=false
#storageEngineList=127.0.0.1#6667#iotdb12#username=root#password=root#sessionPoolSize=20#has_data=false#is_read_only=false
#storageEngineList=127.0.0.1#8086#influxdb#url=http://localhost:8086/#token=your-token#organization=your-organization#has_data=false
#storageEngineList=127.0.0.1#6667#filesystem#iginx_port=6888#has_data=false#is_read_only=false#dir=data#data.config.write.buffer.size=104857600#data.config.write.buffer.timeout=0#dummy_dir=dummy#dummy.struct=LegacyFilesystem#dummy.config.chunk_size_in_bytes=1048576#dummy.config.memory_pool_size=100#client.connectPool.maxTotal=100
storageEngineList=127.0.0.1#6668#filesystem#iginx_port=6888#has_data=false#is_read_only=false#dir=data#data.config.write.buffer.size=104857600#data.config.write.buffer.timeout=0#dummy_dir=dummy#dummy.struct=LegacyFilesystem#dummy.config.chunk_size_in_bytes=1048576#dummy.config.memory_pool_size=100#client.connectPool.maxTotal=100
#storageEngineList=127.0.0.1#5432#relational#engine=postgresql#username=postgres#password=postgres#has_data=false
#storageEngineList=127.0.0.1#3306#relational#engine=mysql#username=root#password=mysql#has_data=false#meta_properties_path=your-meta-properties-path
#storageEngineList=127.0.0.1#27017#mongodb#uri="mongodb://127.0.0.1:27017/?maxPoolSize=200&maxIdleTimeMS=60000&waitQueueTimeoutMS=50000"#has_data=false#schema.sample.size=1000#dummy.sample.size=0
#storageEngineList=127.0.0.1#6379#redis#has_data=false#is_read_only=false#timeout=10000#data_db=1#dummy_db=0

# UDF定义文件夹存储路径(相对或绝对),文件夹内的文件需要按以下格式进行编写
# %defaultUDFDir%
# |- udf_list (udf函数列表及元信息文件)
# |- python_scripts/ (python脚本文件夹)
# |- xxx.py (python脚本)
defaultUDFDir=udf_funcs
# 底层数据库类名
databaseClassNames=iotdb12=cn.edu.tsinghua.iginx.iotdb.IoTDBStorage,influxdb=cn.edu.tsinghua.iginx.influxdb.InfluxDBStorage,filesystem=cn.edu.tsinghua.iginx.filesystem.FileSystemStorage,relational=cn.edu.tsinghua.iginx.relational.RelationalStorage,mongodb=cn.edu.tsinghua.iginx.mongodb.MongoDBStorage,redis=cn.edu.tsinghua.iginx.redis.RedisStorage

##########################
### 分片配置
##########################

# 写入的副本个数
replicaNum=0

# 底层数据库类名
databaseClassNames=iotdb12=cn.edu.tsinghua.iginx.iotdb.IoTDBStorage,influxdb=cn.edu.tsinghua.iginx.influxdb.InfluxDBStorage,filesystem=cn.edu.tsinghua.iginx.filesystem.FileSystemStorage,relational=cn.edu.tsinghua.iginx.relational.RelationalStorage,mongodb=cn.edu.tsinghua.iginx.mongodb.MongoDBStorage,redis=cn.edu.tsinghua.iginx.redis.RedisStorage
# 分片策略
policyClassName=cn.edu.tsinghua.iginx.policy.naive.NaivePolicy
#policyClassName=cn.edu.tsinghua.iginx.policy.simple.SimplePolicy

# 内存任务执行线程池
memoryTaskThreadPoolSize=200
# 重分片时,新分片的结束时间多加的间距,单位为秒
reshardFragmentTimeMargin=60

# 每个存储节点对应的工作线程数
physicalTaskThreadPoolSizePerStorage=100
##########################
### 统计信息配置
##########################

# 每个存储节点任务最大堆积数
maxCachedPhysicalTaskPerStorage=500
#统计信息收集类
# statisticsCollectorClassName=cn.edu.tsinghua.iginx.statistics.StatisticsCollector

# 统计信息打印间隔,单位毫秒
# statisticsLogInterval=5000

##########################
### Session 配置
##########################

# thrift线程池最小线程数量
minThriftWorkerThreadNum = 20

# thrift线程池最大线程数量
maxThriftWrokerThreadNum = 2147483647

##########################
### 逻辑层配置
##########################

# 约束
constraintChecker=naive

# 逻辑层优化策略
queryOptimizer=rbo
Expand All @@ -72,6 +98,26 @@ ruleBasedOptimizer=NotFilterRemoveRule=on,ColumnPruningRule=on,ConstantPropagati
ConstantFoldingRule=on,FilterPushDownRule=on,JoinFactorizationRule=on,SetTransformPushDownPathUnionJoinRule=on,InFilterTransformRule=on,\
OuterJoinEliminateRule=on

##########################
### 执行层配置
##########################

# 内存任务执行线程池
memoryTaskThreadPoolSize=200

# 每个存储节点对应的工作线程数
physicalTaskThreadPoolSizePerStorage=100

# 每个存储节点任务最大堆积数
maxCachedPhysicalTaskPerStorage=500

# 物理层优化策略
physicalOptimizer=naive

enablePushDown=true

useStreamExecutor=false

# ParallelFilter触发行数
parallelFilterThreshold=10000
# ParallelGroupBy触发行数
Expand All @@ -85,34 +131,6 @@ parallelGroupByPoolNum=5
# ParallelGroupBy线程池数量
streamParallelGroupByWorkerNum=5

# 约束
constraintChecker=naive

# 物理层优化策略
physicalOptimizer=naive

# 分片策略
policyClassName=cn.edu.tsinghua.iginx.policy.naive.NaivePolicy
#policyClassName=cn.edu.tsinghua.iginx.policy.simple.SimplePolicy

#统计信息收集类
# statisticsCollectorClassName=cn.edu.tsinghua.iginx.statistics.StatisticsCollector

# 统计信息打印间隔,单位毫秒
# statisticsLogInterval=5000

# 重分片时,新分片的结束时间多加的间距,单位为秒
reshardFragmentTimeMargin=60

# thrift线程池最小线程数量
minThriftWorkerThreadNum = 20

# thrift线程池最大线程数量
maxThriftWrokerThreadNum = 2147483647

# 当前是否是UT测试环境
utTestEnv = false

####################
### Migration 相关配置
####################
Expand Down Expand Up @@ -172,14 +190,6 @@ enableMetaCacheControl=false
# 分片缓存最大内存限制,单位为 KB,默认 128 MB
fragmentCacheThreshold=131072

##########################
### 执行层配置
##########################

enablePushDown=true

useStreamExecutor=false

##########################
### 内存控制
##########################
Expand All @@ -202,7 +212,7 @@ systemCpuThreshold=0.9
restIp=0.0.0.0

# rest 绑定的端口
restPort=6666
restPort=7888

# 是否启用 rest 服务
enableRestService=true
Expand All @@ -226,6 +236,13 @@ pythonCMD=python3
# 是否初始化配置文件内指定的UDF/Transform
needInitBasicUDFFunctions=false

# UDF定义文件夹存储路径(相对或绝对),文件夹内的文件需要按以下格式进行编写
# %defaultUDFDir%
# |- udf_list (udf函数列表及元信息文件)
# |- python_scripts/ (python脚本文件夹)
# |- xxx.py (python脚本)
defaultUDFDir=udf_funcs

##########################
### Transform配置
##########################
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/cn/edu/tsinghua/iginx/conf/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class Config {

private String restIp = "127.0.0.1";

private int restPort = 6666;
private int restPort = 7888;

private int maxTimeseriesLength = 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ private void loadPropsFromFile() {
Integer.parseInt(properties.getProperty("statisticsLogInterval", "5000")));

config.setRestIp(properties.getProperty("restIp", "127.0.0.1"));
config.setRestPort(Integer.parseInt(properties.getProperty("restPort", "6666")));
config.setRestPort(Integer.parseInt(properties.getProperty("restPort", "7888")));

config.setDisorderMargin(Long.parseLong(properties.getProperty("disorderMargin", "10")));
config.setAsyncRestThreadPool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ServerTest {
private final ExecutorService executorService = Executors.newSingleThreadExecutor();

public ServerTest() {
address = new InetSocketAddress("127.0.0.1", 6667);
address = new InetSocketAddress("127.0.0.1", 6668);
}

private Server server;
Expand Down
8 changes: 4 additions & 4 deletions docs/quickStarts/IGinXBySource-EnglishVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ The following display of words means the IGinX installation was successful:

```shell
May 27, 2021 8:32:19 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [127.0.0.1:6666]
INFO: Started listener bound to [127.0.0.1:7888]
May 27, 2021 8:32:19 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
08:32:19.446 [Thread-0] INFO cn.edu.tsinghua.iginx.rest.RestServer - IGinX REST server has been available at http://127.0.0.1:6666/.
08:32:19.446 [Thread-0] INFO cn.edu.tsinghua.iginx.rest.RestServer - IGinX REST server has been available at http://127.0.0.1:7888/.
```

## Using IGinX
Expand Down Expand Up @@ -308,7 +308,7 @@ Create a file insert.json and add the following into it:
Insert data into the database using the following command:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:6666/api/v1/datapoints
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:7888/api/v1/datapoints
```

After inserting data, you can also query the data just written using the RESTful interface.
Expand Down Expand Up @@ -337,7 +337,7 @@ Create a file query.json and write the following data into it:
Enter the following command to query the data:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:6666/api/v1/datapoints/query
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:7888/api/v1/datapoints/query
```

The command will return information about the data point just inserted:
Expand Down
8 changes: 4 additions & 4 deletions docs/quickStarts/IGinXBySource.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ $ ./sbin/start_iginx.sh

```shell
May 27, 2021 8:32:19 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [127.0.0.1:6666]
INFO: Started listener bound to [127.0.0.1:7888]
May 27, 2021 8:32:19 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
08:32:19.446 [Thread-0] INFO cn.edu.tsinghua.iginx.rest.RestServer - Iginx REST server has been available at http://127.0.0.1:6666/.
08:32:19.446 [Thread-0] INFO cn.edu.tsinghua.iginx.rest.RestServer - Iginx REST server has been available at http://127.0.0.1:7888/.
```

## 访问 IGinX
Expand Down Expand Up @@ -308,7 +308,7 @@ INFO: [HttpServer] Started.
使用如下的命令即可向数据库中插入数据:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:6666/api/v1/datapoints
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:7888/api/v1/datapoints
```

在插入数据后,还可以使用 RESTful 接口查询刚刚写入的数据。
Expand Down Expand Up @@ -337,7 +337,7 @@ $ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.
使用如下的命令查询数据:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:6666/api/v1/datapoints/query
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:7888/api/v1/datapoints/query
```

命令会返回刚刚插入的数据点信息:
Expand Down
4 changes: 2 additions & 2 deletions docs/quickStarts/IGinXCluster-EnglishVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Create the file insert.json and add the following to it:
Insert data into the database from an IGinX instance using the following command:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:6666/api/v1/datapoints
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:7888/api/v1/datapoints
```

After inserting data, you can also query the data just written using the RESTful interface.
Expand Down Expand Up @@ -256,7 +256,7 @@ Create a file query.json and write the following data to it:
Use the following command to query data from IGinX instance two:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:6666/api/v1/datapoints/query
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:7888/api/v1/datapoints/query
```

The command will return information about the data point just inserted:
Expand Down
4 changes: 2 additions & 2 deletions docs/quickStarts/IGinXCluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ $ ./sbin/start_iginx.sh
使用如下的命令即可从 IGinX 实例一向数据库中插入数据:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:6666/api/v1/datapoints
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:7888/api/v1/datapoints
```

在插入数据后,还可以使用 RESTful 接口查询刚刚写入的数据。
Expand Down Expand Up @@ -260,7 +260,7 @@ $ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.
使用如下的命令从 IGinX 实例二查询数据:

```shell
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:6666/api/v1/datapoints/query
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:7888/api/v1/datapoints/query
```

命令会返回刚刚插入的数据点信息:
Expand Down
4 changes: 2 additions & 2 deletions docs/quickStarts/IGinXInOneShot-EnglishVersion.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Create the file insert.json and add the following to it:
Use the following command to insert data into the database:
```shell
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:6666/api/v1/datapoints
$ curl -XPOST -H'Content-Type: application/json' -d @insert.json http://127.0.0.1:7888/api/v1/datapoints
```
After inserting data, you can also query the data just written using the RESTful interface.
Expand Down Expand Up @@ -164,7 +164,7 @@ Create a file query.json and write the following data to it:
Use the following command to query the data:
```shell
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:6666/api/v1/datapoints/query
$ curl -XPOST -H'Content-Type: application/json' -d @query.json http://127.0.0.1:7888/api/v1/datapoints/query
```
The command will return information about the data point just inserted:
Expand Down
Loading

0 comments on commit fd13107

Please sign in to comment.