You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/06/19 07:03:42 UTC

[GitHub] [incubator-iotdb] fanhualta commented on a change in pull request #196: [ IOTDB-117]Add sync documentation

fanhualta commented on a change in pull request #196: [ IOTDB-117]Add sync documentation
URL: https://github.com/apache/incubator-iotdb/pull/196#discussion_r295147750
 
 

 ##########
 File path: docs/Documentation/UserGuideV0.7.0/7-Tools-Sync.md
 ##########
 @@ -0,0 +1,278 @@
+<!--
+
+    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.
+
+-->
+
+<!-- TOC -->
+
+- [Introduction](#introduction)
+- [Configuration](#configuration)
+    - [Sync Receiver](#sync-receiver)
+    - [Sync Sender](#sync-sender)
+- [Usage](#usage)
+    - [Start Sync Receiver](#start-sync-receiver)
+    - [Stop Sync Receiver](#stop-sync-receiver)
+    - [Start Sync Sender](#start-sync-sender)
+    - [Stop Sync Sender](#stop-sync-sender)
+
+<!-- /TOC -->
+# Introduction
+The Sync Tool is an IoTDB suite tool that periodically uploads persistent tsfiles from disk in sender to the receiver and loads them.
+
+On the sender side of the sync, the sync module is a separate process, independent with the IoTDB process. It can be started and closed through a separate script (see Sections `Usage` for details). The frequency cycle of the sync can be set by the user. 
+
+On the receiver side of the sync, the sync module is embedded in the engine of IoTDB and is in the same process with IoTDB. The receiver module listens for a separate port, which can be set by the user (see Section `Configuration` for details). Before using it, it needs to set up a whitelist at the sync receiver, which is expressed as a network segment. The receiver only accepts the data transferred from the sender located in the whitelist segment, as detailed in Section `Configuration`. 
+
+The sync tool has a many-to-one sender-receiver mode, that is, one sync receiver can receive data from multiple sync senders at the same time, and one sync sender can only send data back to one sync server.
+
+> Note: Before using the sync tool, the client and server need to be configured separately. The configuration is detailed in Sections Configuration.
+# Configuration
+## Sync Receiver
+The parameter configuration of the sync receiver is located in the configuration file `iotdb-engine.properties` of IoTDB, and its directory is `$IOTDB_HOME/conf/iotdb-engine.properties`. In this configuration file, there are four parameters related to the sync receiver. The configuration instructions are as follows:
+
+<table>
+   <tr>
+      <td colspan="2">parameter: is_sync_enable</td>
+   </tr>
+   <tr>
+      <td width="30%">Describtion</td>
+      <td>Sync function switch, which is configured as true to indicate that the receiver is allowed to receive the data from sender and load it. When set to false, it means that the receiver is not allowed to receive the data from any sender.</td>
+   </tr>
+   <tr>
+      <td>Type</td>
+      <td>Boolean</td>
+   </tr>
+   <tr>
+      <td>Default</td>
+      <td>false</td>
+   </tr>
+   <tr>
+      <td>Modalities for Entry into Force after Modification</td>
+      <td>Restart receiver</td>
+   </tr>
+</table>
+
+<table>
+   <tr>
+      <td colspan="2">parameter: IP_white_list</td>
+   </tr>
+   <tr>
+      <td width="30%">Describtion</td>
+      <td>Set up a white list of sender IP addresses, which is expressed in the form of network segments and separated by commas between multiple network segments. When the sender transfers data to the receiver, only when the IP address of the sender is within the network segment set by the whitelist can the receiver allow the sync operation. If the whitelist is empty, the receiver does not allow any sender to sync data. The default receiver accepts all IP sync requests.</td>
+   </tr>
+   <tr>
+      <td>Type</td>
+      <td>String</td>
+   </tr>
+   <tr>
+      <td>Default</td>
+      <td>0.0.0.0/0</td>
+   </tr>
+   <tr>
+      <td>Modalities for Entry into Force after Modification</td>
+      <td>Restart receiver</td>
+   </tr>
+</table>
+
+<table>
+   <tr>
+      <td colspan="2">parameter: update_historical_data_possibility</td>
+   </tr>
+   <tr>
+      <td width="30%">Describtion</td>
+      <td>The processing strategy chosen by the sync receiver when merging the sync data.<br/>
+        1. If the sync data accounts for more than 50% of the update of the historical data (compared with the latest timestamp of the local storage group data),then it is recommended to select strategy. Setting the parameter to true, which has a greater impact on the write performance of the IoTDB system and occupies less CPU of the machine.<br/>
 
 Review comment:
   Actually, if it's set to true, it will reduce write performance. What's more, sync tool will both reduce write performance in both modes. The difference is that one mode affects CPU more, and the other mode that affects write performance more.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services