This is an automated email from the ASF dual-hosted git repository.
yuyuankang pushed a commit to branch research/separation
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/research/separation by this
push:
new fa3b0ce tune
fa3b0ce is described below
commit fa3b0ce79eb1ee517e1022c6b41e525dde52d79c
Author: yuyuan <[email protected]>
AuthorDate: Tue Mar 15 07:50:04 2022 -0700
tune
---
README.md | 365 +------------
.../resources/conf/iotdb-engine.properties | 6 +-
.../java/org/apache/iotdb/db/conf/IoTDBConfig.java | 44 +-
.../org/apache/iotdb/db/conf/IoTDBDescriptor.java | 8 +
...TraditionalLevelCompactionTsFileManagement.java | 206 ++++++--
.../utils/CompactionSeparateFileUtils.java | 11 +-
.../iotdb/db/engine/memtable/AbstractMemTable.java | 10 +-
.../engine/storagegroup/StorageGroupProcessor.java | 32 +-
.../apache/iotdb/db/qp/executor/PlanExecutor.java | 8 +-
.../iotdb/db/separation/statistics/Collector.java | 10 +-
.../statistics/SeparationTuningClient.java | 127 ++---
.../statistics/SeparationTunningService.java | 580 +++++++++++++--------
.../java/org/apache/iotdb/db/service/IoTDB.java | 8 +-
13 files changed, 704 insertions(+), 711 deletions(-)
diff --git a/README.md b/README.md
index fe3a3de..40d09bc 100644
--- a/README.md
+++ b/README.md
@@ -18,367 +18,18 @@
under the License.
-->
-[English](./README.md) | [中文](./README_ZH.md)
-# IoTDB
-[](https://www.travis-ci.org/apache/iotdb)
-[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)
-[](https://github.com/apache/iotdb/releases)
-[](https://www.apache.org/licenses/LICENSE-2.0.html)
-
-
-
-
-[](https://lgtm.com/projects/g/apache/iotdb/context:java)
-[](https://iotdb.apache.org/)
-[](http://search.maven.org/#search|gav|1|g:"org.apache.iotdb")
-[](https://gitpod.io/#https://github.com/apache/iotdb)
-# Overview
-IoTDB (Internet of Things Database) is a data management system for time
series data, which can provide users specific services, such as, data
collection, storage and analysis. Due to its light weight structure, high
performance and usable features together with its seamless integration with the
Hadoop and Spark ecology, IoTDB meets the requirements of massive dataset
storage, high throughput data input, and complex data analysis in the
industrial IoT field.
-
-# Main Features
-
-Main features of IoTDB are as follows:
-
-1. Flexible deployment strategy. IoTDB provides users a one-click installation
tool on either the cloud platform or the terminal devices, and a data
synchronization tool bridging the data on cloud platform and terminals.
-2. Low cost on hardware. IoTDB can reach a high compression ratio of disk
storage.
-3. Efficient directory structure. IoTDB supports efficient organization for
complex time series data structure from intelligent networking devices,
organization for time series data from devices of the same type, fuzzy
searching strategy for massive and complex directory of time series data.
-4. High-throughput read and write. IoTDB supports millions of low-power
devices' strong connection data access, high-speed data read and write for
intelligent networking devices and mixed devices mentioned above.
-5. Rich query semantics. IoTDB supports time alignment for time series data
across devices and measurements, computation in time series field (frequency
domain transformation) and rich aggregation function support in time dimension.
-6. Easy to get started. IoTDB supports SQL-Like language, JDBC standard API
and import/export tools which is easy to use.
-7. Seamless integration with state-of-the-practice Open Source Ecosystem.
IoTDB supports analysis ecosystems such as, Hadoop, Spark, and visualization
tool, such as, Grafana.
-
-For the latest information about IoTDB, please visit [IoTDB official
website](https://iotdb.apache.org/). If you encounter any problems or identify
any bugs while using IoTDB, please report an issue in
[jira](https://issues.apache.org/jira/projects/IOTDB/issues).
-
-<!-- TOC -->
-
-## Outline
-
-- [IoTDB](#iotdb)
-- [Overview](#overview)
-- [Main Features](#main-features)
- - [Outline](#outline)
-- [Quick Start](#quick-start)
- - [Prerequisites](#prerequisites)
- - [Installation](#installation)
- - [Build from source](#build-from-source)
- - [Configurations](#configurations)
- - [Start](#start)
- - [Start IoTDB](#start-iotdb)
- - [Use IoTDB](#use-iotdb)
- - [Use Cli](#use-cli)
- - [Basic commands for IoTDB](#basic-commands-for-iotdb)
- - [Stop IoTDB](#stop-iotdb)
- - [Only build server](#only-build-server)
- - [Only build cli](#only-build-cli)
- - [Usage of CSV Import and Export Tool](#usage-of-csv-import-and-export-tool)
-
-<!-- /TOC -->
-
-# Quick Start
-
-This short guide will walk you through the basic process of using IoTDB. For a
more detailed introduction, please visit our website's [User
Guide](https://iotdb.apache.org/UserGuide/Master/Get%20Started/QuickStart.html).
-
-## Prerequisites
-
-To use IoTDB, you need to have:
-
-1. Java >= 1.8 (1.8, 11, and 13 are verified. Please make sure the environment
path has been set accordingly).
-2. Maven >= 3.6 (If you want to compile and install IoTDB from source code).
-3. Set the max open files num as 65535 to avoid "too many open files" error.
-
-## Installation
-
-IoTDB provides three installation methods, you can refer to the following
suggestions, choose the one fits you best:
-
-* Installation from source code. If you need to modify the code yourself, you
can use this method.
-* Installation from binary files. Download the binary files from the official
website. This is the recommended method, in which you will get a binary
released package which is out-of-the-box.
-* Using Docker:The path to the dockerfile is
https://github.com/apache/iotdb/tree/master/docker/src/main
-
-
-Here in the Quick Start, we give a brief introduction of using source code to
install IoTDB. For further information, please refer to Chapter 3 of the User
Guide.
-
-## Build from source
-
-### Prepare Thrift compiler
-
-Skip this chapter if you are using Windows.
-
-As we use Thrift for our RPC module (communication and
-protocol definition), we involve Thrift during the compilation, so Thrift
compiler 0.13.0 (or
-higher) is required to generate Thrift Java code. Thrift officially provides
binary compiler for
-Windows, but unfortunately, they do not provide that for Unix OSs.
-
-If you have permission to install new softwares, use `apt install` or `yum
install` or `brew install`
-to install the Thrift compiler (If you already have installed the thrift
compiler, skip this step).
-Then, you may add the following parameter
-when running Maven:
`-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt
-Dthrift.exec.absolute.path=<YOUR LOCAL THRIFT BINARY FILE>`.
-
-If not, then you have to compile the thrift compiler, and it requires you
install a boost library first.
-Therefore, we compiled a Unix compiler ourselves and put it onto GitHub, and
with the help of a
-maven plugin, it will be downloaded automatically during compilation.
-This compiler works fine with gcc8 or later, Ubuntu MacOS, and CentOS, but
previous versions
-and other OSs are not guaranteed.
-
-If you can not download the thrift compiler automatically because of network
problem, you can download
-it yourself, and then either:
-rename your thrift file to
`{project_root}\thrift\target\tools\thrift_0.12.0_0.13.0_linux.exe`;
-or, add Maven commands:
-`-Dthrift.download-url=http://apache.org/licenses/LICENSE-2.0.txt
-Dthrift.exec.absolute.path=<YOUR LOCAL THRIFT BINARY FILE>`.
-
-### Compile IoTDB
-
-You can download the source code from:
-
-```
-git clone https://github.com/apache/iotdb.git
-```
-
-The default master branch is the dev branch, If you want to use a released
version x.x.x:
-
-```
-git checkout release/x.x.x
-```
-
-From v0.11.3 on, the tag name format is change to: vx.x.x:
-
-```
-git checkout vx.x.x
-```
-
-Under the root path of iotdb:
-
-```
-> mvn clean package -DskipTests
-```
-
-Using `-P compile-cpp` for compiling cpp client (For more details, read
client-cpp's Readme file.)
-
-Then the binary version (including both server and cli) can be found at
**distribution/target/apache-iotdb-{project.version}-all-bin.zip**
-
-NOTE: Directories `thrift/target/generated-sources/thrift`,
`thrift-sync/target/generated-sources/thrift`,
-`thrift-cluster/target/generated-sources/thrift`
-and `antlr/target/generated-sources/antlr4` need to be added to sources roots
to avoid compilation errors in the IDE.
-In IDEAJ, you just need to right click on the root project name and choose
"Maven->Reload Project" after
-you run `mvn package` successfully.
-
-### Configurations
-
-configuration files are under "conf" folder
-
- * environment config module (`iotdb-env.bat`, `iotdb-env.sh`),
- * system config module (`iotdb-engine.properties`)
- * log config module (`logback.xml`).
-
-For more information, please see [Chapter3:
Server](http://iotdb.apache.org/UserGuide/Master/Server/Config%20Manual.html).
-
-## Start
-
-You can go through the following steps to test the installation, if there is
no error returned after execution, the installation is completed.
-
-### Start IoTDB
-
-Users can start IoTDB by the start-server script under the sbin folder.
-
-```
-# Unix/OS X
-> nohup sbin/start-server.sh >/dev/null 2>&1 &
-or
-> nohup sbin/start-server.sh -c <conf_path> -rpc_port <rpc_port> >/dev/null
2>&1 &
-
-# Windows
-> sbin\start-server.bat -c <conf_path> -rpc_port <rpc_port>
-```
-
-- "-c" and "-rpc_port" are optional.
-- option "-c" specifies the system configuration file directory.
-- option "-rpc_port" specifies the rpc port.
-- if both option specified, the *rpc_port* will overrides the rpc_port in
*conf_path*.
-
-
-### Use IoTDB
-
-#### Use Cli
-
-IoTDB offers different ways to interact with server, here we introduce the
basic steps of using Cli tool to insert and query data.
-
-After installing IoTDB, there is a default user 'root', its default password
is also 'root'. Users can use this
-default user to login Cli to use IoTDB. The startup script of Cli is the
start-cli script in the folder sbin. When executing the script, user should
assign
-IP, PORT, USER_NAME and PASSWORD. The default parameters are "-h 127.0.0.1 -p
6667 -u root -pw -root".
-
-Here is the command for starting the Cli:
-
-```
-# Unix/OS X
-> sbin/start-cli.sh -h 127.0.0.1 -p 6667 -u root -pw root
-
-# Windows
-> sbin\start-cli.bat -h 127.0.0.1 -p 6667 -u root -pw root
-```
-
-The command line cli is interactive, so you should see the welcome logo and
statements if everything is ready:
+# Compaction Policy Tuning Extension
+This is an extension of IoTDB, which implements the compaction policy tuning
module. To use the module, several parameters of IoTDB would be used. The
introduction of IoTDB can be found [here](https://github.com/apache/iotdb.git).
+```aidl
+enable_separation_tuning=true # to enable the tuning algorithm
+delay_num = 10000 # the size of delay set to analyze
+total_capacity=512 # the capacity of the MemTable
```
- _____ _________ ______ ______
-|_ _| | _ _ ||_ _ `.|_ _ \
- | | .--.|_/ | | \_| | | `. \ | |_) |
- | | / .'`\ \ | | | | | | | __'.
- _| |_| \__. | _| |_ _| |_.' /_| |__) |
-|_____|'.__.' |_____| |______.'|_______/ version x.x.x
-
-
-IoTDB> login successfully
-IoTDB>
-```
-
-#### Basic commands for IoTDB
-
-Now, let us introduce the way of creating timeseries, inserting data and
querying data.
-
-The data in IoTDB is organized as timeseries. Each timeseries includes
multiple data-time pairs, and is owned by a storage group. Before defining a
timeseries, we should define a storage group using SET STORAGE GROUP first, and
here is an example:
-
-```
-IoTDB> SET STORAGE GROUP TO root.ln
-```
-
-We can also use SHOW STORAGE GROUP to check the storage group being created:
-
-```
-IoTDB> SHOW STORAGE GROUP
-+-----------------------------------+
-| Storage Group|
-+-----------------------------------+
-| root.ln|
-+-----------------------------------+
-storage group number = 1
-```
-
-After the storage group is set, we can use CREATE TIMESERIES to create a new
timeseries. When creating a timeseries, we should define its data type and the
encoding scheme. Here We create two timeseries:
-
-```
-IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.status WITH DATATYPE=BOOLEAN,
ENCODING=PLAIN
-IoTDB> CREATE TIMESERIES root.ln.wf01.wt01.temperature WITH DATATYPE=FLOAT,
ENCODING=RLE
-```
-
-In order to query the specific timeseries, we can use SHOW TIMESERIES <Path>.
<Path> represent the location of the timeseries. The default value is "null",
which queries all the timeseries in the system(the same as using "SHOW
TIMESERIES root"). Here are some examples:
-
-1. Querying all timeseries in the system:
-
-```
-IoTDB> SHOW TIMESERIES
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-| timeseries | alias|storage
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-| root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN|
SNAPPY|null| null|
-| root.ln.wf01.wt01.temperature| null| root.ln| FLOAT| RLE|
SNAPPY|null| null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 2
-```
-
-2. Querying a specific timeseries(root.ln.wf01.wt01.status):
-
-```
-IoTDB> SHOW TIMESERIES root.ln.wf01.wt01.status
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-| timeseries | alias|storage
group|dataType|encoding|compression|tags|attributes|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-| root.ln.wf01.wt01.status| null| root.ln| BOOLEAN| PLAIN|
SNAPPY|null| null|
-+-------------------------------+------+-------------+--------+--------+-----------+----+----------+
-Total timeseries number = 1
-```
-
-Insert timeseries data is a basic operation of IoTDB, you can use ‘INSERT’
command to finish this. Before insertion, you should assign the timestamp and
the suffix path name:
-
-```
-IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status) values(100,true);
-IoTDB> INSERT INTO root.ln.wf01.wt01(timestamp,status,temperature)
values(200,false,20.71)
-```
-
-The data that you have just inserted will display as follows:
-
-```
-IoTDB> SELECT status FROM root.ln.wf01.wt01
-+-----------------------+------------------------+
-| Time|root.ln.wf01.wt01.status|
-+-----------------------+------------------------+
-|1970-01-01T08:00:00.100| true|
-|1970-01-01T08:00:00.200| false|
-+-----------------------+------------------------+
-Total line number = 2
-```
-
-You can also query several timeseries data using one SQL statement:
-
-```
-IoTDB> SELECT * FROM root.ln.wf01.wt01
-+-----------------------+--------------------------+-----------------------------+
-| Time|
root.ln.wf01.wt01.status|root.ln.wf01.wt01.temperature|
-+-----------------------+--------------------------+-----------------------------+
-|1970-01-01T08:00:00.100| true|
null|
-|1970-01-01T08:00:00.200| false|
20.71|
-+-----------------------+--------------------------+-----------------------------+
-Total line number = 2
-```
-
-The commands to exit the Cli are:
-
-```
-IoTDB> quit
-or
-IoTDB> exit
-```
-
-For more information about the commands supported by IoTDB SQL, please see
[SQL
Reference](http://iotdb.apache.org/UserGuide/Master/Operation%20Manual/SQL%20Reference.html).
-
-### Stop IoTDB
-
-The server can be stopped with "ctrl-C" or the following script:
-
-```
-# Unix/OS X
-> sbin/stop-server.sh
-
-# Windows
-> sbin\stop-server.bat
-```
-
-## Only build server
-
-Under the root path of iotdb:
-
-```
-> mvn clean package -pl server -am -DskipTests
-```
-
-After being built, the IoTDB server is located at the folder:
"server/target/iotdb-server-{project.version}".
-
-
-## Only build cli
-
-Under the root path of iotdb:
-
-```
-> mvn clean package -pl cli -am -DskipTests
-```
-
-After being built, the IoTDB cli is located at the folder
"cli/target/iotdb-cli-{project.version}".
-
-# Usage of CSV Import and Export Tool
-
-see [Usage of CSV Import and Export
Tool](https://iotdb.apache.org/UserGuide/Master/System%20Tools/CSV%20Tool.html)
-
-# Frequent Questions for Compiling
-see [Frequent Questions when Compiling the Source
Code](https://iotdb.apache.org/Development/ContributeGuide.html#_Frequent-Questions-when-Compiling-the-Source-Code)
-
-# Contact Us
-### QQ Group
-
-* Apache IoTDB User Group: 659990460
-
-### Wechat Group
-* Add friend: tietouqiao, and then we'll invite you to the group.
+The tuning server should be started before the database, which is
"separation_py/SeparationServer.py". The default IP is "127.0.0.1", and the
default port is "8989".
-see [Join the community](https://github.com/apache/iotdb/issues/1995) for more!
+When running IoTDB, a tuning client would be started, which is
org.apache.iotdb.db.separation.statistics.SeparationTuningClient. It will
constantly send the collected delay samples to the server and tune the
compaction policy accordingly.
\ No newline at end of file
diff --git a/server/src/assembly/resources/conf/iotdb-engine.properties
b/server/src/assembly/resources/conf/iotdb-engine.properties
index f5c0c2f..f0ea158 100644
--- a/server/src/assembly/resources/conf/iotdb-engine.properties
+++ b/server/src/assembly/resources/conf/iotdb-engine.properties
@@ -314,10 +314,14 @@ base_file_size=2097152
file_size_rate=2
-max_level_num=10
+max_level_num=2
enable_separation_tuning=true
+delay_num = 10000
+
+total_capacity=512
+
# Works when the compaction_strategy is LEVEL_COMPACTION.
# Whether to merge unseq files into seq files or not.
# enable_unseq_compaction=true
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
index 4686194..6a083d7 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java
@@ -266,17 +266,11 @@ public class IoTDBConfig {
private String indexRootFolder = "data" + File.separator + "index";
/** When a TsFile's file size (in byte) exceed this, the TsFile is forced
closed. */
- private long tsFileSizeThreshold = 1L;
+ private long tsFileSizeThreshold = 0L;
/** When a memTable's size (in byte) exceeds this, the memtable is flushed
to disk. */
private long memtableSizeThreshold = 100000000 * 1024 * 1024L;
- /** When average series point number reaches this, flush the memtable to
disk */
- private int avgSeqSeriesPointNumberThreshold = 2560;
-
- /** When average series point number reaches this, flush the memtable to
disk */
- private int avgUnseqSeriesPointNumberThreshold = 2560;
-
/**
* Work when tsfile_manage_strategy is level_strategy. When merge point
number reaches this, merge
* the files to the last level. During a merge, if a chunk with less number
of chunks than this
@@ -294,9 +288,19 @@ public class IoTDBConfig {
/** LEVEL_COMPACTION, NO_COMPACTION */
private CompactionStrategy compactionStrategy =
CompactionStrategy.TRADITIONAL_LEVEL_COMPACTION;
+ private boolean isSeparate = true;
+ private int delayNum = 10000;
+ private int totalCapacity = 512;
+
private long baseFileSize = 2 * 1024 * 1024L;
private int fileSizeRate = 5;
- private int maxLevelNum = 10;
+ private int maxLevelNum = 2;
+
+ /** When average series point number reaches this, flush the memtable to
disk */
+ private int avgSeqSeriesPointNumberThreshold = totalCapacity / 2;
+
+ /** When average series point number reaches this, flush the memtable to
disk */
+ private int avgUnseqSeriesPointNumberThreshold = totalCapacity / 2;
/**
* Works when the compaction_strategy is LEVEL_COMPACTION. Whether to merge
unseq files into seq
@@ -1442,6 +1446,22 @@ public class IoTDBConfig {
this.compactionStrategy = compactionStrategy;
}
+ public boolean isSeparate() {
+ return isSeparate;
+ }
+
+ public void setSeparate(boolean separate) {
+ isSeparate = separate;
+ }
+
+ public int getDelayNum() {
+ return this.delayNum;
+ }
+
+ public void setDelayNum(int delayNum) {
+ this.delayNum = delayNum;
+ }
+
public long getBaseFileSize() {
return baseFileSize;
}
@@ -1881,6 +1901,14 @@ public class IoTDBConfig {
this.dfsClientFailoverProxyProvider = dfsClientFailoverProxyProvider;
}
+ public int getTotalCapacity() {
+ return totalCapacity;
+ }
+
+ public void setTotalCapacity(int total_capacity) {
+ this.totalCapacity = total_capacity;
+ }
+
boolean isUseKerberos() {
return useKerberos;
}
diff --git a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
index 95e178f..43a5c66 100644
--- a/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
+++ b/server/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java
@@ -344,6 +344,14 @@ public class IoTDBDescriptor {
properties.getProperty(
"enable_separation_tuning",
Boolean.toString(conf.isEnableSeparationTuning()))));
+ conf.setTotalCapacity(
+ Integer.parseInt(
+ properties.getProperty("total_capacity",
Integer.toString(conf.getTotalCapacity()))));
+
+ conf.setDelayNum(
+ Integer.parseInt(
+ properties.getProperty("delay_num",
Integer.toString(conf.getDelayNum()))));
+
conf.setEnableContinuousCompaction(
Boolean.parseBoolean(
properties.getProperty(
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/compaction/level/TraditionalLevelCompactionTsFileManagement.java
b/server/src/main/java/org/apache/iotdb/db/engine/compaction/level/TraditionalLevelCompactionTsFileManagement.java
index 94a5da8..fb36d37 100644
---
a/server/src/main/java/org/apache/iotdb/db/engine/compaction/level/TraditionalLevelCompactionTsFileManagement.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/compaction/level/TraditionalLevelCompactionTsFileManagement.java
@@ -428,6 +428,31 @@ public class TraditionalLevelCompactionTsFileManagement
extends TsFileManagement
public void forkCurrentFileList(long timePartition) {
readLock();
try {
+ // separate and has data in 1 level unseq part
+ if (IoTDBDescriptor.getInstance().getConfig().isSeparate()
+ && unSequenceTsFileResources.get(timePartition).get(1).size() > 0) {
+ for (TsFileResource tsFileResource :
unSequenceTsFileResources.get(timePartition).get(1)) {
+ sequenceTsFileResources
+ .computeIfAbsent(timePartition, this::newSequenceTsFileResources)
+ .get(0)
+ .add(tsFileResource);
+ }
+ unSequenceTsFileResources.get(timePartition).get(1).clear();
+ }
+ // separate and has data in seq part
+ else if (!IoTDBDescriptor.getInstance().getConfig().isSeparate() &&
!isEmpty(true)) {
+ List<SortedSet<TsFileResource>> sequenceTimePartitionTsFileResources =
+ sequenceTsFileResources.get(timePartition);
+ for (SortedSet<TsFileResource> tsFileResources :
sequenceTimePartitionTsFileResources) {
+ for (TsFileResource tsFileResource : tsFileResources) {
+ unSequenceTsFileResources
+ .computeIfAbsent(timePartition,
this::newUnSequenceTsFileResources)
+ .get(1)
+ .add(tsFileResource);
+ }
+ tsFileResources.clear();
+ }
+ }
forkTsFileList(
forkedSequenceTsFileResources,
sequenceTsFileResources.computeIfAbsent(timePartition,
this::newSequenceTsFileResources));
@@ -460,14 +485,18 @@ public class TraditionalLevelCompactionTsFileManagement
extends TsFileManagement
@Override
protected void merge(long timePartition) {
isMergeExecutedInCurrentTask = false;
- if (enableUnseqCompaction && forkedUnSequenceTsFileResources.get(0).size()
> 0) {
- List<TsFileResource> unseqFiles = new ArrayList<>();
- unseqFiles.add(forkedUnSequenceTsFileResources.get(0).get(0));
- isMergeExecutedInCurrentTask =
- merge(
- new
ArrayList<>(sequenceTsFileResources.get(timePartition).get(0)),
- unseqFiles,
- timePartition);
+ if (IoTDBDescriptor.getInstance().getConfig().isSeparate()) {
+ if (enableUnseqCompaction &&
forkedUnSequenceTsFileResources.get(0).size() > 0) {
+ List<TsFileResource> unseqFiles = new ArrayList<>();
+ unseqFiles.add(forkedUnSequenceTsFileResources.get(0).get(0));
+ isMergeExecutedInCurrentTask =
+ merge(
+ new
ArrayList<>(sequenceTsFileResources.get(timePartition).get(0)),
+ unseqFiles,
+ timePartition);
+ }
+ } else {
+ isMergeExecutedInCurrentTask = merge(forkedUnSequenceTsFileResources,
timePartition);
}
}
@@ -505,38 +534,7 @@ public class TraditionalLevelCompactionTsFileManagement
extends TsFileManagement
IMergeFileSelector fileSelector = getMergeFileSelector(budget,
mergeResource);
try {
List[] mergeFiles = fileSelector.select();
- if (mergeFiles.length == 0 || mergeFiles[0].size() == 0) {
- // writeLock();
- // try {
- // File newLevelFile =
- //
- //
TsFileResource.modifyTsFileNameMergeCnt(toMergeTsFile.getTsFile());
- // fsFactory.moveFile(toMergeTsFile.getTsFile(),
newLevelFile);
- // fsFactory.moveFile(
- // fsFactory.getFile(
- // toMergeTsFile.getTsFile().getAbsolutePath()
- // + TsFileResource.RESOURCE_SUFFIX),
- // fsFactory.getFile(
- // newLevelFile.getAbsolutePath() +
- // TsFileResource.RESOURCE_SUFFIX));
- // if (toMergeTsFile.getModFile().exists()) {
- // fsFactory.moveFile(
- //
fsFactory.getFile(toMergeTsFile.getModFile().getFilePath()),
- // fsFactory.getFile(
- // newLevelFile.getAbsolutePath() +
- // ModificationFile.FILE_SUFFIX));
- // }
- // toMergeTsFile.setFile(newLevelFile);
- // sequenceTsFileResources.get(timePartition).get(i +
- // 1).add(toMergeTsFile);
- // deleteLevelFile(timePartition, toMergeTsFile, i,
true);
- // if (mergeResources.size() > i + 1) {
- // mergeResources.get(i + 1).add(toMergeTsFile);
- // }
- // } finally {
- // writeUnlock();
- // }
- } else {
+ if (mergeFiles.length != 0 && mergeFiles[0].size() != 0) {
List<TsFileResource> selectedSeqResources =
mergeResource.getSeqFiles();
List<TsFileResource> selectedUnseqResources =
mergeResource.getUnseqFiles();
List<TsFileResource> sourceResources = new
ArrayList<>(selectedSeqResources);
@@ -574,6 +572,7 @@ public class TraditionalLevelCompactionTsFileManagement
extends TsFileManagement
logger.error("{} cannot select file for merge", storageGroupName, e);
return false;
}
+
} catch (Exception e) {
restoreCompaction();
logger.error("Error occurred in Compaction Merge thread", e);
@@ -588,6 +587,133 @@ public class TraditionalLevelCompactionTsFileManagement
extends TsFileManagement
return isMergeExecutedInCurrentTask;
}
+ private long getFileSizeThreshold(int levelIndex) {
+ long result = BASE_FILE_SIZE;
+ for (int i = 0; i < levelIndex; i++) {
+ result *= FILE_SIZE_RATE;
+ }
+ return result;
+ }
+
+ @SuppressWarnings("squid:S3776")
+ private boolean merge(List<List<TsFileResource>> mergeResources, long
timePartition) {
+ long startTimeMillis = System.currentTimeMillis();
+ // whether execute merge chunk in the loop below
+ boolean isMergeExecutedInCurrentTask = false;
+ try {
+ logger.info("{} start to filter compaction condition", storageGroupName);
+ for (int i = 0; i < MAX_LEVEL_NUM - 1; i++) {
+ List<TsFileResource> currLevelTsFileResource = mergeResources.get(i);
+ long currTotalFileSize = 0L;
+ for (TsFileResource tsFileResource : currLevelTsFileResource) {
+ currTotalFileSize += tsFileResource.getTsFileSize();
+ }
+ if (currTotalFileSize >= getFileSizeThreshold(i)) {
+ // just merge part of the file
+ isMergeExecutedInCurrentTask = true;
+ // log source file list and target file for recover
+ TsFileResource toMergeTsFile = currLevelTsFileResource.get(0);
+ logger.info(
+ "{} [Compaction] merge TsFile {} to next level",
+ storageGroupName,
+ toMergeTsFile.getTsFile().getName());
+ long budget =
IoTDBDescriptor.getInstance().getConfig().getMergeMemoryBudget();
+ long timeLowerBound = System.currentTimeMillis() - Long.MAX_VALUE;
+ List<TsFileResource> unSeqMergeList = new ArrayList<>();
+ unSeqMergeList.add(toMergeTsFile);
+ MergeResource mergeResource =
+ new MergeResource(mergeResources.get(i + 1), unSeqMergeList,
timeLowerBound);
+ IMergeFileSelector fileSelector = getMergeFileSelector(budget,
mergeResource);
+ try {
+ List[] mergeFiles = fileSelector.select();
+ if (mergeFiles.length == 0 || mergeFiles[0].size() == 0 ||
mergeFiles[1].size() == 0) {
+ writeLock();
+ try {
+ File newLevelFile =
+
TsFileResource.modifyTsFileNameMergeCnt(toMergeTsFile.getTsFile());
+ fsFactory.moveFile(toMergeTsFile.getTsFile(), newLevelFile);
+ fsFactory.moveFile(
+ fsFactory.getFile(
+ toMergeTsFile.getTsFile().getAbsolutePath()
+ + TsFileResource.RESOURCE_SUFFIX),
+ fsFactory.getFile(
+ newLevelFile.getAbsolutePath() +
TsFileResource.RESOURCE_SUFFIX));
+ if (toMergeTsFile.getModFile().exists()) {
+ fsFactory.moveFile(
+
fsFactory.getFile(toMergeTsFile.getModFile().getFilePath()),
+ fsFactory.getFile(
+ newLevelFile.getAbsolutePath() +
ModificationFile.FILE_SUFFIX));
+ }
+ toMergeTsFile.setFile(newLevelFile);
+ unSequenceTsFileResources.get(timePartition).get(i +
1).add(toMergeTsFile);
+ deleteLevelFile(timePartition, toMergeTsFile, i, false);
+ if (mergeResources.size() > i + 1) {
+ mergeResources.get(i + 1).add(toMergeTsFile);
+ }
+ } finally {
+ writeUnlock();
+ }
+ } else {
+ List<TsFileResource> seqResources = mergeResource.getSeqFiles();
+ List<TsFileResource> unseqResources =
mergeResource.getUnseqFiles();
+ List<TsFileResource> sourceResources = new
ArrayList<>(seqResources);
+ sourceResources.addAll(unseqResources);
+ File newLevelFile =
+
TsFileResource.modifyTsFileNameMergeCnt(mergeResources.get(i).get(0).getTsFile());
+ TsFileResource newResource = new TsFileResource(newLevelFile);
+ List<TsFileResource> targetTsFileResources =
+ CompactionSeparateFileUtils.mergeWithFileSeparate(
+ newResource, sourceResources, storageGroupName);
+ logger.info(
+ "{} [Compaction] merged level-{}'s {} TsFiles to next
level's {} TsFiles, and start to delete old files",
+ storageGroupName,
+ i,
+ unseqResources.size(),
+ targetTsFileResources.size());
+ writeLock();
+ try {
+ if (Thread.currentThread().isInterrupted()) {
+ throw new InterruptedException(
+ String.format("%s [Compaction] abort",
storageGroupName));
+ }
+ unSequenceTsFileResources
+ .get(timePartition)
+ .get(i + 1)
+ .addAll(targetTsFileResources);
+ deleteLevelFilesInList(timePartition, unSeqMergeList, i,
false);
+ deleteLevelFilesInList(timePartition, seqResources, i + 1,
false);
+ if (mergeResources.size() > i + 1) {
+ mergeResources.get(i + 1).removeAll(seqResources);
+ mergeResources.get(i + 1).addAll(targetTsFileResources);
+ }
+ } catch (InterruptedException interruptedException) {
+ interruptedException.printStackTrace();
+ } finally {
+ writeUnlock();
+ }
+ deleteLevelFilesInDisk(sourceResources);
+ }
+ // avoid pending tasks holds the metadata and streams
+ mergeResource.clear();
+ } catch (MergeException | IOException e) {
+ logger.error("{} cannot select file for merge", storageGroupName,
e);
+ return false;
+ }
+ }
+ }
+ } catch (Exception e) {
+ logger.error("Error occurred in Compaction Merge thread", e);
+ } finally {
+ // reset the merge working state to false
+ logger.info(
+ "{} [Compaction] merge end time isSeq = {}, consumption: {} ms",
+ storageGroupName,
+ false,
+ System.currentTimeMillis() - startTimeMillis);
+ }
+ return isMergeExecutedInCurrentTask;
+ }
+
private List<SortedSet<TsFileResource>> newSequenceTsFileResources(Long k) {
List<SortedSet<TsFileResource>> newSequenceTsFileResources = new
ArrayList<>();
for (int i = 0; i < MAX_LEVEL_NUM; i++) {
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/compaction/utils/CompactionSeparateFileUtils.java
b/server/src/main/java/org/apache/iotdb/db/engine/compaction/utils/CompactionSeparateFileUtils.java
index 4c43ed5..254af0a 100644
---
a/server/src/main/java/org/apache/iotdb/db/engine/compaction/utils/CompactionSeparateFileUtils.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/compaction/utils/CompactionSeparateFileUtils.java
@@ -166,7 +166,16 @@ public class CompactionSeparateFileUtils {
.updateEndTime(device, timeValuePair.getTimestamp());
currentWrittenPointNum++;
- if (currentWrittenPointNum >= AVG_SERIES_POINT_NUMBER) {
+ int pointNumThreshold =
+ IoTDBDescriptor.getInstance().getConfig().isSeparate()
+ ?
IoTDBDescriptor.getInstance().getConfig().getAvgSeqSeriesPointNumberThreshold()
+ + IoTDBDescriptor.getInstance()
+ .getConfig()
+ .getAvgUnseqSeriesPointNumberThreshold()
+ : IoTDBDescriptor.getInstance()
+ .getConfig()
+ .getAvgUnseqSeriesPointNumberThreshold();
+ if (currentWrittenPointNum >= pointNumThreshold) {
chunkWriter.writeToFileWriter(writer);
writer.endChunkGroup();
for (TsFileResource tsFileResource : tsFileResources) {
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
b/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
index d98d984..c0d751a 100644
---
a/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
@@ -51,10 +51,6 @@ public abstract class AbstractMemTable implements IMemTable {
protected boolean disableMemControl = true;
private boolean shouldFlush = false;
- private int avgSeqSeriesPointNumThreshold =
-
IoTDBDescriptor.getInstance().getConfig().getAvgSeqSeriesPointNumberThreshold();
- private int avgUnseqSeriesPointNumThreshold =
-
IoTDBDescriptor.getInstance().getConfig().getAvgUnseqSeriesPointNumberThreshold();
/** memory size of data points, including TEXT values */
private long memSize = 0;
@@ -108,9 +104,11 @@ public abstract class AbstractMemTable implements
IMemTable {
k -> {
seriesNumber++;
if (isSequence) {
- totalPointsNumThreshold += avgSeqSeriesPointNumThreshold;
+ totalPointsNumThreshold +=
+
IoTDBDescriptor.getInstance().getConfig().getAvgSeqSeriesPointNumberThreshold();
} else {
- totalPointsNumThreshold += avgUnseqSeriesPointNumThreshold;
+ totalPointsNumThreshold +=
+
IoTDBDescriptor.getInstance().getConfig().getAvgUnseqSeriesPointNumberThreshold();
}
return genMemSeries(schema);
});
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
index e5eb45b..06f973b 100755
---
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessor.java
@@ -878,7 +878,12 @@ public class StorageGroupProcessor {
||
!IoTDBDescriptor.getInstance().getConfig().isEnableDiscardOutOfOrderData()) {
noFailure =
insertTabletToTsFileProcessor(
- insertTabletPlan, before, loc, isSequence, results,
beforeTimePartition)
+ insertTabletPlan,
+ before,
+ loc,
+ IoTDBDescriptor.getInstance().getConfig().isSeparate()
&& isSequence,
+ results,
+ beforeTimePartition)
&& noFailure;
}
// re initialize
@@ -915,7 +920,12 @@ public class StorageGroupProcessor {
||
!IoTDBDescriptor.getInstance().getConfig().isEnableDiscardOutOfOrderData())) {
noFailure =
insertTabletToTsFileProcessor(
- insertTabletPlan, before, loc, isSequence, results,
beforeTimePartition)
+ insertTabletPlan,
+ before,
+ loc,
+ IoTDBDescriptor.getInstance().getConfig().isSeparate() &&
isSequence,
+ results,
+ beforeTimePartition)
&& noFailure;
}
long globalLatestFlushedTime =
@@ -1085,6 +1095,20 @@ public class StorageGroupProcessor {
}
}
+ public void syncFlushAllMemtablesWhenChangeMode() throws IOException {
+ writeLock();
+ try {
+ // conventional mode should do not have seq memtable in memory
+ if (!IoTDBDescriptor.getInstance().getConfig().isSeparate()) {
+ for (TsFileProcessor tsFileProcessor :
workSequenceTsFileProcessors.values()) {
+ tsFileProcessor.syncFlush();
+ }
+ }
+ } finally {
+ writeUnlock();
+ }
+ }
+
public void submitAFlushTaskWhenShouldFlush(TsFileProcessor tsFileProcessor)
{
writeLock();
try {
@@ -1956,6 +1980,7 @@ public class StorageGroupProcessor {
"{} submit a compaction merge task",
logicalStorageGroupName + "-" + virtualStorageGroupId);
try {
+ syncFlushAllMemtablesWhenChangeMode(); // first check memtable
// fork and filter current tsfile, then commit then to compaction merge
tsFileManagement.forkCurrentFileList(timePartition);
tsFileManagement.setForceFullMerge(fullMerge);
@@ -2904,6 +2929,9 @@ public class StorageGroupProcessor {
}
latestTimeForEachDevice.computeIfAbsent(timePartitionId, l -> new
HashMap<>());
// insert to sequence or unSequence file
+ if (!IoTDBDescriptor.getInstance().getConfig().isSeparate()) {
+ isSequence = false; // if not separate, then write all data to
unSequence part
+ }
insertToTsFileProcessor(plan, isSequence, timePartitionId);
}
} finally {
diff --git
a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
index adb1924..3a8b98e 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
@@ -143,9 +143,7 @@ import
org.apache.iotdb.tsfile.write.writer.RestorableTsFileIOWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import java.io.BufferedReader;
import java.io.File;
-import java.io.FileReader;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -192,7 +190,6 @@ import static
org.apache.iotdb.db.conf.IoTDBConstant.FUNCTION_TYPE_EXTERNAL_UDTF
import static org.apache.iotdb.db.conf.IoTDBConstant.FUNCTION_TYPE_NATIVE;
import static org.apache.iotdb.db.conf.IoTDBConstant.QUERY_ID;
import static org.apache.iotdb.db.conf.IoTDBConstant.STATEMENT;
-import static org.apache.iotdb.db.service.IoTDB.delayQueue;
import static
org.apache.iotdb.tsfile.common.constant.TsFileConstant.TSFILE_SUFFIX;
@SuppressWarnings("java:S1135") // ignore todos
@@ -1235,8 +1232,7 @@ public class PlanExecutor implements IPlanExecutor {
// check whether types are match
getSeriesSchemas(insertRowPlan);
insertRowPlan.transferType();
-
- if(IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning()){
+ if
(IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning()) {
Collector.collect(insertRowPlan.getTime(), System.currentTimeMillis());
}
StorageEngine.getInstance().insert(insertRowPlan);
@@ -1253,7 +1249,7 @@ public class PlanExecutor implements IPlanExecutor {
if (IoTDBDescriptor.getInstance().getConfig().isEnableStatMonitor()) {
StatMonitor.getInstance().updateFailedStatValue();
}
-// throw e;
+ // throw e;
}
}
diff --git
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/Collector.java
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/Collector.java
index 9aee4c9..f167f9a 100644
---
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/Collector.java
+++
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/Collector.java
@@ -1,16 +1,14 @@
package org.apache.iotdb.db.separation.statistics;
-import org.python.core.Py;
-import org.python.core.PyObject;
-import org.python.util.PythonInterpreter;
-
-import java.util.Properties;
+import org.apache.iotdb.db.conf.IoTDBDescriptor;
import static org.apache.iotdb.db.service.IoTDB.delayQueue;
public class Collector {
public static void collect(Long generationTime, Long arrivalTime) {
- delayQueue.add((double)(arrivalTime - generationTime));
+ if (delayQueue.size() <=
IoTDBDescriptor.getInstance().getConfig().getDelayNum()) {
+ delayQueue.add((double) (arrivalTime - generationTime));
+ }
}
}
diff --git
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTuningClient.java
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTuningClient.java
index 652eb0a..f886a28 100644
---
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTuningClient.java
+++
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTuningClient.java
@@ -1,78 +1,87 @@
package org.apache.iotdb.db.separation.statistics;
import org.apache.iotdb.db.conf.IoTDBDescriptor;
+
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
-import static java.lang.Thread.sleep;
import static org.apache.iotdb.db.service.IoTDB.delayQueue;
-/**
- * @version V0.1.0
- * @Description: java thrift 客户端
- * @see
- * @since 2016-06-01
- */
public class SeparationTuningClient implements Runnable {
- SeparationTunningService.Client client;
- TTransport transport;
- TProtocol protocol;
- private double rs = -1;
- private double rc = -1;
- private int secSize = -1;
+ SeparationTunningService.Client client;
+ TTransport transport;
+ TProtocol protocol;
- private void tune(double estimatedRc, double estimatedRs, int recSeqSize) {
- if (estimatedRc > estimatedRs) {
- if ((rs == -1 && rc == -1 && secSize == -1) || rc < rs) {
- rc = estimatedRc;
- rs = estimatedRs;
- secSize = recSeqSize;
- } else if (secSize != recSeqSize) {
- // do nothing
- }
+ private double rs = -1;
+ private double rc = -1;
+ private int seqSize = -1;
+ private int totalSize =
+ IoTDBDescriptor.getInstance().getConfig().getTotalCapacity();
- } else {
- if ((rs == -1 && rc == -1 && secSize == -1) || rc <= rs) {
- // do nothing
- } else {
- rc = estimatedRc;
- rs = estimatedRs;
- secSize = recSeqSize;
- }
- }
- }
+ private void tune(double estimatedRc, double estimatedRs, int recSeqSize) {
+ System.out.println("print total size:" + totalSize);
+ if (estimatedRc > estimatedRs) {
+ if ((rs == -1 && rc == -1 && seqSize == -1) || rc < rs) {
+ IoTDBDescriptor.getInstance()
+ .getConfig()
+ .setSeparate(
+ true); // only set param here, real migrate logic will be
complete at the start of
+ // compaction
+
IoTDBDescriptor.getInstance().getConfig().setAvgSeqSeriesPointNumberThreshold(recSeqSize);
+ IoTDBDescriptor.getInstance()
+ .getConfig()
+ .setAvgUnseqSeriesPointNumberThreshold(totalSize - recSeqSize);
+ rc = estimatedRc;
+ rs = estimatedRs;
+ seqSize = recSeqSize;
+ } else if (seqSize != recSeqSize) {
+
IoTDBDescriptor.getInstance().getConfig().setAvgSeqSeriesPointNumberThreshold(recSeqSize);
+ IoTDBDescriptor.getInstance()
+ .getConfig()
+ .setAvgUnseqSeriesPointNumberThreshold(totalSize - recSeqSize);
+ }
- @Override
- public void run() {
- if
(!IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning()) {
- return;
- }
- try {
- System.out.println("thrift client connext server at 8989 port ");
- transport = new TSocket("127.0.0.1", 8989);
- protocol = new TBinaryProtocol(transport);
- client = new SeparationTunningService.Client(protocol);
- transport.open();
- while (true) {
- sleep(1000);
- if (delayQueue.size() != 0) {
- String result = client.writeDelay(delayQueue.poll());
- String[] vals = result.split(",");
- double estimatedRc = Double.parseDouble(vals[0]);
- double estimatedRs = Double.parseDouble(vals[1]);
- int recSeqSize = Integer.parseInt(vals[2]);
- tune(estimatedRc, estimatedRs, recSeqSize);
- }
- }
+ } else {
+ if ((rs == -1 && rc == -1 && seqSize == -1) || rc <= rs) {
+ // do nothing
+ } else {
+ IoTDBDescriptor.getInstance().getConfig().setSeparate(false);
+
IoTDBDescriptor.getInstance().getConfig().setAvgSeqSeriesPointNumberThreshold(0);
+
IoTDBDescriptor.getInstance().getConfig().setAvgUnseqSeriesPointNumberThreshold(totalSize);
+ rc = estimatedRc;
+ rs = estimatedRs;
+ seqSize = recSeqSize;
+ }
+ }
+ }
- } catch (TException e) {
- e.printStackTrace();
- } catch (InterruptedException e) {
- e.printStackTrace();
+ @Override
+ public void run() {
+ if (!IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning())
{
+ return;
+ }
+ try {
+ transport = new TSocket("127.0.0.1", 8989);
+ protocol = new TBinaryProtocol(transport);
+ client = new SeparationTunningService.Client(protocol);
+ transport.open();
+ while (true) {
+ if (delayQueue.size() != 0) {
+ Double d = delayQueue.poll();
+ String result = client.writeDelay(d);
+ String[] vals = result.split(",");
+ double estimatedRc = Double.parseDouble(vals[0]);
+ double estimatedRs = Double.parseDouble(vals[1]);
+ int recSeqSize = Integer.parseInt(vals[2]);
+ tune(estimatedRc, estimatedRs, recSeqSize);
}
+ }
+ } catch (TException e) {
+ e.printStackTrace();
}
-}
\ No newline at end of file
+ }
+}
diff --git
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTunningService.java
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTunningService.java
index 14ebca6..ae88006 100644
---
a/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTunningService.java
+++
b/server/src/main/java/org/apache/iotdb/db/separation/statistics/SeparationTunningService.java
@@ -3,102 +3,130 @@ package org.apache.iotdb.db.separation.statistics;
/**
* Autogenerated by Thrift Compiler (0.16.0)
*
- * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- * @generated
+ * <p>DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *
+ * @generated
*/
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
[email protected](value = "Autogenerated by Thrift Compiler
(0.16.0)", date = "2022-03-07")
[email protected](
+ value = "Autogenerated by Thrift Compiler (0.16.0)",
+ date = "2022-03-07")
public class SeparationTunningService {
public interface Iface {
public String writeDelay(double delay) throws org.apache.thrift.TException;
-
}
public interface AsyncIface {
- public void writeDelay(double delay,
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws
org.apache.thrift.TException;
-
+ public void writeDelay(
+ double delay, org.apache.thrift.async.AsyncMethodCallback<String>
resultHandler)
+ throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient
implements Iface {
public static class Factory implements
org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
+
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
- public Client getClient(org.apache.thrift.protocol.TProtocol iprot,
org.apache.thrift.protocol.TProtocol oprot) {
+
+ public Client getClient(
+ org.apache.thrift.protocol.TProtocol iprot,
org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
}
- public Client(org.apache.thrift.protocol.TProtocol prot)
- {
+ public Client(org.apache.thrift.protocol.TProtocol prot) {
super(prot, prot);
}
- public Client(org.apache.thrift.protocol.TProtocol iprot,
org.apache.thrift.protocol.TProtocol oprot) {
+ public Client(
+ org.apache.thrift.protocol.TProtocol iprot,
org.apache.thrift.protocol.TProtocol oprot) {
super(iprot, oprot);
}
- public String writeDelay(double delay) throws org.apache.thrift.TException
- {
+ public String writeDelay(double delay) throws org.apache.thrift.TException
{
send_writeDelay(delay);
return recv_writeDelay();
}
- public void send_writeDelay(double delay) throws
org.apache.thrift.TException
- {
+ public void send_writeDelay(double delay) throws
org.apache.thrift.TException {
writeDelay_args args = new writeDelay_args();
args.setDelay(delay);
sendBase("writeDelay", args);
}
- public String recv_writeDelay() throws org.apache.thrift.TException
- {
+ public String recv_writeDelay() throws org.apache.thrift.TException {
writeDelay_result result = new writeDelay_result();
receiveBase(result, "writeDelay");
if (result.isSetSuccess()) {
return result.success;
}
- throw new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT,
"writeDelay failed: unknown result");
+ throw new org.apache.thrift.TApplicationException(
+ org.apache.thrift.TApplicationException.MISSING_RESULT,
+ "writeDelay failed: unknown result");
}
-
}
- public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
implements AsyncIface {
- public static class Factory implements
org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
+
+ public static class AsyncClient extends org.apache.thrift.async.TAsyncClient
+ implements AsyncIface {
+ public static class Factory
+ implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
private org.apache.thrift.async.TAsyncClientManager clientManager;
private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
- public Factory(org.apache.thrift.async.TAsyncClientManager
clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
+
+ public Factory(
+ org.apache.thrift.async.TAsyncClientManager clientManager,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
- public AsyncClient
getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
+
+ public AsyncClient getAsyncClient(
+ org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
}
- public AsyncClient(org.apache.thrift.protocol.TProtocolFactory
protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager,
org.apache.thrift.transport.TNonblockingTransport transport) {
+ public AsyncClient(
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.async.TAsyncClientManager clientManager,
+ org.apache.thrift.transport.TNonblockingTransport transport) {
super(protocolFactory, clientManager, transport);
}
- public void writeDelay(double delay,
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws
org.apache.thrift.TException {
+ public void writeDelay(
+ double delay, org.apache.thrift.async.AsyncMethodCallback<String>
resultHandler)
+ throws org.apache.thrift.TException {
checkReady();
- writeDelay_call method_call = new writeDelay_call(delay, resultHandler,
this, ___protocolFactory, ___transport);
+ writeDelay_call method_call =
+ new writeDelay_call(delay, resultHandler, this, ___protocolFactory,
___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
public static class writeDelay_call extends
org.apache.thrift.async.TAsyncMethodCall<String> {
private double delay;
- public writeDelay_call(double delay,
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler,
org.apache.thrift.async.TAsyncClient client,
org.apache.thrift.protocol.TProtocolFactory protocolFactory,
org.apache.thrift.transport.TNonblockingTransport transport) throws
org.apache.thrift.TException {
+
+ public writeDelay_call(
+ double delay,
+ org.apache.thrift.async.AsyncMethodCallback<String> resultHandler,
+ org.apache.thrift.async.TAsyncClient client,
+ org.apache.thrift.protocol.TProtocolFactory protocolFactory,
+ org.apache.thrift.transport.TNonblockingTransport transport)
+ throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.delay = delay;
}
- public void write_args(org.apache.thrift.protocol.TProtocol prot) throws
org.apache.thrift.TException {
- prot.writeMessageBegin(new
org.apache.thrift.protocol.TMessage("writeDelay",
org.apache.thrift.protocol.TMessageType.CALL, 0));
+ public void write_args(org.apache.thrift.protocol.TProtocol prot)
+ throws org.apache.thrift.TException {
+ prot.writeMessageBegin(
+ new org.apache.thrift.protocol.TMessage(
+ "writeDelay", org.apache.thrift.protocol.TMessageType.CALL,
0));
writeDelay_args args = new writeDelay_args();
args.setDelay(delay);
args.write(prot);
@@ -109,30 +137,51 @@ public class SeparationTunningService {
if (getState() != State.RESPONSE_READ) {
throw new IllegalStateException("Method call not finished!");
}
- org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
- org.apache.thrift.protocol.TProtocol prot =
client.getProtocolFactory().getProtocol(memoryTransport);
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport =
+ new
org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot =
+ client.getProtocolFactory().getProtocol(memoryTransport);
return (new Client(prot)).recv_writeDelay();
}
}
-
}
- public static class Processor<I extends Iface> extends
org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final org.slf4j.Logger _LOGGER =
org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
- public Processor(I iface) {
- super(iface, getProcessMap(new java.util.HashMap<String,
org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
- }
+ public static class Processor<I extends Iface> extends
org.apache.thrift.TBaseProcessor<I>
+ implements org.apache.thrift.TProcessor {
+ private static final org.slf4j.Logger _LOGGER =
+ org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
- protected Processor(I iface, java.util.Map<String,
org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
processMap) {
+ public Processor(I iface) {
+ super(
+ iface,
+ getProcessMap(
+ new java.util.HashMap<
+ String,
+ org.apache.thrift.ProcessFunction<I, ? extends
org.apache.thrift.TBase>>()));
+ }
+
+ protected Processor(
+ I iface,
+ java.util.Map<
+ String, org.apache.thrift.ProcessFunction<I, ? extends
org.apache.thrift.TBase>>
+ processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> java.util.Map<String,
org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>
getProcessMap(java.util.Map<String, org.apache.thrift.ProcessFunction<I, ?
extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface>
+ java.util.Map<
+ String, org.apache.thrift.ProcessFunction<I, ? extends
org.apache.thrift.TBase>>
+ getProcessMap(
+ java.util.Map<
+ String,
+ org.apache.thrift.ProcessFunction<I, ? extends
org.apache.thrift.TBase>>
+ processMap) {
processMap.put("writeDelay", new writeDelay());
return processMap;
}
- public static class writeDelay<I extends Iface> extends
org.apache.thrift.ProcessFunction<I, writeDelay_args> {
+ public static class writeDelay<I extends Iface>
+ extends org.apache.thrift.ProcessFunction<I, writeDelay_args> {
public writeDelay() {
super("writeDelay");
}
@@ -150,31 +199,55 @@ public class SeparationTunningService {
return false;
}
- public writeDelay_result getResult(I iface, writeDelay_args args) throws
org.apache.thrift.TException {
+ public writeDelay_result getResult(I iface, writeDelay_args args)
+ throws org.apache.thrift.TException {
writeDelay_result result = new writeDelay_result();
result.success = iface.writeDelay(args.delay);
return result;
}
}
-
}
- public static class AsyncProcessor<I extends AsyncIface> extends
org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final org.slf4j.Logger _LOGGER =
org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
- public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new java.util.HashMap<String,
org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,
?>>()));
- }
+ public static class AsyncProcessor<I extends AsyncIface>
+ extends org.apache.thrift.TBaseAsyncProcessor<I> {
+ private static final org.slf4j.Logger _LOGGER =
+ org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
- protected AsyncProcessor(I iface, java.util.Map<String,
org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,
?>> processMap) {
+ public AsyncProcessor(I iface) {
+ super(
+ iface,
+ getProcessMap(
+ new java.util.HashMap<
+ String,
+ org.apache.thrift.AsyncProcessFunction<
+ I, ? extends org.apache.thrift.TBase, ?>>()));
+ }
+
+ protected AsyncProcessor(
+ I iface,
+ java.util.Map<
+ String,
+ org.apache.thrift.AsyncProcessFunction<I, ? extends
org.apache.thrift.TBase, ?>>
+ processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> java.util.Map<String,
org.apache.thrift.AsyncProcessFunction<I, ? extends
org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<String,
org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,
?>> processMap) {
+ private static <I extends AsyncIface>
+ java.util.Map<
+ String,
+ org.apache.thrift.AsyncProcessFunction<I, ? extends
org.apache.thrift.TBase, ?>>
+ getProcessMap(
+ java.util.Map<
+ String,
+ org.apache.thrift.AsyncProcessFunction<
+ I, ? extends org.apache.thrift.TBase, ?>>
+ processMap) {
processMap.put("writeDelay", new writeDelay());
return processMap;
}
- public static class writeDelay<I extends AsyncIface> extends
org.apache.thrift.AsyncProcessFunction<I, writeDelay_args, String> {
+ public static class writeDelay<I extends AsyncIface>
+ extends org.apache.thrift.AsyncProcessFunction<I, writeDelay_args,
String> {
public writeDelay() {
super("writeDelay");
}
@@ -183,14 +256,16 @@ public class SeparationTunningService {
return new writeDelay_args();
}
- public org.apache.thrift.async.AsyncMethodCallback<String>
getResultHandler(final
org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final
int seqid) {
+ public org.apache.thrift.async.AsyncMethodCallback<String>
getResultHandler(
+ final
org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb,
+ final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
return new org.apache.thrift.async.AsyncMethodCallback<String>() {
public void onComplete(String o) {
writeDelay_result result = new writeDelay_result();
result.success = o;
try {
- fcall.sendResponse(fb, result,
org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ fcall.sendResponse(fb, result,
org.apache.thrift.protocol.TMessageType.REPLY, seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame
buffer", e);
fb.close();
@@ -199,6 +274,7 @@ public class SeparationTunningService {
onError(e);
}
}
+
public void onError(Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
org.apache.thrift.TSerializable msg;
@@ -210,14 +286,16 @@ public class SeparationTunningService {
} else if (e instanceof org.apache.thrift.TApplicationException) {
_LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TApplicationException)e;
+ msg = (org.apache.thrift.TApplicationException) e;
} else {
_LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = new
org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR,
e.getMessage());
+ msg =
+ new org.apache.thrift.TApplicationException(
+ org.apache.thrift.TApplicationException.INTERNAL_ERROR,
e.getMessage());
}
try {
- fcall.sendResponse(fb,msg,msgType,seqid);
+ fcall.sendResponse(fb, msg, msgType, seqid);
} catch (Exception ex) {
_LOGGER.error("Exception writing to internal frame buffer", ex);
fb.close();
@@ -230,28 +308,44 @@ public class SeparationTunningService {
return false;
}
- public void start(I iface, writeDelay_args args,
org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws
org.apache.thrift.TException {
- iface.writeDelay(args.delay,resultHandler);
+ public void start(
+ I iface,
+ writeDelay_args args,
+ org.apache.thrift.async.AsyncMethodCallback<String> resultHandler)
+ throws org.apache.thrift.TException {
+ iface.writeDelay(args.delay, resultHandler);
}
}
-
}
- public static class writeDelay_args implements
org.apache.thrift.TBase<writeDelay_args, writeDelay_args._Fields>,
java.io.Serializable, Cloneable, Comparable<writeDelay_args> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("writeDelay_args");
+ public static class writeDelay_args
+ implements org.apache.thrift.TBase<writeDelay_args,
writeDelay_args._Fields>,
+ java.io.Serializable,
+ Cloneable,
+ Comparable<writeDelay_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("writeDelay_args");
- private static final org.apache.thrift.protocol.TField DELAY_FIELD_DESC =
new org.apache.thrift.protocol.TField("delay",
org.apache.thrift.protocol.TType.DOUBLE, (short)1);
+ private static final org.apache.thrift.protocol.TField DELAY_FIELD_DESC =
+ new org.apache.thrift.protocol.TField(
+ "delay", org.apache.thrift.protocol.TType.DOUBLE, (short) 1);
- private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new writeDelay_argsStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new writeDelay_argsTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY =
+ new writeDelay_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY =
+ new writeDelay_argsTupleSchemeFactory();
public double delay; // required
- /** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
+ /**
+ * The set of fields this struct contains, along with convenience methods
for finding and
+ * manipulating them.
+ */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- DELAY((short)1, "delay");
+ DELAY((short) 1, "delay");
- private static final java.util.Map<String, _Fields> byName = new
java.util.HashMap<String, _Fields>();
+ private static final java.util.Map<String, _Fields> byName =
+ new java.util.HashMap<String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -259,12 +353,10 @@ public class SeparationTunningService {
}
}
- /**
- * Find the _Fields constant that matches fieldId, or null if its not
found.
- */
+ /** Find the _Fields constant that matches fieldId, or null if its not
found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // DELAY
return DELAY;
default:
@@ -273,18 +365,16 @@ public class SeparationTunningService {
}
/**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
+ * Find the _Fields constant that matches fieldId, throwing an exception
if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " +
fieldId + " doesn't exist!");
+ if (fields == null)
+ throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
return fields;
}
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
+ /** Find the _Fields constant that matches name, or null if its not
found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(String name) {
return byName.get(name);
@@ -310,29 +400,33 @@ public class SeparationTunningService {
// isset id assignments
private static final int __DELAY_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData>
+ metaDataMap;
+
static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.DELAY, new
org.apache.thrift.meta_data.FieldMetaData("delay",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
=
+ new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(
+ _Fields.DELAY,
+ new org.apache.thrift.meta_data.FieldMetaData(
+ "delay",
+ org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(
+ org.apache.thrift.protocol.TType.DOUBLE)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeDelay_args.class,
metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
+ writeDelay_args.class, metaDataMap);
}
- public writeDelay_args() {
- }
+ public writeDelay_args() {}
- public writeDelay_args(
- double delay)
- {
+ public writeDelay_args(double delay) {
this();
this.delay = delay;
setDelayIsSet(true);
}
- /**
- * Performs a deep copy on <i>other</i>.
- */
+ /** Performs a deep copy on <i>other</i>. */
public writeDelay_args(writeDelay_args other) {
__isset_bitfield = other.__isset_bitfield;
this.delay = other.delay;
@@ -359,7 +453,8 @@ public class SeparationTunningService {
}
public void unsetDelay() {
- __isset_bitfield =
org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DELAY_ISSET_ID);
+ __isset_bitfield =
+ org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield,
__DELAY_ISSET_ID);
}
/** Returns true if field delay is set (has been assigned a value) and
false otherwise */
@@ -368,65 +463,62 @@ public class SeparationTunningService {
}
public void setDelayIsSet(boolean value) {
- __isset_bitfield =
org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DELAY_ISSET_ID,
value);
+ __isset_bitfield =
+ org.apache.thrift.EncodingUtils.setBit(__isset_bitfield,
__DELAY_ISSET_ID, value);
}
public void setFieldValue(_Fields field,
@org.apache.thrift.annotation.Nullable Object value) {
switch (field) {
- case DELAY:
- if (value == null) {
- unsetDelay();
- } else {
- setDelay((Double)value);
- }
- break;
-
+ case DELAY:
+ if (value == null) {
+ unsetDelay();
+ } else {
+ setDelay((Double) value);
+ }
+ break;
}
}
@org.apache.thrift.annotation.Nullable
public Object getFieldValue(_Fields field) {
switch (field) {
- case DELAY:
- return getDelay();
-
+ case DELAY:
+ return getDelay();
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been
assigned a value) and false otherwise */
+ /**
+ * Returns true if field corresponding to fieldID is set (has been
assigned a value) and false
+ * otherwise
+ */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
- case DELAY:
- return isSetDelay();
+ case DELAY:
+ return isSetDelay();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that instanceof writeDelay_args)
- return this.equals((writeDelay_args)that);
+ if (that instanceof writeDelay_args) return
this.equals((writeDelay_args) that);
return false;
}
public boolean equals(writeDelay_args that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
+ if (that == null) return false;
+ if (this == that) return true;
boolean this_present_delay = true;
boolean that_present_delay = true;
if (this_present_delay || that_present_delay) {
- if (!(this_present_delay && that_present_delay))
- return false;
- if (this.delay != that.delay)
- return false;
+ if (!(this_present_delay && that_present_delay)) return false;
+ if (this.delay != that.delay) return false;
}
return true;
@@ -467,11 +559,13 @@ public class SeparationTunningService {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws
org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws
org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
}
@@ -494,37 +588,45 @@ public class SeparationTunningService {
private void writeObject(java.io.ObjectOutputStream out) throws
java.io.IOException {
try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(out)));
+ write(
+ new org.apache.thrift.protocol.TCompactProtocol(
+ new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
- private void readObject(java.io.ObjectInputStream in) throws
java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, ClassNotFoundException {
try {
- // it doesn't seem like you should have to do this, but java
serialization is wacky, and doesn't call the default constructor.
+ // it doesn't seem like you should have to do this, but java
serialization is wacky, and
+ // doesn't call the default constructor.
__isset_bitfield = 0;
- read(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(in)));
+ read(
+ new org.apache.thrift.protocol.TCompactProtocol(
+ new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
- private static class writeDelay_argsStandardSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ private static class writeDelay_argsStandardSchemeFactory
+ implements org.apache.thrift.scheme.SchemeFactory {
public writeDelay_argsStandardScheme getScheme() {
return new writeDelay_argsStandardScheme();
}
}
- private static class writeDelay_argsStandardScheme extends
org.apache.thrift.scheme.StandardScheme<writeDelay_args> {
+ private static class writeDelay_argsStandardScheme
+ extends org.apache.thrift.scheme.StandardScheme<writeDelay_args> {
- public void read(org.apache.thrift.protocol.TProtocol iprot,
writeDelay_args struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot,
writeDelay_args struct)
+ throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true)
- {
+ while (true) {
schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
@@ -532,7 +634,7 @@ public class SeparationTunningService {
if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE)
{
struct.delay = iprot.readDouble();
struct.setDelayIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
break;
@@ -543,11 +645,13 @@ public class SeparationTunningService {
}
iprot.readStructEnd();
- // check for required fields of primitive type, which can't be checked
in the validate method
+ // check for required fields of primitive type, which can't be checked
in the validate
+ // method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot,
writeDelay_args struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot,
writeDelay_args struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -557,20 +661,23 @@ public class SeparationTunningService {
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
- private static class writeDelay_argsTupleSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ private static class writeDelay_argsTupleSchemeFactory
+ implements org.apache.thrift.scheme.SchemeFactory {
public writeDelay_argsTupleScheme getScheme() {
return new writeDelay_argsTupleScheme();
}
}
- private static class writeDelay_argsTupleScheme extends
org.apache.thrift.scheme.TupleScheme<writeDelay_args> {
+ private static class writeDelay_argsTupleScheme
+ extends org.apache.thrift.scheme.TupleScheme<writeDelay_args> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
writeDelay_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot,
writeDelay_args struct)
+ throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot =
+ (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetDelay()) {
optionals.set(0);
@@ -582,8 +689,10 @@ public class SeparationTunningService {
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot,
writeDelay_args struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot,
writeDelay_args struct)
+ throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot =
+ (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.delay = iprot.readDouble();
@@ -592,26 +701,43 @@ public class SeparationTunningService {
}
}
- private static <S extends org.apache.thrift.scheme.IScheme> S
scheme(org.apache.thrift.protocol.TProtocol proto) {
- return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ?
STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
+ org.apache.thrift.protocol.TProtocol proto) {
+ return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
+ ? STANDARD_SCHEME_FACTORY
+ : TUPLE_SCHEME_FACTORY)
+ .getScheme();
}
}
- public static class writeDelay_result implements
org.apache.thrift.TBase<writeDelay_result, writeDelay_result._Fields>,
java.io.Serializable, Cloneable, Comparable<writeDelay_result> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new
org.apache.thrift.protocol.TStruct("writeDelay_result");
+ public static class writeDelay_result
+ implements org.apache.thrift.TBase<writeDelay_result,
writeDelay_result._Fields>,
+ java.io.Serializable,
+ Cloneable,
+ Comparable<writeDelay_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("writeDelay_result");
- private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC
= new org.apache.thrift.protocol.TField("success",
org.apache.thrift.protocol.TType.STRING, (short)0);
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC =
+ new org.apache.thrift.protocol.TField(
+ "success", org.apache.thrift.protocol.TType.STRING, (short) 0);
- private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY = new writeDelay_resultStandardSchemeFactory();
- private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY = new writeDelay_resultTupleSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
STANDARD_SCHEME_FACTORY =
+ new writeDelay_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory
TUPLE_SCHEME_FACTORY =
+ new writeDelay_resultTupleSchemeFactory();
public @org.apache.thrift.annotation.Nullable String success; // required
- /** The set of fields this struct contains, along with convenience methods
for finding and manipulating them. */
+ /**
+ * The set of fields this struct contains, along with convenience methods
for finding and
+ * manipulating them.
+ */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SUCCESS((short)0, "success");
+ SUCCESS((short) 0, "success");
- private static final java.util.Map<String, _Fields> byName = new
java.util.HashMap<String, _Fields>();
+ private static final java.util.Map<String, _Fields> byName =
+ new java.util.HashMap<String, _Fields>();
static {
for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -619,12 +745,10 @@ public class SeparationTunningService {
}
}
- /**
- * Find the _Fields constant that matches fieldId, or null if its not
found.
- */
+ /** Find the _Fields constant that matches fieldId, or null if its not
found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 0: // SUCCESS
return SUCCESS;
default:
@@ -633,18 +757,16 @@ public class SeparationTunningService {
}
/**
- * Find the _Fields constant that matches fieldId, throwing an exception
- * if it is not found.
+ * Find the _Fields constant that matches fieldId, throwing an exception
if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " +
fieldId + " doesn't exist!");
+ if (fields == null)
+ throw new IllegalArgumentException("Field " + fieldId + " doesn't
exist!");
return fields;
}
- /**
- * Find the _Fields constant that matches name, or null if its not found.
- */
+ /** Find the _Fields constant that matches name, or null if its not
found. */
@org.apache.thrift.annotation.Nullable
public static _Fields findByName(String name) {
return byName.get(name);
@@ -668,28 +790,32 @@ public class SeparationTunningService {
}
// isset id assignments
- public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ public static final java.util.Map<_Fields,
org.apache.thrift.meta_data.FieldMetaData>
+ metaDataMap;
+
static {
- java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
= new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.SUCCESS, new
org.apache.thrift.meta_data.FieldMetaData("success",
org.apache.thrift.TFieldRequirementType.DEFAULT,
- new
org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap
=
+ new java.util.EnumMap<_Fields,
org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(
+ _Fields.SUCCESS,
+ new org.apache.thrift.meta_data.FieldMetaData(
+ "success",
+ org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(
+ org.apache.thrift.protocol.TType.STRING)));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
-
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeDelay_result.class,
metaDataMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
+ writeDelay_result.class, metaDataMap);
}
- public writeDelay_result() {
- }
+ public writeDelay_result() {}
- public writeDelay_result(
- String success)
- {
+ public writeDelay_result(String success) {
this();
this.success = success;
}
- /**
- * Performs a deep copy on <i>other</i>.
- */
+ /** Performs a deep copy on <i>other</i>. */
public writeDelay_result(writeDelay_result other) {
if (other.isSetSuccess()) {
this.success = other.success;
@@ -732,60 +858,56 @@ public class SeparationTunningService {
public void setFieldValue(_Fields field,
@org.apache.thrift.annotation.Nullable Object value) {
switch (field) {
- case SUCCESS:
- if (value == null) {
- unsetSuccess();
- } else {
- setSuccess((String)value);
- }
- break;
-
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((String) value);
+ }
+ break;
}
}
@org.apache.thrift.annotation.Nullable
public Object getFieldValue(_Fields field) {
switch (field) {
- case SUCCESS:
- return getSuccess();
-
+ case SUCCESS:
+ return getSuccess();
}
throw new IllegalStateException();
}
- /** Returns true if field corresponding to fieldID is set (has been
assigned a value) and false otherwise */
+ /**
+ * Returns true if field corresponding to fieldID is set (has been
assigned a value) and false
+ * otherwise
+ */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
}
switch (field) {
- case SUCCESS:
- return isSetSuccess();
+ case SUCCESS:
+ return isSetSuccess();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that instanceof writeDelay_result)
- return this.equals((writeDelay_result)that);
+ if (that instanceof writeDelay_result) return
this.equals((writeDelay_result) that);
return false;
}
public boolean equals(writeDelay_result that) {
- if (that == null)
- return false;
- if (this == that)
- return true;
+ if (that == null) return false;
+ if (this == that) return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
if (this_present_success || that_present_success) {
- if (!(this_present_success && that_present_success))
- return false;
- if (!this.success.equals(that.success))
- return false;
+ if (!(this_present_success && that_present_success)) return false;
+ if (!this.success.equals(that.success)) return false;
}
return true;
@@ -796,8 +918,7 @@ public class SeparationTunningService {
int hashCode = 1;
hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
- if (isSetSuccess())
- hashCode = hashCode * 8191 + success.hashCode();
+ if (isSetSuccess()) hashCode = hashCode * 8191 + success.hashCode();
return hashCode;
}
@@ -828,13 +949,15 @@ public class SeparationTunningService {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws
org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws
org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
scheme(oprot).write(oprot, this);
- }
+ }
@Override
public String toString() {
@@ -859,35 +982,42 @@ public class SeparationTunningService {
private void writeObject(java.io.ObjectOutputStream out) throws
java.io.IOException {
try {
- write(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(out)));
+ write(
+ new org.apache.thrift.protocol.TCompactProtocol(
+ new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
- private void readObject(java.io.ObjectInputStream in) throws
java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, ClassNotFoundException {
try {
- read(new org.apache.thrift.protocol.TCompactProtocol(new
org.apache.thrift.transport.TIOStreamTransport(in)));
+ read(
+ new org.apache.thrift.protocol.TCompactProtocol(
+ new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
- private static class writeDelay_resultStandardSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ private static class writeDelay_resultStandardSchemeFactory
+ implements org.apache.thrift.scheme.SchemeFactory {
public writeDelay_resultStandardScheme getScheme() {
return new writeDelay_resultStandardScheme();
}
}
- private static class writeDelay_resultStandardScheme extends
org.apache.thrift.scheme.StandardScheme<writeDelay_result> {
+ private static class writeDelay_resultStandardScheme
+ extends org.apache.thrift.scheme.StandardScheme<writeDelay_result> {
- public void read(org.apache.thrift.protocol.TProtocol iprot,
writeDelay_result struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot,
writeDelay_result struct)
+ throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true)
- {
+ while (true) {
schemeField = iprot.readFieldBegin();
- if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
@@ -895,7 +1025,7 @@ public class SeparationTunningService {
if (schemeField.type == org.apache.thrift.protocol.TType.STRING)
{
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot,
schemeField.type);
}
break;
@@ -906,11 +1036,13 @@ public class SeparationTunningService {
}
iprot.readStructEnd();
- // check for required fields of primitive type, which can't be checked
in the validate method
+ // check for required fields of primitive type, which can't be checked
in the validate
+ // method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot,
writeDelay_result struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot,
writeDelay_result struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -922,20 +1054,23 @@ public class SeparationTunningService {
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
- private static class writeDelay_resultTupleSchemeFactory implements
org.apache.thrift.scheme.SchemeFactory {
+ private static class writeDelay_resultTupleSchemeFactory
+ implements org.apache.thrift.scheme.SchemeFactory {
public writeDelay_resultTupleScheme getScheme() {
return new writeDelay_resultTupleScheme();
}
}
- private static class writeDelay_resultTupleScheme extends
org.apache.thrift.scheme.TupleScheme<writeDelay_result> {
+ private static class writeDelay_resultTupleScheme
+ extends org.apache.thrift.scheme.TupleScheme<writeDelay_result> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot,
writeDelay_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol oprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot,
writeDelay_result struct)
+ throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot =
+ (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetSuccess()) {
optionals.set(0);
@@ -947,8 +1082,10 @@ public class SeparationTunningService {
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot,
writeDelay_result struct) throws org.apache.thrift.TException {
- org.apache.thrift.protocol.TTupleProtocol iprot =
(org.apache.thrift.protocol.TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot,
writeDelay_result struct)
+ throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot =
+ (org.apache.thrift.protocol.TTupleProtocol) prot;
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readString();
@@ -957,9 +1094,12 @@ public class SeparationTunningService {
}
}
- private static <S extends org.apache.thrift.scheme.IScheme> S
scheme(org.apache.thrift.protocol.TProtocol proto) {
- return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ?
STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(
+ org.apache.thrift.protocol.TProtocol proto) {
+ return
(org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme())
+ ? STANDARD_SCHEME_FACTORY
+ : TUPLE_SCHEME_FACTORY)
+ .getScheme();
}
}
-
}
diff --git a/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
b/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
index f1f2588..65c10c0 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/IoTDB.java
@@ -58,7 +58,7 @@ public class IoTDB implements IoTDBMBean {
private RegisterManager registerManager = new RegisterManager();
public static MManager metaManager = MManager.getInstance();
- public static ConcurrentLinkedQueue<Double> delayQueue = new
ConcurrentLinkedQueue<>();
+ public static ConcurrentLinkedQueue<Double> delayQueue = new
ConcurrentLinkedQueue<>();
public static IoTDB getInstance() {
return IoTDBHolder.INSTANCE;
@@ -149,16 +149,14 @@ public class IoTDB implements IoTDBMBean {
registerManager.register(SyncServerManager.getInstance());
registerManager.register(UpgradeSevice.getINSTANCE());
-// if(IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning()){
- if(true){
+ if (IoTDBDescriptor.getInstance().getConfig().isEnableSeparationTuning()) {
+ logger.info("Separation tuning is enabled.");
ExecutorService executorService = Executors.newSingleThreadExecutor();
SeparationTuningClient tuningThread = new SeparationTuningClient();
executorService.execute(tuningThread);
}
logger.info("Congratulation, IoTDB is set up successfully. Now, enjoy
yourself!");
-
-
}
private void deactivate() {