IOTDB同步工具
同步工具是定期将本地磁盘中和新增的已持久化的tsfile文件上传至云端并加载到IoTDB的套件工具。
应用场景
- 需要多个IOTDB同时同步主数据的时候用到,以一个工厂应用为例,通常有多个分厂和多个总厂,每个分厂中使用一个IoTDB实例收集数据,然后将数据定时汇总到总厂中进行备份或者分析等,一个总厂可以接收来自多个分厂的数据,一个分厂也可以给多个总厂同步数据,在这种场景下每个IoTDB实例所管理的设备各不相同。
参数配置
- 接收端配置 ($IOTDB_HOME/conf/iotdb-engine.properties)
####################
### Sync Server Configuration
####################
# Whether to open the sync_server_port for receiving data from sync client, the default allowed
is_sync_enable=true
# Sync server port to listen
sync_server_port=5555
# White IP list of Sync client.
# Please use the form of network segment to present the range of IP, for example: 192.168.0.0/16
# If there are more than one IP segment, please separate them by commas
# The default is to allow all IP to sync
ip_white_list=0.0.0.0/0
- 发送端配置($IOTDB_HOME/conf/iotdb-sync-client.properties)
# Sync receiver server address
server_ip=127.0.0.1
# Sync receiver server port
server_port=5555
# The period time of sync process, the time unit is second.
sync_period_in_second=600
注意:发送端和接收端的port必须一致,更具体配置信息移步官方文档
启动同步功能发送端
Shell >$IOTDB_HOME/bin/start-sync-client.sh
关闭同步功能发送端
Shell >$IOTDB_HOME/bin/stop-sync-client.sh