diff --git a/Readme.md b/Readme.md index f833d56f3b4..573d92b70f5 100644 --- a/Readme.md +++ b/Readme.md @@ -56,6 +56,9 @@ Then you can build IoTDB using Maven in current folder: mvn clean package -Dmaven.test.skip=true ``` +(__NOTICE:__ Remember that you have to use -Dmaven.test.skip=true before you run tests, it is because some IT (integration test) requires jars in iotdb-cli/cli/lib/, and the folder is empty before you run `mvn package`. After that, you can run `mvn test` as long as you do not run `mvn clean`. For more details, see: [How to test IoTDB +](https://github.com/thulab/iotdb/wiki/How-to-test-IoTDB) ) + If successful, you will see the the following text in the terminal: ``` diff --git a/grafana/conf/application.properties b/grafana/conf/application.properties index 604773025b4..90761599847 100644 --- a/grafana/conf/application.properties +++ b/grafana/conf/application.properties @@ -1,6 +1,6 @@ spring.datasource.url = jdbc:iotdb://127.0.0.1:6667/ spring.datasource.username = root spring.datasource.password = root -spring.datasource.driver-class-name=cn.edu.tsinghua.iotdb.jdbc.IoTDBDriver +spring.datasource.driver-class-name=org.apache.iotdb.jdbc.IoTDBDriver server.port = 8888 \ No newline at end of file diff --git a/grafana/pom.xml b/grafana/pom.xml index 3ef5e62bbeb..4344de6bf38 100644 --- a/grafana/pom.xml +++ b/grafana/pom.xml @@ -4,7 +4,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml @@ -23,7 +23,7 @@ Grafana data source connector for IoTDB - cn.edu.tsinghua.web.TsfileWebDemoApplication + org.apache.iotdb.web.grafana.TsfileWebDemoApplication 1.5.4.RELEASE 4.3.9.RELEASE @@ -44,7 +44,7 @@ - cn.edu.tsinghua + org.apache.iotdb iotdb-jdbc 0.8.0-SNAPSHOT diff --git a/grafana/readme.md b/grafana/readme.md index bf4903acf33..86111409e81 100644 --- a/grafana/readme.md +++ b/grafana/readme.md @@ -44,7 +44,7 @@ Edit `application.properties` spring.datasource.url = jdbc:iotdb://127.0.0.1:6667/ spring.datasource.username = root spring.datasource.password = root -spring.datasource.driver-class-name=cn.edu.tsinghua.iotdb.jdbc.TsfileDriver +spring.datasource.driver-class-name=org.apache.iotdb.jdbc.TsfileDriver server.port = 8888 ``` diff --git a/grafana/readme_zh.md b/grafana/readme_zh.md index efb048635c7..980014ed1b8 100644 --- a/grafana/readme_zh.md +++ b/grafana/readme_zh.md @@ -33,7 +33,7 @@ cd grafana spring.datasource.url = jdbc:iotdb://127.0.0.1:6667/ spring.datasource.username = root spring.datasource.password = root -spring.datasource.driver-class-name=cn.edu.tsinghua.iotdb.jdbc.TsfileDriver +spring.datasource.driver-class-name=org.apache.iotdb.jdbc.TsfileDriver server.port = 8888 ``` diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/TsfileWebDemoApplication.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java similarity index 90% rename from grafana/src/main/java/cn/edu/tsinghua/web/TsfileWebDemoApplication.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java index 9cd1e8fdce5..dc27c8f9ca2 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/TsfileWebDemoApplication.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/TsfileWebDemoApplication.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.web; +package org.apache.iotdb.web.grafana; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/bean/TimeValues.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/bean/TimeValues.java similarity index 92% rename from grafana/src/main/java/cn/edu/tsinghua/web/bean/TimeValues.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/bean/TimeValues.java index de96f6e95d7..fdade733ec2 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/bean/TimeValues.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/bean/TimeValues.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.web.bean; +package org.apache.iotdb.web.grafana.bean; /** * Created by dell on 2017/7/18. diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/conf/MyConfiguration.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/conf/MyConfiguration.java similarity index 94% rename from grafana/src/main/java/cn/edu/tsinghua/web/conf/MyConfiguration.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/conf/MyConfiguration.java index 26e1a890e84..0fa6974cab8 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/conf/MyConfiguration.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/conf/MyConfiguration.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.web.conf; +package org.apache.iotdb.web.grafana.conf; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/controller/DBConnectController.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/controller/DBConnectController.java similarity index 96% rename from grafana/src/main/java/cn/edu/tsinghua/web/controller/DBConnectController.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/controller/DBConnectController.java index ed9097615a4..65b5c5c02c2 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/controller/DBConnectController.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/controller/DBConnectController.java @@ -1,8 +1,7 @@ -package cn.edu.tsinghua.web.controller; +package org.apache.iotdb.web.grafana.controller; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.web.bean.TimeValues; -import cn.edu.tsinghua.web.service.DBConnectService; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.web.grafana.bean.TimeValues; import org.json.JSONArray; import org.json.JSONException; @@ -37,7 +36,7 @@ public class DBConnectController { private static final Logger logger = LoggerFactory.getLogger(DBConnectController.class); @Autowired - private DBConnectService DBConnectService; + private org.apache.iotdb.web.grafana.service.DBConnectService DBConnectService; @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseStatus(value = HttpStatus.OK) diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/dao/BasicDao.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/BasicDao.java similarity index 64% rename from grafana/src/main/java/cn/edu/tsinghua/web/dao/BasicDao.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/dao/BasicDao.java index 7d1ff4deee5..bc52d28ebaa 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/dao/BasicDao.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/BasicDao.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.web.dao; +package org.apache.iotdb.web.grafana.dao; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.web.bean.TimeValues; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.web.grafana.bean.TimeValues; import java.time.ZonedDateTime; import java.util.List; diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/dao/impl/BasicDaoImpl.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java similarity index 94% rename from grafana/src/main/java/cn/edu/tsinghua/web/dao/impl/BasicDaoImpl.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java index adc56f6f172..b38da20c115 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/dao/impl/BasicDaoImpl.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/dao/impl/BasicDaoImpl.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.web.dao.impl; +package org.apache.iotdb.web.grafana.dao.impl; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.web.bean.TimeValues; -import cn.edu.tsinghua.web.dao.BasicDao; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.web.grafana.bean.TimeValues; +import org.apache.iotdb.web.grafana.dao.BasicDao; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/service/DBConnectService.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/service/DBConnectService.java similarity index 67% rename from grafana/src/main/java/cn/edu/tsinghua/web/service/DBConnectService.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/service/DBConnectService.java index ef255f49079..ae54112ec62 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/service/DBConnectService.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/service/DBConnectService.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.web.service; +package org.apache.iotdb.web.grafana.service; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.web.bean.TimeValues; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.web.grafana.bean.TimeValues; import java.time.ZonedDateTime; import java.util.List; diff --git a/grafana/src/main/java/cn/edu/tsinghua/web/service/impl/DBConnectServiceImpl.java b/grafana/src/main/java/org/apache/iotdb/web/grafana/service/impl/DBConnectServiceImpl.java similarity index 72% rename from grafana/src/main/java/cn/edu/tsinghua/web/service/impl/DBConnectServiceImpl.java rename to grafana/src/main/java/org/apache/iotdb/web/grafana/service/impl/DBConnectServiceImpl.java index 75b43cf2f3f..7f2a1459ece 100644 --- a/grafana/src/main/java/cn/edu/tsinghua/web/service/impl/DBConnectServiceImpl.java +++ b/grafana/src/main/java/org/apache/iotdb/web/grafana/service/impl/DBConnectServiceImpl.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.web.service.impl; +package org.apache.iotdb.web.grafana.service.impl; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.web.bean.TimeValues; -import cn.edu.tsinghua.web.dao.BasicDao; -import cn.edu.tsinghua.web.service.DBConnectService; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.web.grafana.bean.TimeValues; +import org.apache.iotdb.web.grafana.dao.BasicDao; +import org.apache.iotdb.web.grafana.service.DBConnectService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/hadoop/pom.xml b/hadoop/pom.xml index f790e659a66..9cb18d65a87 100644 --- a/hadoop/pom.xml +++ b/hadoop/pom.xml @@ -3,14 +3,14 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml - cn.edu.thu.tsfile + org.apache.iotdb.tsfile hadoop jar @@ -23,7 +23,7 @@ - cn.edu.tsinghua + org.apache.iotdb tsfile ${project.version} diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFHadoopException.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFHadoopException.java similarity index 94% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFHadoopException.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFHadoopException.java index 8ae477982cc..f6c655fa8f5 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFHadoopException.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFHadoopException.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; /** * @author liukun diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputFormat.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputFormat.java similarity index 98% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputFormat.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputFormat.java index 2a95ed2764a..cca0d146b59 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputFormat.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputFormat.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.IOException; import java.util.ArrayList; @@ -23,9 +23,9 @@ import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.thu.tsfile.hadoop.io.HDFSInputStream; -import cn.edu.tsinghua.tsfile.file.metadata.RowGroupMetaData; -import cn.edu.tsinghua.tsfile.read.FileReader; +import org.apache.iotdb.tsfile.hadoop.io.HDFSInputStream; +import org.apache.iotdb.tsfile.file.metadata.RowGroupMetaData; +import org.apache.iotdb.tsfile.read.FileReader; /** * @author liukun diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputSplit.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputSplit.java similarity index 92% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputSplit.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputSplit.java index d801bb7e9e0..3de0b9878ea 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFInputSplit.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFInputSplit.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.DataInput; import java.io.DataOutput; @@ -12,10 +12,10 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.Writable; import org.apache.hadoop.mapreduce.InputSplit; -import cn.edu.tsinghua.tsfile.file.metadata.RowGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsRowGroupBlockMetaData; -import cn.edu.tsinghua.tsfile.file.utils.ReadWriteThriftFormatUtils; -import cn.edu.tsinghua.tsfile.format.RowGroupBlockMetaData; +import org.apache.iotdb.tsfile.file.metadata.RowGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsRowGroupBlockMetaData; +import org.apache.iotdb.tsfile.file.utils.ReadWriteThriftFormatUtils; +import org.apache.iotdb.tsfile.format.RowGroupBlockMetaData; /** * This is tsfile InputSplit.
diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFOutputFormat.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFOutputFormat.java similarity index 97% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFOutputFormat.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFOutputFormat.java index f5fb13de1f7..88b1afa75e1 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFOutputFormat.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFOutputFormat.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.IOException; diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordReader.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordReader.java similarity index 93% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordReader.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordReader.java index 9d6a14ff843..ec2c72e08eb 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordReader.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordReader.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.IOException; import java.util.ArrayList; @@ -23,13 +23,13 @@ import org.apache.hadoop.mapreduce.TaskAttemptContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.thu.tsfile.hadoop.io.HDFSInputStream; -import cn.edu.tsinghua.tsfile.file.metadata.RowGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TimeSeriesChunkMetaData; -import cn.edu.tsinghua.tsfile.read.query.HadoopQueryEngine; -import cn.edu.tsinghua.tsfile.read.query.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.support.Field; -import cn.edu.tsinghua.tsfile.read.support.RowRecord; +import org.apache.iotdb.tsfile.hadoop.io.HDFSInputStream; +import org.apache.iotdb.tsfile.file.metadata.RowGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.TimeSeriesChunkMetaData; +import org.apache.iotdb.tsfile.read.query.HadoopQueryEngine; +import org.apache.iotdb.tsfile.read.query.QueryDataSet; +import org.apache.iotdb.tsfile.read.support.Field; +import org.apache.iotdb.tsfile.read.support.RowRecord; /** * @author liukun diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordWriter.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordWriter.java similarity index 83% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordWriter.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordWriter.java index fe06b3e4fd2..58777a17c08 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSFRecordWriter.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSFRecordWriter.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.IOException; @@ -11,11 +11,11 @@ import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.thu.tsfile.hadoop.io.HDFSOutputStream; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; -import cn.edu.tsinghua.tsfile.write.exception.InvalidJsonSchemaException; -import cn.edu.tsinghua.tsfile.write.exception.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.hadoop.io.HDFSOutputStream; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.write.exception.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.write.exception.WriteProcessException; +import org.apache.iotdb.tsfile.write.schema.FileSchema; public class TSFRecordWriter extends RecordWriter { diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSRow.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSRow.java similarity index 84% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSRow.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSRow.java index ee35f53a191..79e2090fa71 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/TSRow.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/TSRow.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.DataInput; import java.io.DataOutput; @@ -6,7 +6,7 @@ import java.io.IOException; import org.apache.hadoop.io.Writable; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.TSRecord; public class TSRow implements Writable { diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TSFMRReadExample.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TSFMRReadExample.java similarity index 94% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TSFMRReadExample.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TSFMRReadExample.java index 6c09239b130..15e7da98f0b 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TSFMRReadExample.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TSFMRReadExample.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop.example; +package org.apache.iotdb.tsfile.hadoop.example; import java.io.IOException; import java.net.URISyntaxException; @@ -13,9 +13,9 @@ import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; -import cn.edu.thu.tsfile.hadoop.TSFHadoopException; -import cn.edu.thu.tsfile.hadoop.TSFInputFormat; -import cn.edu.thu.tsfile.hadoop.TSFOutputFormat; +import org.apache.iotdb.tsfile.hadoop.TSFHadoopException; +import org.apache.iotdb.tsfile.hadoop.TSFInputFormat; +import org.apache.iotdb.tsfile.hadoop.TSFOutputFormat; /** * One example for reading TsFile with MapReduce. diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TsFileHelper.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TsFileHelper.java similarity index 84% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TsFileHelper.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TsFileHelper.java index 6662811d7ee..ffd616031c2 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/example/TsFileHelper.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/example/TsFileHelper.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop.example; +package org.apache.iotdb.tsfile.hadoop.example; import java.io.File; import java.io.FileNotFoundException; @@ -9,15 +9,15 @@ import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileWriter; -import cn.edu.tsinghua.tsfile.common.utils.TsRandomAccessFileWriter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; -import cn.edu.tsinghua.tsfile.read.TsRandomAccessLocalFileReader; -import cn.edu.tsinghua.tsfile.write.exception.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.common.utils.TsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.read.TsRandomAccessLocalFileReader; +import org.apache.iotdb.tsfile.write.exception.WriteProcessException; public class TsFileHelper { diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSInputStream.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSInputStream.java similarity index 94% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSInputStream.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSInputStream.java index 43909db2b7c..0cd8a446ad6 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSInputStream.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSInputStream.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop.io; +package org.apache.iotdb.tsfile.hadoop.io; import java.io.IOException; @@ -8,7 +8,7 @@ import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; /** * This class is used to wrap the {@link}FSDataInputStream and implement the diff --git a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSOutputStream.java b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSOutputStream.java similarity index 93% rename from hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSOutputStream.java rename to hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSOutputStream.java index 7531e3a273a..356848c810d 100644 --- a/hadoop/src/main/java/cn/edu/thu/tsfile/hadoop/io/HDFSOutputStream.java +++ b/hadoop/src/main/java/org/apache/iotdb/tsfile/hadoop/io/HDFSOutputStream.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop.io; +package org.apache.iotdb.tsfile.hadoop.io; import java.io.IOException; import java.io.OutputStream; @@ -8,7 +8,7 @@ import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileWriter; /** * This class is used to wrap the {@link}FSDataOutputStream and implement the diff --git a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/InputOutputStreamTest.java b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/InputOutputStreamTest.java index 6a798022f13..b6f1bb0a1b3 100644 --- a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/InputOutputStreamTest.java +++ b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/InputOutputStreamTest.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; @@ -7,8 +7,8 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.thu.tsfile.hadoop.io.HDFSInputStream; -import cn.edu.thu.tsfile.hadoop.io.HDFSOutputStream; +import org.apache.iotdb.tsfile.hadoop.io.HDFSInputStream; +import org.apache.iotdb.tsfile.hadoop.io.HDFSOutputStream; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; diff --git a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFHadoopTest.java b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFHadoopTest.java index ac70d1cc8b0..57621b2b299 100644 --- a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFHadoopTest.java +++ b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFHadoopTest.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -22,9 +22,9 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; -import cn.edu.tsinghua.tsfile.read.TsRandomAccessLocalFileReader; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.read.TsRandomAccessLocalFileReader; public class TSFHadoopTest { diff --git a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFInputSplitTest.java b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFInputSplitTest.java index 73810f0d8bb..435e5784b86 100644 --- a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFInputSplitTest.java +++ b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TSFInputSplitTest.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -14,11 +14,11 @@ import org.apache.hadoop.io.DataOutputBuffer; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.file.metadata.RowGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TimeSeriesChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.RowGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.TimeSeriesChunkMetaData; /** - * Test the {@link cn.edu.thu.tsfile.hadoop.TSFInputSplit} + * Test the {@link org.apache.iotdb.tsfile.hadoop.TSFInputSplit} * Assert the readFields function and write function is right * * @author liukun diff --git a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TsFileTestHelper.java b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TsFileTestHelper.java index accbdb45ce7..e77bd669d20 100644 --- a/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TsFileTestHelper.java +++ b/hadoop/src/test/java/cn/edu/thu/tsfile/hadoop/TsFileTestHelper.java @@ -1,4 +1,4 @@ -package cn.edu.thu.tsfile.hadoop; +package org.apache.iotdb.tsfile.hadoop; import java.io.File; import java.io.FileNotFoundException; @@ -7,15 +7,15 @@ import java.io.IOException; import org.json.JSONArray; import org.json.JSONObject; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileWriter; -import cn.edu.tsinghua.tsfile.common.utils.TsRandomAccessFileWriter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; -import cn.edu.tsinghua.tsfile.read.TsRandomAccessLocalFileReader; -import cn.edu.tsinghua.tsfile.write.exception.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.common.utils.TsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.read.TsRandomAccessLocalFileReader; +import org.apache.iotdb.tsfile.write.exception.WriteProcessException; public class TsFileTestHelper { diff --git a/iotdb-cli/cli/bin/export-csv.bat b/iotdb-cli/cli/bin/export-csv.bat index c93c40730ff..35f13137132 100644 --- a/iotdb-cli/cli/bin/export-csv.bat +++ b/iotdb-cli/cli/bin/export-csv.bat @@ -6,7 +6,7 @@ pushd %~dp0.. if NOT DEFINED IOTDB_HOME set IOTDB_HOME=%CD% popd -if NOT DEFINED MAIN_CLASS set MAIN_CLASS=cn.edu.tsinghua.iotdb.tool.ExportCsv +if NOT DEFINED MAIN_CLASS set MAIN_CLASS=org.apache.iotdb.db.tool.ExportCsv if NOT DEFINED JAVA_HOME goto :err @REM ----------------------------------------------------------------------------- diff --git a/iotdb-cli/cli/bin/export-csv.sh b/iotdb-cli/cli/bin/export-csv.sh index 38e448af2ce..c947b13bd2a 100755 --- a/iotdb-cli/cli/bin/export-csv.sh +++ b/iotdb-cli/cli/bin/export-csv.sh @@ -25,7 +25,7 @@ for f in ${IOTDB_HOME}/lib/*.jar; do CLASSPATH=${CLASSPATH}":"$f done -MAIN_CLASS=cn.edu.tsinghua.iotdb.tool.ExportCsv +MAIN_CLASS=org.apache.iotdb.db.tool.ExportCsv "$JAVA" -DIOTDB_HOME=${IOTDB_HOME} -cp "$CLASSPATH" "$MAIN_CLASS" "$@" exit $? \ No newline at end of file diff --git a/iotdb-cli/cli/bin/import-csv.bat b/iotdb-cli/cli/bin/import-csv.bat index b240a5fef4c..6926ed89de1 100644 --- a/iotdb-cli/cli/bin/import-csv.bat +++ b/iotdb-cli/cli/bin/import-csv.bat @@ -6,7 +6,7 @@ pushd %~dp0.. if NOT DEFINED IOTDB_HOME set IOTDB_HOME=%CD% popd -if NOT DEFINED MAIN_CLASS set MAIN_CLASS=cn.edu.tsinghua.iotdb.tool.ImportCsv +if NOT DEFINED MAIN_CLASS set MAIN_CLASS=org.apache.iotdb.db.tool.ImportCsv if NOT DEFINED JAVA_HOME goto :err @REM ----------------------------------------------------------------------------- diff --git a/iotdb-cli/cli/bin/import-csv.sh b/iotdb-cli/cli/bin/import-csv.sh index f30478c171d..c91ab74da6e 100755 --- a/iotdb-cli/cli/bin/import-csv.sh +++ b/iotdb-cli/cli/bin/import-csv.sh @@ -25,7 +25,7 @@ for f in ${IOTDB_HOME}/lib/*.jar; do CLASSPATH=${CLASSPATH}":"$f done -MAIN_CLASS=cn.edu.tsinghua.iotdb.tool.ImportCsv +MAIN_CLASS=org.apache.iotdb.db.tool.ImportCsv "$JAVA" -DIOTDB_HOME=${IOTDB_HOME} -cp "$CLASSPATH" "$MAIN_CLASS" "$@" exit $? \ No newline at end of file diff --git a/iotdb-cli/cli/bin/start-client.bat b/iotdb-cli/cli/bin/start-client.bat index 873a9fe6538..b6233cd9e5c 100755 --- a/iotdb-cli/cli/bin/start-client.bat +++ b/iotdb-cli/cli/bin/start-client.bat @@ -9,7 +9,7 @@ pushd %~dp0.. if NOT DEFINED IOTDB_HOME set IOTDB_HOME=%CD% popd -if NOT DEFINED MAIN_CLASS set MAIN_CLASS=cn.edu.tsinghua.iotdb.client.Client +if NOT DEFINED MAIN_CLASS set MAIN_CLASS=org.apache.iotdb.cli.client.Client if NOT DEFINED JAVA_HOME goto :err @REM ----------------------------------------------------------------------------- diff --git a/iotdb-cli/cli/bin/start-client.sh b/iotdb-cli/cli/bin/start-client.sh index d6589cc46bc..c1242aa0982 100755 --- a/iotdb-cli/cli/bin/start-client.sh +++ b/iotdb-cli/cli/bin/start-client.sh @@ -9,7 +9,7 @@ if [ -z "${IOTDB_HOME}" ]; then fi -MAIN_CLASS=cn.edu.tsinghua.iotdb.client.Client +MAIN_CLASS=org.apache.iotdb.cli.client.Client CLASSPATH="" diff --git a/iotdb-cli/pom.xml b/iotdb-cli/pom.xml index ddf062600ac..3abec1ba158 100644 --- a/iotdb-cli/pom.xml +++ b/iotdb-cli/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml @@ -22,7 +22,7 @@ - cn.edu.tsinghua + org.apache.iotdb iotdb-jdbc 0.8.0-SNAPSHOT diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/AbstractClient.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/AbstractClient.java similarity index 98% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/AbstractClient.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/client/AbstractClient.java index aadb627472e..1f4241fa19d 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/AbstractClient.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/AbstractClient.java @@ -1,17 +1,16 @@ -package cn.edu.tsinghua.iotdb.client; - -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBDatabaseMetadata; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBMetadataResultSet; -import cn.edu.tsinghua.iotdb.tool.ImportCsv; -import cn.edu.tsinghua.service.rpc.thrift.ServerProperties; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; +package org.apache.iotdb.cli.client; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.StringUtils; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.cli.tool.ImportCsv; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.iotdb.jdbc.IoTDBDatabaseMetadata; +import org.apache.iotdb.jdbc.IoTDBMetadataResultSet; +import org.apache.iotdb.service.rpc.thrift.ServerProperties; import org.apache.thrift.TException; import java.sql.ResultSet; diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/Client.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/Client.java similarity index 95% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/Client.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/client/Client.java index 95b5efd5833..2acd23cfaa2 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/Client.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/Client.java @@ -1,23 +1,19 @@ -package cn.edu.tsinghua.iotdb.client; +package org.apache.iotdb.cli.client; + +import jline.console.ConsoleReader; +import jline.console.completer.ArgumentCompleter; +import jline.console.completer.Completer; +import jline.console.completer.StringsCompleter; +import org.apache.commons.cli.*; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.IoTDBConnection; import java.sql.DriverManager; import java.sql.SQLException; -import java.util.*; - -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import jline.console.completer.ArgumentCompleter; -import jline.console.completer.StringsCompleter; -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; - -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import jline.console.ConsoleReader; -import jline.console.completer.Completer; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; public class Client extends AbstractClient { diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/WinClient.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/WinClient.java similarity index 95% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/WinClient.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/client/WinClient.java index f292d53ee1c..c6d4c778e2d 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/client/WinClient.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/client/WinClient.java @@ -1,9 +1,4 @@ -package cn.edu.tsinghua.iotdb.client; - -import java.io.Console; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.util.Scanner; +package org.apache.iotdb.cli.client; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; @@ -11,10 +6,14 @@ import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.Config; +import java.io.Console; +import java.sql.DriverManager; +import java.sql.SQLException; +import java.util.Scanner; public class WinClient extends AbstractClient { diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/exception/ArgsErrorException.java similarity index 81% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/exception/ArgsErrorException.java index 3d903302ac4..57576391704 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/exception/ArgsErrorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.cli.exception; public class ArgsErrorException extends Exception{ diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/AbstractCsvTool.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/AbstractCsvTool.java similarity index 92% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/AbstractCsvTool.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/AbstractCsvTool.java index 93eaebfc249..468ecd5cdcc 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/AbstractCsvTool.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/AbstractCsvTool.java @@ -1,16 +1,15 @@ -package cn.edu.tsinghua.iotdb.tool; +package org.apache.iotdb.cli.tool; + +import jline.console.ConsoleReader; +import org.apache.commons.cli.CommandLine; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.iotdb.jdbc.IoTDBSQLException; +import org.apache.thrift.TException; import java.io.IOException; import java.time.ZoneId; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBSQLException; -import org.apache.commons.cli.CommandLine; -import org.apache.thrift.TException; - -import jline.console.ConsoleReader; - public abstract class AbstractCsvTool { protected static final String HOST_ARGS = "h"; protected static final String HOST_NAME = "host"; @@ -43,7 +42,7 @@ public abstract class AbstractCsvTool { protected static String timeZoneID; protected static String timeFormat; -// protected static final String JDBC_DRIVER = "cn.edu.thu.tsfiledb.jdbc.TsfileDriver"; +// protected static final String JDBC_DRIVER = "case hu.tsfiledb.jdbc.TsfileDriver"; protected static final String DEFAULT_TIME_FORMAT = "ISO8601"; diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/CsvTestDataGen.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/CsvTestDataGen.java similarity index 98% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/CsvTestDataGen.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/CsvTestDataGen.java index 9c718d28472..12d1e75f2c3 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/CsvTestDataGen.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/CsvTestDataGen.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.tool; +package org.apache.iotdb.cli.tool; import java.io.BufferedWriter; import java.io.File; diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ExportCsv.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ExportCsv.java similarity index 98% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ExportCsv.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ExportCsv.java index e48c37e1a77..df1104a7371 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ExportCsv.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ExportCsv.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.tool; +package org.apache.iotdb.cli.tool; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.Config; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.iotdb.jdbc.Config; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; diff --git a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ImportCsv.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ImportCsv.java similarity index 98% rename from iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ImportCsv.java rename to iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ImportCsv.java index 36d64c4d346..7d56ad15efe 100644 --- a/iotdb-cli/src/main/java/cn/edu/tsinghua/iotdb/tool/ImportCsv.java +++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/tool/ImportCsv.java @@ -1,4 +1,18 @@ -package cn.edu.tsinghua.iotdb.tool; +package org.apache.iotdb.cli.tool; + +import jline.console.ConsoleReader; +import org.apache.commons.cli.CommandLine; +import org.apache.commons.cli.CommandLineParser; +import org.apache.commons.cli.DefaultParser; +import org.apache.commons.cli.HelpFormatter; +import org.apache.commons.cli.Option; +import org.apache.commons.cli.Options; +import org.apache.commons.cli.ParseException; +import org.apache.commons.io.FileUtils; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.thrift.TException; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -18,23 +32,6 @@ import java.util.Iterator; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.jdbc.Constant; - -import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.CommandLineParser; -import org.apache.commons.cli.DefaultParser; -import org.apache.commons.cli.HelpFormatter; -import org.apache.commons.cli.Option; -import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; -import org.apache.commons.io.FileUtils; -import org.apache.thrift.TException; - -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import jline.console.ConsoleReader; - /** * CSV File To IoTDB * diff --git a/iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/AbstractClientTest.java b/iotdb-cli/src/test/java/org/apache/iotdb/cli/client/AbstractClientTest.java similarity index 96% rename from iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/AbstractClientTest.java rename to iotdb-cli/src/test/java/org/apache/iotdb/cli/client/AbstractClientTest.java index 49ca3dfa04f..13e1feeacd4 100644 --- a/iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/AbstractClientTest.java +++ b/iotdb-cli/src/test/java/org/apache/iotdb/cli/client/AbstractClientTest.java @@ -1,23 +1,23 @@ -package cn.edu.tsinghua.iotdb.client; - -import static org.junit.Assert.*; -import static org.mockito.Mockito.when; +package org.apache.iotdb.cli.client; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Options; import org.apache.commons.cli.ParseException; - +import org.apache.iotdb.cli.client.AbstractClient.OPERATION_RESULT; +import org.apache.iotdb.cli.exception.ArgsErrorException; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.iotdb.jdbc.IoTDBDatabaseMetadata; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.iotdb.client.AbstractClient.OPERATION_RESULT; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBDatabaseMetadata; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; +import static org.mockito.Mockito.when; public class AbstractClientTest { diff --git a/iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/StartClientScriptTest.java b/iotdb-cli/src/test/java/org/apache/iotdb/cli/client/StartClientScriptTest.java similarity index 97% rename from iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/StartClientScriptTest.java rename to iotdb-cli/src/test/java/org/apache/iotdb/cli/client/StartClientScriptTest.java index 6abf9ed826b..3869cec03e4 100644 --- a/iotdb-cli/src/test/java/cn/edu/tsinghua/iotdb/client/StartClientScriptTest.java +++ b/iotdb-cli/src/test/java/org/apache/iotdb/cli/client/StartClientScriptTest.java @@ -1,6 +1,8 @@ -package cn.edu.tsinghua.iotdb.client; +package org.apache.iotdb.cli.client; -import static org.junit.Assert.*; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; import java.io.BufferedReader; import java.io.File; @@ -9,9 +11,7 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; +import static org.junit.Assert.assertEquals; public class StartClientScriptTest { diff --git a/iotdb-cli/src/test/resources/logback.xml b/iotdb-cli/src/test/resources/logback.xml index 722d9273858..1c9bab24229 100644 --- a/iotdb-cli/src/test/resources/logback.xml +++ b/iotdb-cli/src/test/resources/logback.xml @@ -92,7 +92,7 @@ - + diff --git a/iotdb/iotdb/bin/start-postBackClient.bat b/iotdb/iotdb/bin/start-postBackClient.bat index 0a9d605b7d5..d8c29de4677 100755 --- a/iotdb/iotdb/bin/start-postBackClient.bat +++ b/iotdb/iotdb/bin/start-postBackClient.bat @@ -10,7 +10,7 @@ set IOTDB_CONF=%IOTDB_HOME%\conf set IOTDB_LOGS=%IOTDB_HOME%\logs -if NOT DEFINED MAIN_CLASS set MAIN_CLASS=cn.edu.tsinghua.iotdb.postback.sender.FileSenderImpl +if NOT DEFINED MAIN_CLASS set MAIN_CLASS=org.apache.iotdb.db.postback.sender.FileSenderImpl if NOT DEFINED JAVA_HOME goto :err @REM ----------------------------------------------------------------------------- diff --git a/iotdb/iotdb/bin/start-postBackClient.sh b/iotdb/iotdb/bin/start-postBackClient.sh index 6ae73592a16..65cf0c7ff40 100755 --- a/iotdb/iotdb/bin/start-postBackClient.sh +++ b/iotdb/iotdb/bin/start-postBackClient.sh @@ -28,7 +28,7 @@ for f in ${IOTDB_HOME}/lib/*.jar; do CLASSPATH=${CLASSPATH}":"$f done -MAIN_CLASS=cn.edu.tsinghua.iotdb.postback.sender.FileSenderImpl +MAIN_CLASS=org.apache.iotdb.db.postback.sender.FileSenderImpl "$JAVA" -DIOTDB_HOME=${IOTDB_HOME} -DTSFILE_HOME=${IOTDB_HOME} -DIOTDB_CONF=${IOTDB_CONF} -Dlogback.configurationFile=${IOTDB_CONF}/logback.xml $IOTDB_DERBY_OPTS $IOTDB_JMX_OPTS -Dname=postBackClient -cp "$CLASSPATH" "$MAIN_CLASS" diff --git a/iotdb/iotdb/bin/start-server.bat b/iotdb/iotdb/bin/start-server.bat index 999d1188836..ddeb590e6f3 100755 --- a/iotdb/iotdb/bin/start-server.bat +++ b/iotdb/iotdb/bin/start-server.bat @@ -38,7 +38,7 @@ IF EXIST "%IOTDB_CONF%\iotdb-env.bat" ( echo "can't find %IOTDB_CONF%\iotdb-env.bat" ) -if NOT DEFINED MAIN_CLASS set MAIN_CLASS=cn.edu.tsinghua.iotdb.service.IoTDB +if NOT DEFINED MAIN_CLASS set MAIN_CLASS=org.apache.iotdb.db.service.IoTDB if NOT DEFINED JAVA_HOME goto :err @REM ----------------------------------------------------------------------------- diff --git a/iotdb/iotdb/bin/start-server.sh b/iotdb/iotdb/bin/start-server.sh index e55a1e5b1a2..f33eccb3a3a 100755 --- a/iotdb/iotdb/bin/start-server.sh +++ b/iotdb/iotdb/bin/start-server.sh @@ -37,7 +37,7 @@ CLASSPATH="" for f in ${IOTDB_HOME}/lib/*.jar; do CLASSPATH=${CLASSPATH}":"$f done -classname=cn.edu.tsinghua.iotdb.service.IoTDB +classname=org.apache.iotdb.db.service.IoTDB launch_service() { diff --git a/iotdb/iotdb/conf/iotdb-engine.properties b/iotdb/iotdb/conf/iotdb-engine.properties index 383ae38c843..d1c33a8556a 100644 --- a/iotdb/iotdb/conf/iotdb-engine.properties +++ b/iotdb/iotdb/conf/iotdb-engine.properties @@ -49,7 +49,7 @@ flush_wal_period_in_ms=10 # mult_dir_strategy # The strategy is used to choose a directory from tsfile_dir for the system to store a new tsfile. -# System provides three strategies to choose from, or user can create his own strategy by extending cn.edu.tsinghua.iotdb.conf.directories.strategy.DirectoryStrategy. +# System provides three strategies to choose from, or user can create his own strategy by extending org.apache.iotdb.db.conf.directories.strategy.DirectoryStrategy. # The info of the three strategies are as follows: # 1. SequenceStrategy: the system will choose the directory in sequence. # 2. MaxDiskUsableSpaceFirstStrategy: the system will choose the directory whose disk has the maximum space. diff --git a/iotdb/iotdb/conf/iotdb-env.sh b/iotdb/iotdb/conf/iotdb-env.sh index 4378a20c489..2d3186605b1 100755 --- a/iotdb/iotdb/conf/iotdb-env.sh +++ b/iotdb/iotdb/conf/iotdb-env.sh @@ -107,7 +107,7 @@ else IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Dcom.sun.management.jmxremote.port=$JMX_PORT " fi -IOTDB_DERBY_OPTS="-Dderby.stream.error.field=cn.edu.tsinghua.iotdb.auth.dao.DerbyUtil.DEV_NULL" +IOTDB_DERBY_OPTS="-Dderby.stream.error.field=org.apache.iotdb.db.auth.dao.DerbyUtil.DEV_NULL" IOTDB_JMX_OPTS="$IOTDB_JMX_OPTS -Xloggc:${IOTDB_HOME}/gc.log -XX:+PrintGCDateStamps -XX:+PrintGCDetails" diff --git a/iotdb/iotdb/conf/logback.xml b/iotdb/iotdb/conf/logback.xml index 05007a4206c..9f6eaff6cf4 100644 --- a/iotdb/iotdb/conf/logback.xml +++ b/iotdb/iotdb/conf/logback.xml @@ -98,8 +98,8 @@ - - + + diff --git a/iotdb/pom.xml b/iotdb/pom.xml index 40ba33a3fec..897681e2ded 100644 --- a/iotdb/pom.xml +++ b/iotdb/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml @@ -23,17 +23,17 @@ - cn.edu.tsinghua + org.apache.iotdb service-rpc ${project.version} - cn.edu.tsinghua + org.apache.iotdb tsfile ${project.version} - cn.edu.tsinghua + org.apache.iotdb iotdb-jdbc ${project.version} test @@ -60,7 +60,7 @@ log4j - cn.edu.tsinghua + org.apache.iotdb tsfile diff --git a/iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSLexer.g b/iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSLexer.g similarity index 98% rename from iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSLexer.g rename to iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSLexer.g index c15b2bbe2d2..6a145902445 100644 --- a/iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSLexer.g +++ b/iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSLexer.g @@ -1,7 +1,7 @@ lexer grammar TSLexer; @lexer::header { -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; } diff --git a/iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSParser.g b/iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSParser.g similarity index 99% rename from iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSParser.g rename to iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSParser.g index 8cc7d253df7..d1ecbd00090 100644 --- a/iotdb/src/main/antlr3/cn/edu/tsinghua/iotdb/sql/parse/TSParser.g +++ b/iotdb/src/main/antlr3/org/apache/iotdb/db/sql/parse/TSParser.g @@ -83,7 +83,7 @@ TOK_DESCRIBE; @header { -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import java.util.Arrays; import java.util.Collection; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/IFilterOptimizer.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/IFilterOptimizer.java deleted file mode 100644 index 61f11853412..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/IFilterOptimizer.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; - -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; - -/** - * provide a filter operator, optimize it. - */ -public interface IFilterOptimizer { - FilterOperator optimize(FilterOperator filter) throws QueryProcessorException; -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ILogicalOptimizer.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ILogicalOptimizer.java deleted file mode 100644 index 1bc5cf71a68..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ILogicalOptimizer.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; - -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; - -/** - * provide a context, transform it for optimization. - */ -public interface ILogicalOptimizer { - - Operator transform(Operator operator) throws LogicalOptimizeException; -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobContext.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobContext.java deleted file mode 100644 index aca7e382549..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobContext.java +++ /dev/null @@ -1,5 +0,0 @@ -package cn.edu.tsinghua.iotdb.query.component.job; - - -public class QueryJobContext { -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobDispatcher.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobDispatcher.java deleted file mode 100644 index 188a3969c20..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobDispatcher.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.edu.tsinghua.iotdb.query.component.job; - -import cn.edu.tsinghua.iotdb.query.component.executor.QueryJobExecutor; -import cn.edu.tsinghua.iotdb.query.component.job.QueryJob; - - -public interface QueryJobDispatcher { - - QueryJobExecutor dispatch(QueryJob queryJob); - -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDBMBean.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDBMBean.java deleted file mode 100644 index c82374ddc10..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDBMBean.java +++ /dev/null @@ -1,9 +0,0 @@ -package cn.edu.tsinghua.iotdb.service; - -import java.io.IOException; - -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; - -public interface IoTDBMBean { - void stop() throws FileNodeManagerException, IOException; -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/LogReplayer.java b/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/LogReplayer.java deleted file mode 100644 index 46b1cef6608..00000000000 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/LogReplayer.java +++ /dev/null @@ -1,8 +0,0 @@ -package cn.edu.tsinghua.iotdb.writelog.replay; - -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; - -public interface LogReplayer { - void replay(PhysicalPlan plan) throws ProcessorException; -} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthException.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/AuthException.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthException.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/AuthException.java index e00e5ac767c..a7004a5a65d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/AuthException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; /** * The exception for authority model diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthorityChecker.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthorityChecker.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java index 2197a763d11..d6f4eecd4b8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/AuthorityChecker.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/AuthorityChecker.java @@ -1,11 +1,15 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.authorizer.IAuthorizer; -import cn.edu.tsinghua.iotdb.auth.authorizer.LocalFileAuthorizer; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.qp.logical.Operator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/BasicRoleManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/BasicRoleManager.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/BasicRoleManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/Role/BasicRoleManager.java index 4e86199dc22..f13ecc97f50 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/BasicRoleManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/BasicRoleManager.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.auth.Role; +package org.apache.iotdb.db.auth.Role; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.concurrent.HashLock; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.concurrent.HashLock; +import org.apache.iotdb.db.utils.AuthUtils; import java.io.IOException; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleAccessor.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleAccessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleAccessor.java index a31d0a7ba78..72ff2b042ee 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleAccessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleAccessor.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.auth.Role; +package org.apache.iotdb.db.auth.Role; -import cn.edu.tsinghua.iotdb.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.Role; import java.io.IOException; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleManager.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleManager.java index 1108ccf4514..80f77db9c37 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/IRoleManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/IRoleManager.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.auth.Role; +package org.apache.iotdb.db.auth.Role; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.Role; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.Role; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleAccessor.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleAccessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleAccessor.java index e9a9791db24..2491635b7f5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleAccessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleAccessor.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.iotdb.auth.Role; +package org.apache.iotdb.db.auth.Role; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.utils.IOUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.utils.IOUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.utils.IOUtils; import java.io.*; import java.nio.ByteBuffer; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleManager.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleManager.java index 57b483c641d..35d9d46f655 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/Role/LocalFileRoleManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/Role/LocalFileRoleManager.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.auth.Role; +package org.apache.iotdb.db.auth.Role; public class LocalFileRoleManager extends BasicRoleManager { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/BasicAuthorizer.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/BasicAuthorizer.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/BasicAuthorizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/BasicAuthorizer.java index 333c9a9d733..4b75c2fb04d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/BasicAuthorizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/BasicAuthorizer.java @@ -1,16 +1,16 @@ -package cn.edu.tsinghua.iotdb.auth.authorizer; +package org.apache.iotdb.db.auth.authorizer; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.Role.IRoleManager; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.auth.user.IUserManager; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.Role.IRoleManager; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.auth.user.IUserManager; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.db.utils.AuthUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/IAuthorizer.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/IAuthorizer.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/IAuthorizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/IAuthorizer.java index 30ef41c075c..9f9cbf0d66c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/IAuthorizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/IAuthorizer.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.auth.authorizer; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.auth.entity.User; +package org.apache.iotdb.db.auth.authorizer; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.User; import java.util.List; import java.util.Set; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/LocalFileAuthorizer.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/LocalFileAuthorizer.java similarity index 78% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/LocalFileAuthorizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/LocalFileAuthorizer.java index f9c16c2f8c5..7541e31d7eb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/authorizer/LocalFileAuthorizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/authorizer/LocalFileAuthorizer.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.auth.authorizer; +package org.apache.iotdb.db.auth.authorizer; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.Role.LocalFileRoleManager; -import cn.edu.tsinghua.iotdb.auth.user.LocalFileUserManager; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.Role.LocalFileRoleManager; +import org.apache.iotdb.db.auth.user.LocalFileUserManager; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PathPrivilege.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PathPrivilege.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PathPrivilege.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PathPrivilege.java index e532eab5402..af6eef3527b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PathPrivilege.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PathPrivilege.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.auth.entity; +package org.apache.iotdb.db.auth.entity; import java.util.Comparator; import java.util.HashSet; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PrivilegeType.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PrivilegeType.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PrivilegeType.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PrivilegeType.java index 9534ea649af..a8801fd8e20 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/PrivilegeType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/PrivilegeType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.auth.entity; +package org.apache.iotdb.db.auth.entity; /** * This enum class contains all available privileges in IoTDB. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/Role.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/Role.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/Role.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/entity/Role.java index 868ff870b4a..e02ce22d03f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/Role.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/Role.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.auth.entity; +package org.apache.iotdb.db.auth.entity; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.utils.AuthUtils; +import org.apache.iotdb.db.utils.AuthUtils; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/User.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/User.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/User.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/entity/User.java index 856076b0198..8bf877aaa20 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/entity/User.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/entity/User.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.auth.entity; +package org.apache.iotdb.db.auth.entity; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.utils.AuthUtils; +import org.apache.iotdb.db.utils.AuthUtils; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/BasicUserManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/BasicUserManager.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/BasicUserManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/user/BasicUserManager.java index f35563e4be8..b15f8d84814 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/BasicUserManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/BasicUserManager.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.auth.user; +package org.apache.iotdb.db.auth.user; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.concurrent.HashLock; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.concurrent.HashLock; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.utils.AuthUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserAccessor.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserAccessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserAccessor.java index b87225ef6c8..6a08dbf1113 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserAccessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserAccessor.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.auth.user; +package org.apache.iotdb.db.auth.user; -import cn.edu.tsinghua.iotdb.auth.entity.User; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.auth.entity.User; import java.io.IOException; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserManager.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserManager.java index a31f8a12f83..4ee736dab52 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/IUserManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/IUserManager.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.auth.user; +package org.apache.iotdb.db.auth.user; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.User; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.auth.entity.User; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserAccessor.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserAccessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java index 7dd7be65bda..38985926c8d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserAccessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserAccessor.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.iotdb.auth.user; +package org.apache.iotdb.db.auth.user; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.utils.IOUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.utils.IOUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.utils.IOUtils; import java.io.*; import java.nio.ByteBuffer; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserManager.java b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserManager.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserManager.java index e39d4f83e5c..561baba48a7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/auth/user/LocalFileUserManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/auth/user/LocalFileUserManager.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.auth.user; +package org.apache.iotdb.db.auth.user; -import cn.edu.tsinghua.iotdb.auth.AuthException; +import org.apache.iotdb.db.auth.AuthException; public class LocalFileUserManager extends BasicUserManager { public LocalFileUserManager(String userDirPath) throws AuthException { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/HashLock.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/HashLock.java rename to iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java index 63714e59f67..20509aac12c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/HashLock.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/HashLock.java @@ -1,6 +1,5 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; -import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantReadWriteLock; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandler.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandler.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandler.java rename to iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandler.java index a50c9d4e4df..bbf533a9e00 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandler.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandler.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactory.java rename to iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java index 7a9dc110b14..862adaa23f9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactory.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactory.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTThreadFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTThreadFactory.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTThreadFactory.java rename to iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTThreadFactory.java index 6c94747a28e..956720a8f10 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/IoTThreadFactory.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/IoTThreadFactory.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/ThreadName.java b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/ThreadName.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/ThreadName.java rename to iotdb/src/main/java/org/apache/iotdb/db/concurrent/ThreadName.java index 95acb15cbbb..5817a91c4b3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/concurrent/ThreadName.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/concurrent/ThreadName.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; public enum ThreadName { JDBC_SERVICE("JDBC-ServerServiceImpl"), diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConfig.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConfig.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java index c4701857af1..7eb74882686 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConfig.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConfig.java @@ -1,4 +1,6 @@ -package cn.edu.tsinghua.iotdb.conf; +package org.apache.iotdb.db.conf; + +import org.apache.iotdb.db.metadata.MManager; import java.io.File; import java.time.ZoneId; @@ -11,7 +13,7 @@ public class IoTDBConfig { public static final String default_data_dir = "data"; public static final String default_sys_dir = "system"; public static final String default_tsfile_dir = "settled"; - public static final String mult_dir_strategy_prefix = "cn.edu.tsinghua.iotdb.conf.directories.strategy."; + public static final String mult_dir_strategy_prefix = "org.apache.iotdb.db.conf.directories.strategy."; public static final String default_mult_dir_strategy = "MaxDiskUsableSpaceFirstStrategy"; /** @@ -236,7 +238,7 @@ public class IoTDBConfig { public int externalSortThreshold = 50; /** - * Cache size of {@code checkAndGetDataTypeCache} in {@link cn.edu.tsinghua.iotdb.metadata.MManager} + * Cache size of {@code checkAndGetDataTypeCache} in {@link MManager} */ public int mManagerCacheSize = 400000; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConstant.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConstant.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java index 973add39dc3..9f115748b8d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBConstant.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.conf; +package org.apache.iotdb.db.conf; public class IoTDBConstant { public static final String ENV_FILE_NAME = "iotdb-env"; @@ -11,7 +11,7 @@ public class IoTDBConstant { public static final String SERVER_RMI_ID = "java.rmi.server.randomIDs"; public static final String RMI_SERVER_HOST_NAME = "java.rmi.server.hostname"; public static final String JMX_REMOTE_RMI_PORT = "com.sun.management.jmxremote.rmi.port"; - public static final String IOTDB_PACKAGE = "cn.edu.tsinghua.iotdb.service"; + public static final String IOTDB_PACKAGE = "org.apache.iotdb.service"; public static final String JMX_TYPE = "type"; public static final long GB = 1024 * 1024 * 1024L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBDescriptor.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBDescriptor.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java index 3731dea9200..c6f1d7348ee 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/IoTDBDescriptor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/IoTDBDescriptor.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.conf; +package org.apache.iotdb.db.conf; import java.io.File; import java.io.FileInputStream; @@ -6,10 +6,10 @@ import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.time.ZoneId; -import java.time.ZoneOffset; import java.util.Properties; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/Directories.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/Directories.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/Directories.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/Directories.java index 0c5bebb2768..5168dcb9eb2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/Directories.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/Directories.java @@ -1,12 +1,11 @@ -package cn.edu.tsinghua.iotdb.conf.directories; +package org.apache.iotdb.db.conf.directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.conf.directories.strategy.DirectoryStrategy; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.strategy.DirectoryStrategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; -import java.io.IOException; import java.util.*; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/DirectoryStrategy.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/DirectoryStrategy.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/DirectoryStrategy.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/DirectoryStrategy.java index ea721cea6b8..dcb996e2057 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/DirectoryStrategy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/DirectoryStrategy.java @@ -1,11 +1,8 @@ -package cn.edu.tsinghua.iotdb.conf.directories.strategy; +package org.apache.iotdb.db.conf.directories.strategy; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; import java.util.List; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java index b25bfd15cc6..c50690a1db4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MaxDiskUsableSpaceFirstStrategy.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.conf.directories.strategy; +package org.apache.iotdb.db.conf.directories.strategy; import java.io.File; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java index 34cfe6bc1e2..356a11d8a89 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinDirOccupiedSpaceFirstStrategy.java @@ -1,6 +1,5 @@ -package cn.edu.tsinghua.iotdb.conf.directories.strategy; +package org.apache.iotdb.db.conf.directories.strategy; -import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -8,7 +7,6 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Random; -import java.util.logging.Logger; public class MinDirOccupiedSpaceFirstStrategy extends DirectoryStrategy { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java index 18f907533c1..56e74799946 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/MinFolderOccupiedSpaceFirstStrategy.java @@ -1,6 +1,5 @@ -package cn.edu.tsinghua.iotdb.conf.directories.strategy; +package org.apache.iotdb.db.conf.directories.strategy; -import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; @@ -8,7 +7,6 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Random; -import java.util.logging.Logger; public class MinFolderOccupiedSpaceFirstStrategy extends DirectoryStrategy { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/SequenceStrategy.java b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/SequenceStrategy.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/SequenceStrategy.java rename to iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/SequenceStrategy.java index 3ebe5f7a0f6..b76dcceb798 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/conf/directories/strategy/SequenceStrategy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/conf/directories/strategy/SequenceStrategy.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.conf.directories.strategy; +package org.apache.iotdb.db.conf.directories.strategy; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/Processor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/Processor.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/Processor.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/Processor.java index a70f6ba5417..ea101cbbdf5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/Processor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/Processor.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.iotdb.engine; +package org.apache.iotdb.db.engine; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.BufferWriteProcessor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeProcessor; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.filenode.FileNodeProcessor; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.filenode.FileNodeProcessor; import java.io.IOException; import java.util.concurrent.locks.ReadWriteLock; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/Action.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/Action.java similarity index 68% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/Action.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/Action.java index 8217b7a30d9..a1cbfbe0f5c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/Action.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/Action.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; /** * @author kangrong diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java index 7beedf28b3f..9d4559fcdd2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java @@ -1,29 +1,32 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.Processor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; -import cn.edu.tsinghua.iotdb.engine.memtable.IMemTable; -import cn.edu.tsinghua.iotdb.engine.memtable.MemSeriesLazyMerger; -import cn.edu.tsinghua.iotdb.engine.memtable.MemTableFlushUtil; -import cn.edu.tsinghua.iotdb.engine.memtable.PrimitiveMemTable; -import cn.edu.tsinghua.iotdb.engine.pool.FlushManager; -import cn.edu.tsinghua.iotdb.engine.querycontext.ReadOnlyMemChunk; -import cn.edu.tsinghua.iotdb.engine.utils.FlushStatus; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.Processor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.memtable.IMemTable; +import org.apache.iotdb.db.engine.memtable.MemSeriesLazyMerger; +import org.apache.iotdb.db.engine.memtable.MemTableFlushUtil; +import org.apache.iotdb.db.engine.memtable.PrimitiveMemTable; +import org.apache.iotdb.db.engine.pool.FlushManager; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.engine.utils.FlushStatus; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/FileNodeConstants.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/FileNodeConstants.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/FileNodeConstants.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/FileNodeConstants.java index 5f5f7c2ad18..920e97ded70 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/FileNodeConstants.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/FileNodeConstants.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; /** * Constants for using in bufferwrite, overflow and filenode diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriter.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriter.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java index e814b88edfe..f5c845995ef 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriter.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.writer.DefaultTsFileOutput; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.writer.TsFileOutput; +import org.apache.iotdb.tsfile.file.metadata.ChunkGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.writer.DefaultTsFileOutput; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.writer.TsFileOutput; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/RowGroupBlockMetaDataCache.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/RowGroupBlockMetaDataCache.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java index 26dc5d8bb1b..012eedcda77 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/RowGroupBlockMetaDataCache.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/RowGroupBlockMetaDataCache.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.iotdb.engine.cache; +package org.apache.iotdb.db.engine.cache; import java.io.IOException; import java.util.LinkedHashMap; import java.util.Map; import java.util.concurrent.atomic.AtomicLong; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; /** * This class is used to cache RowGroupBlockMetaDataCache of tsfile diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetaDataCache.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetaDataCache.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetaDataCache.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetaDataCache.java index 2919832bc64..e6d86f6339c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetaDataCache.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetaDataCache.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.cache; +package org.apache.iotdb.db.engine.cache; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; @@ -7,7 +7,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; /** * This class is used to cache TsFileMetaData of tsfile in IoTDB. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetadataUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetadataUtils.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetadataUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetadataUtils.java index 107fe7bdca1..5947f3c3452 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/cache/TsFileMetadataUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/cache/TsFileMetadataUtils.java @@ -1,9 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.cache; +package org.apache.iotdb.db.engine.cache; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java index 0504eef8140..16f79955203 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java @@ -1,53 +1,42 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.Processor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.BufferWriteProcessor; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; -import cn.edu.tsinghua.iotdb.engine.overflow.ioV2.OverflowProcessor; -import cn.edu.tsinghua.iotdb.engine.pool.FlushManager; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.FileNodeProcessorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.monitor.IStatistic; -import cn.edu.tsinghua.iotdb.monitor.MonitorConstants; -import cn.edu.tsinghua.iotdb.monitor.StatMonitor; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.Processor; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.engine.pool.FlushManager; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.IStatistic; +import org.apache.iotdb.db.monitor.MonitorConstants; +import org.apache.iotdb.db.monitor.StatMonitor; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java index d275da4b85c..2ba36cb625c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java @@ -1,58 +1,72 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.Processor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.BufferWriteProcessor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.engine.overflow.ioV2.OverflowProcessor; -import cn.edu.tsinghua.iotdb.engine.pool.MergeManager; -import cn.edu.tsinghua.iotdb.engine.querycontext.GlobalSortedSeriesDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowSeriesDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.ReadOnlyMemChunk; -import cn.edu.tsinghua.iotdb.engine.querycontext.UnsealedTsFile; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.exception.ErrorDebugException; -import cn.edu.tsinghua.iotdb.exception.FileNodeProcessorException; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.monitor.IStatistic; -import cn.edu.tsinghua.iotdb.monitor.MonitorConstants; -import cn.edu.tsinghua.iotdb.monitor.StatMonitor; -import cn.edu.tsinghua.iotdb.query.factory.SeriesReaderFactory; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.chunk.ChunkBuffer; -import cn.edu.tsinghua.tsfile.write.chunk.ChunkWriterImpl; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.JsonConverter; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.Processor; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.engine.pool.MergeManager; +import org.apache.iotdb.db.engine.querycontext.GlobalSortedSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.engine.querycontext.UnsealedTsFile; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.exception.ErrorDebugException; +import org.apache.iotdb.db.exception.FileNodeProcessorException; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.IStatistic; +import org.apache.iotdb.db.monitor.MonitorConstants; +import org.apache.iotdb.db.monitor.StatMonitor; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.chunk.ChunkBuffer; +import org.apache.iotdb.tsfile.write.chunk.ChunkWriterImpl; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.JsonConverter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.engine.querycontext.GlobalSortedSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.engine.querycontext.UnsealedTsFile; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.IStatistic; +import org.apache.iotdb.db.monitor.MonitorConstants; +import org.apache.iotdb.db.monitor.StatMonitor; import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStatus.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStatus.java similarity index 60% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStatus.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStatus.java index e03609a848d..44026f07b0b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStatus.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStatus.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; public enum FileNodeProcessorStatus { NONE, MERGING_WRITE, WAITING diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStore.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStore.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStore.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStore.java index 8396deaf7dd..82b13e0e29f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/FileNodeProcessorStore.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessorStore.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; import java.io.Serializable; import java.util.HashMap; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/IntervalFileNode.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/IntervalFileNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java index ba630a424b2..fb4a5342b59 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/IntervalFileNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; import java.io.File; import java.io.Serializable; @@ -7,7 +7,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; +import org.apache.iotdb.db.conf.directories.Directories; /** * This class is used to store one bufferwrite file status.
diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/Main.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/Main.java similarity index 58% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/Main.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/Main.java index f0015259ce4..d2479db3643 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/Main.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/Main.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; /** * Created by liukun on 2019/1/9. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/OverflowChangeType.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/OverflowChangeType.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/OverflowChangeType.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/OverflowChangeType.java index 1da353c5919..d0ccf64d2d5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/OverflowChangeType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/OverflowChangeType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; /** * if a file is not changed by overflow, it's in NO_CHANGE;
diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtil.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/SerializeUtil.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtil.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/SerializeUtil.java index ba8f9a309e2..033a7e8271e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtil.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/SerializeUtil.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; import java.io.File; import java.io.FileInputStream; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/TimeIntervalTsFile.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TimeIntervalTsFile.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/TimeIntervalTsFile.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TimeIntervalTsFile.java index 033ddcf0def..5e6b0960c5e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/TimeIntervalTsFile.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenodeV2/TimeIntervalTsFile.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenodeV2; +package org.apache.iotdb.db.engine.filenodeV2; import java.io.File; import java.io.Serializable; @@ -7,9 +7,9 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeProcessorStatus; -import cn.edu.tsinghua.iotdb.engine.filenode.OverflowChangeType; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.filenode.FileNodeProcessorStatus; +import org.apache.iotdb.db.engine.filenode.OverflowChangeType; /** * This class is used to store the TsFile status.
diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BasicMemController.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BasicMemController.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java index effcf09579c..20d689726c2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BasicMemController.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/BasicMemController.java @@ -1,15 +1,18 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public abstract class BasicMemController implements IService{ +public abstract class BasicMemController implements IService { private static final Logger logger = LoggerFactory.getLogger(BasicMemController.class); private IoTDBConfig config; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/FlushPartialPolicy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java similarity index 84% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/FlushPartialPolicy.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java index 6ee22dc15ea..51ddf7dd8c8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/FlushPartialPolicy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/FlushPartialPolicy.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/ForceFLushAllPolicy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java similarity index 84% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/ForceFLushAllPolicy.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java index ce1055fadd3..5099e3e31bd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/ForceFLushAllPolicy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/ForceFLushAllPolicy.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/JVMMemController.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/JVMMemController.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/JVMMemController.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/JVMMemController.java index 809f283855a..8c7e68f44eb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/JVMMemController.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/JVMMemController.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.utils.MemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemMonitorThread.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemMonitorThread.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemMonitorThread.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemMonitorThread.java index 99e9494a44f..e079bd3464d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemMonitorThread.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemMonitorThread.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.concurrent.ThreadName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemStatisticThread.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemStatisticThread.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemStatisticThread.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemStatisticThread.java index 52aec26578b..3092a8b6389 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemStatisticThread.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/MemStatisticThread.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.concurrent.ThreadName; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MemStatisticThread extends Thread{ diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/NoActPolicy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/NoActPolicy.java similarity index 84% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/NoActPolicy.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/NoActPolicy.java index 14731269bfb..a7fd5220fb2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/NoActPolicy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/NoActPolicy.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.utils.MemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/Policy.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/Policy.java similarity index 74% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/Policy.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/Policy.java index 9a12a0de04b..da57d9ea7e9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/Policy.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/Policy.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; /** * This class defines what act will be taken if memory reaches a certain threshold. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/RecordMemController.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/RecordMemController.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/RecordMemController.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/RecordMemController.java index b69f3b4a934..65dac5f418d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memcontrol/RecordMemController.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memcontrol/RecordMemController.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.utils.MemUtils; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.utils.MemUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/AbstractMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/AbstractMemTable.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java index bd32b45e5cd..96c6162ce68 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/AbstractMemTable.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.util.HashMap; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IMemTable.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java index 01e4352e67a..15a76e0aa2e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IMemTable.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IWritableMemChunk.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IWritableMemChunk.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java index dd140e4486f..eabd4ad78ba 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/IWritableMemChunk.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Binary; public interface IWritableMemChunk extends TimeValuePairSorter{ diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemSeriesLazyMerger.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemSeriesLazyMerger.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemSeriesLazyMerger.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemSeriesLazyMerger.java index 184208dd8ed..0e97585d6a4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemSeriesLazyMerger.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemSeriesLazyMerger.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TimeValuePair; import java.util.ArrayList; import java.util.Collections; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableFlushUtil.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableFlushUtil.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java index 27dca94b14c..97b59cbd627 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableFlushUtil.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java @@ -1,22 +1,22 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; import java.io.IOException; import java.util.List; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.write.chunk.ChunkBuffer; -import cn.edu.tsinghua.tsfile.write.chunk.ChunkWriterImpl; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; -import cn.edu.tsinghua.tsfile.write.page.PageWriter; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.chunk.ChunkBuffer; +import org.apache.iotdb.tsfile.write.chunk.ChunkWriterImpl; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.write.page.PageWriter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.schema.FileSchema; public class MemTableFlushUtil { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTable.java similarity index 64% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTable.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTable.java index 1e74dc8cb92..bafb37dec2e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTable.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTable.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; public class PrimitiveMemTable extends AbstractMemTable { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairInMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairInMemTable.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairInMemTable.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairInMemTable.java index 1cab29588f2..fbe8f6db338 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairInMemTable.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairInMemTable.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; public class TimeValuePairInMemTable extends TimeValuePair implements Comparable { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairSorter.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairSorter.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairSorter.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairSorter.java index d9a6d7eeeb6..4cddf467476 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/TimeValuePairSorter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/TimeValuePairSorter.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TimeValuePair; import java.util.Iterator; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/WritableMemChunk.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/WritableMemChunk.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/WritableMemChunk.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/WritableMemChunk.java index 4f26c8ad63f..0fd58985fc6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/memtable/WritableMemChunk.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/WritableMemChunk.java @@ -1,12 +1,16 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.iotdb.utils.PrimitiveArrayList; -import cn.edu.tsinghua.iotdb.utils.PrimitiveArrayListFactory; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.db.utils.PrimitiveArrayList; +import org.apache.iotdb.db.utils.PrimitiveArrayListFactory; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.db.utils.PrimitiveArrayList; +import org.apache.iotdb.db.utils.PrimitiveArrayListFactory; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; import java.util.ArrayList; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIO.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIO.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIO.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIO.java index 2e760d18258..26ce2207ebf 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIO.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIO.java @@ -1,11 +1,13 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; -import cn.edu.tsinghua.iotdb.engine.overflow.metadata.OFRowGroupListMetadata; -import cn.edu.tsinghua.iotdb.engine.overflow.metadata.OFSeriesListMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.reader.TsFileInput; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.writer.TsFileOutput; +import org.apache.iotdb.db.engine.overflow.metadata.OFRowGroupListMetadata; +import org.apache.iotdb.db.engine.overflow.metadata.OFSeriesListMetadata; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.reader.TsFileInput; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.writer.TsFileOutput; +import org.apache.iotdb.db.engine.overflow.metadata.OFRowGroupListMetadata; +import org.apache.iotdb.db.engine.overflow.metadata.OFSeriesListMetadata; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.io.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java index 677ba1558cc..4a8d1e609c4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java @@ -1,35 +1,44 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.Processor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; -import cn.edu.tsinghua.iotdb.engine.memtable.MemSeriesLazyMerger; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.iotdb.engine.pool.FlushManager; -import cn.edu.tsinghua.iotdb.engine.querycontext.MergeSeriesDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowInsertFile; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowSeriesDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.ReadOnlyMemChunk; -import cn.edu.tsinghua.iotdb.engine.utils.FlushStatus; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.Processor; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.memtable.MemSeriesLazyMerger; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.engine.pool.FlushManager; +import org.apache.iotdb.db.engine.querycontext.MergeSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.engine.utils.FlushStatus; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.engine.querycontext.MergeSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -230,7 +239,7 @@ public class OverflowProcessor extends Processor { * @throws IOException */ public OverflowSeriesDataSource query(String deviceId, String measurementId, - Filter filter, TSDataType dataType) throws IOException { + Filter filter, TSDataType dataType) throws IOException { queryFlushLock.lock(); try { // query insert data in memory and unseqTsFiles diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResource.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java index bef372f1279..bb1db4994ef 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import java.io.ByteArrayInputStream; @@ -11,19 +11,19 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.file.metadata.ChunkGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.engine.memtable.IMemTable; -import cn.edu.tsinghua.iotdb.engine.memtable.MemTableFlushUtil; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.engine.memtable.IMemTable; +import org.apache.iotdb.db.engine.memtable.MemTableFlushUtil; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; public class OverflowResource { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSeriesImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSeriesImpl.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSeriesImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSeriesImpl.java index ccfd6b3e03c..af4fac95407 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSeriesImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSeriesImpl.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.LongStatistics; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.statistics.LongStatistics; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.read.common.BatchData; /** * This class is only used to store and query overflow overflowIndex diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupport.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupport.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupport.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupport.java index 25e87d8d469..62bb34eda48 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupport.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupport.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; -import cn.edu.tsinghua.iotdb.engine.memtable.IMemTable; -import cn.edu.tsinghua.iotdb.engine.memtable.PrimitiveMemTable; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.db.engine.memtable.IMemTable; +import org.apache.iotdb.db.engine.memtable.PrimitiveMemTable; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; import java.util.HashMap; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadata.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadata.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadata.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadata.java index ebf025d3b1a..3bbf7041e73 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadata.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadata.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadata.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadata.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadata.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadata.java index 6a6f45d6956..726a1372054 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadata.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadata.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; import java.io.IOException; import java.io.InputStream; @@ -9,7 +9,7 @@ import java.util.Collections; import java.util.List; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import sun.reflect.generics.reflectiveObjects.NotImplementedException; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadata.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadata.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadata.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadata.java index 992154d8938..08ba3321541 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadata.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadata.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; import java.io.IOException; import java.io.InputStream; @@ -8,8 +8,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/MergeStatus.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/MergeStatus.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/MergeStatus.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/MergeStatus.java index b4bddb8e7ba..36c439c1750 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/MergeStatus.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/MergeStatus.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.utils; +package org.apache.iotdb.db.engine.overflow.utils; /** * Used for IntervalTreeOperation.queryMemory() and IntervalTreeOperation.queryFileBlock();
diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowOpType.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowOpType.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowOpType.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowOpType.java index f069832ec85..800a489a899 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowOpType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowOpType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.utils; +package org.apache.iotdb.db.engine.overflow.utils; /** * Include three types: INSERT,UPDATE,DELETE; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java index ef15a77b4ad..558e2428f71 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/OverflowReadWriteThriftFormatUtils.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.utils; +package org.apache.iotdb.db.engine.overflow.utils; -import cn.edu.tsinghua.iotdb.engine.overflow.metadata.OFFileMetadata; +import org.apache.iotdb.db.engine.overflow.metadata.OFFileMetadata; +import org.apache.iotdb.db.engine.overflow.metadata.OFFileMetadata; import java.io.IOException; import java.io.InputStream; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/TimePair.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/TimePair.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/TimePair.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/TimePair.java index ffa9feb4d9b..0ac11efaf9d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/overflow/utils/TimePair.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/utils/TimePair.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.utils; +package org.apache.iotdb.db.engine.overflow.utils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; /** * TimePair represents an overflow operation. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/FlushManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/pool/FlushManager.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/FlushManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/pool/FlushManager.java index a9aceadeb9f..4f8f34c2d08 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/FlushManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/pool/FlushManager.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.iotdb.engine.pool; +package org.apache.iotdb.db.engine.pool; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/MergeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/pool/MergeManager.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/MergeManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/pool/MergeManager.java index d2202490d0a..e300913ebe9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/pool/MergeManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/pool/MergeManager.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.iotdb.engine.pool; +package org.apache.iotdb.db.engine.pool; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; import java.util.concurrent.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/GlobalSortedSeriesDataSource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/GlobalSortedSeriesDataSource.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/GlobalSortedSeriesDataSource.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/GlobalSortedSeriesDataSource.java index 18c159f98a1..81f4b74449c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/GlobalSortedSeriesDataSource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/GlobalSortedSeriesDataSource.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.tsfile.read.common.Path; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/MergeSeriesDataSource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/MergeSeriesDataSource.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/MergeSeriesDataSource.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/MergeSeriesDataSource.java index cf65044c72b..9e87412399f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/MergeSeriesDataSource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/MergeSeriesDataSource.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; public class MergeSeriesDataSource { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowInsertFile.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowInsertFile.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowInsertFile.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowInsertFile.java index 9f6f7d91224..b0bf6346ffb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowInsertFile.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowInsertFile.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowSeriesDataSource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowSeriesDataSource.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowSeriesDataSource.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowSeriesDataSource.java index 82785852714..4635ab8d0da 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowSeriesDataSource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowSeriesDataSource.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowUpdateDeleteFile.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowUpdateDeleteFile.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowUpdateDeleteFile.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowUpdateDeleteFile.java index 995fc5fbd95..726c127d72b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/OverflowUpdateDeleteFile.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/OverflowUpdateDeleteFile.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/QueryDataSource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/QueryDataSource.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/QueryDataSource.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/QueryDataSource.java index 9c392c01255..f41c5d9d28e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/QueryDataSource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/QueryDataSource.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; public class QueryDataSource { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/ReadOnlyMemChunk.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/ReadOnlyMemChunk.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/ReadOnlyMemChunk.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/ReadOnlyMemChunk.java index c00a4e4c535..6838f31a790 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/ReadOnlyMemChunk.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/ReadOnlyMemChunk.java @@ -1,16 +1,19 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; import java.util.Collections; import java.util.Iterator; import java.util.List; //TODO: merge ReadOnlyMemChunk and WritableMemChunk and IWritableMemChunk -public class ReadOnlyMemChunk implements TimeValuePairSorter{ +public class ReadOnlyMemChunk implements TimeValuePairSorter { private boolean initialized; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/UnsealedTsFile.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/UnsealedTsFile.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/UnsealedTsFile.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/UnsealedTsFile.java index da2082a1e6a..85a234abe9b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/querycontext/UnsealedTsFile.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/querycontext/UnsealedTsFile.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.engine.querycontext; +package org.apache.iotdb.db.engine.querycontext; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/utils/FlushStatus.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/utils/FlushStatus.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/utils/FlushStatus.java rename to iotdb/src/main/java/org/apache/iotdb/db/engine/utils/FlushStatus.java index 6c81a595c5d..02af6dcfe42 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/engine/utils/FlushStatus.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/utils/FlushStatus.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.utils; +package org.apache.iotdb.db.engine.utils; /** * This class is used to represent the state of flush. It's can be used in the diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/ArgsErrorException.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/ArgsErrorException.java index d7f39fb7f56..b3b629ce1d2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ArgsErrorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/ArgsErrorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class ArgsErrorException extends Exception{ diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/BufferWriteProcessorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/BufferWriteProcessorException.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/BufferWriteProcessorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/BufferWriteProcessorException.java index 4b9014802fb..e393b9ab047 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/BufferWriteProcessorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/BufferWriteProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class BufferWriteProcessorException extends ProcessorException { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/DeltaEngineRunningException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/DeltaEngineRunningException.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/DeltaEngineRunningException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/DeltaEngineRunningException.java index 4245399fc7a..6adb9cfebec 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/DeltaEngineRunningException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/DeltaEngineRunningException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ErrorDebugException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/ErrorDebugException.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ErrorDebugException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/ErrorDebugException.java index 15447fea8d5..fe6a462efaa 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ErrorDebugException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/ErrorDebugException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * @author kangrong diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeManagerException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeManagerException.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeManagerException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeManagerException.java index e65ffb86c94..12ac866eff9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeManagerException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeManagerException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class FileNodeManagerException extends Exception { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeNotExistException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeNotExistException.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeNotExistException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeNotExistException.java index 9445e2ec66a..ce22fd65e0f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeNotExistException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeNotExistException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * Throw this exception when the file node processor is not exists diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeProcessorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeProcessorException.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeProcessorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeProcessorException.java index 306072149a7..b0bc2dfff46 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/FileNodeProcessorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/FileNodeProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class FileNodeProcessorException extends ProcessorException { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/MetadataArgsErrorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/MetadataArgsErrorException.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/MetadataArgsErrorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/MetadataArgsErrorException.java index 8a6b9752011..4a9582004dd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/MetadataArgsErrorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/MetadataArgsErrorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * If query metadata constructs schema but passes illegal parameters to diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/NotConsistentException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/NotConsistentException.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/NotConsistentException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/NotConsistentException.java index 8e03a730ab3..c27fdb8b1a8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/NotConsistentException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/NotConsistentException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class NotConsistentException extends Exception{ diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowProcessorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowProcessorException.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowProcessorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowProcessorException.java index 65e06b78d47..fefdf5f4a0d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowProcessorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class OverflowProcessorException extends ProcessorException { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowWrongParameterException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowWrongParameterException.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowWrongParameterException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowWrongParameterException.java index 99971c1d6a0..21b8830fbd2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/OverflowWrongParameterException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/OverflowWrongParameterException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * Used for IntervalTree pass wrong parameters.
diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/PathErrorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/PathErrorException.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/PathErrorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/PathErrorException.java index af74d329e3a..c022e9da9b0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/PathErrorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/PathErrorException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; public class PathErrorException extends QueryProcessorException { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorException.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorException.java index dec5aaba7da..7162498ce95 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * Processor Exception, the top-level exception in IoTDB. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorRuntimException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorRuntimException.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorRuntimException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorRuntimException.java index b4100e2c192..d6c98e52dc0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/ProcessorRuntimException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/ProcessorRuntimException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/RecoverException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/RecoverException.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/RecoverException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/RecoverException.java index dda963d57ed..cc38d9fafcd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/RecoverException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/RecoverException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class RecoverException extends Exception{ private static final long serialVersionUID = 3591716406230730147L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/StartupException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/StartupException.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/StartupException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/StartupException.java index bbf2e8fb5f1..6116e4946cb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/StartupException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/StartupException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class StartupException extends Exception{ private static final long serialVersionUID = -8591716406230730147L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedFillTypeException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedFillTypeException.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedFillTypeException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedFillTypeException.java index c127da5f592..6986e48fece 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedFillTypeException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedFillTypeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; public class UnSupportedFillTypeException extends DeltaEngineRunningException{ diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedOverflowOpTypeException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedOverflowOpTypeException.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedOverflowOpTypeException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedOverflowOpTypeException.java index fcd81a941cb..c0643f37f1f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/UnSupportedOverflowOpTypeException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/UnSupportedOverflowOpTypeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; /** * OverflowOpType could only be INSERT, UPDATE, DELETE. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/WALOverSizedException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/WALOverSizedException.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/WALOverSizedException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/WALOverSizedException.java index d3efa69cc7b..db2a9946ca4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/WALOverSizedException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/WALOverSizedException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/builder/ExceptionBuilder.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/builder/ExceptionBuilder.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/builder/ExceptionBuilder.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/builder/ExceptionBuilder.java index c6ce49071d4..9670c9b05b8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/builder/ExceptionBuilder.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/builder/ExceptionBuilder.java @@ -1,13 +1,12 @@ -package cn.edu.tsinghua.iotdb.exception.builder; +package org.apache.iotdb.db.exception.builder; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; -import java.util.Iterator; import java.util.Properties; public class ExceptionBuilder { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/AuthPluginException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/AuthPluginException.java similarity index 75% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/AuthPluginException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/AuthPluginException.java index 907d0a62087..540cf93e39f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/AuthPluginException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/AuthPluginException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class AuthPluginException extends IoTDBException { public AuthPluginException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionFailedException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionFailedException.java similarity index 71% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionFailedException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionFailedException.java index 6552ac94e04..f0d6af05336 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionFailedException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionFailedException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class ConnectionFailedException extends IoTDBException { public ConnectionFailedException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionHostException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionHostException.java similarity index 76% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionHostException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionHostException.java index dcdb9ea2d89..825c2b4ab20 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/ConnectionHostException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/ConnectionHostException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class ConnectionHostException extends IoTDBException { public ConnectionHostException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InsecureAPIException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InsecureAPIException.java similarity index 75% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InsecureAPIException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InsecureAPIException.java index 0d618525736..33c2320b284 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InsecureAPIException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InsecureAPIException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class InsecureAPIException extends IoTDBException{ public InsecureAPIException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InvalidParameterException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InvalidParameterException.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InvalidParameterException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InvalidParameterException.java index 25b5c945b9c..339dcbd3002 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/InvalidParameterException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/InvalidParameterException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class InvalidParameterException extends IoTDBException{ public InvalidParameterException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/IoTDBException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/IoTDBException.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/IoTDBException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/IoTDBException.java index 5148a8565dc..99014f1d4bc 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/IoTDBException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/IoTDBException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public abstract class IoTDBException extends Exception{ private static final long serialVersionUID = -8998294067060075273L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoParameterException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoParameterException.java similarity index 71% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoParameterException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoParameterException.java index bf84580ebcf..a4d7471c1d9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoParameterException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoParameterException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class NoParameterException extends IoTDBException{ public NoParameterException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoPreparedStatementException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoPreparedStatementException.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoPreparedStatementException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoPreparedStatementException.java index f496be503ac..b163695dce8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/NoPreparedStatementException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/NoPreparedStatementException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class NoPreparedStatementException extends IoTDBException { public NoPreparedStatementException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/OutOfMemoryException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/OutOfMemoryException.java similarity index 70% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/OutOfMemoryException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/OutOfMemoryException.java index 819c0554915..08a62a73a8b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/OutOfMemoryException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/OutOfMemoryException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class OutOfMemoryException extends IoTDBException{ public OutOfMemoryException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/UnknownException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/UnknownException.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/UnknownException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/UnknownException.java index 0b83fe715b8..042dfcea2ec 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/codebased/UnknownException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/codebased/UnknownException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.exception.codebased; +package org.apache.iotdb.db.exception.codebased; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; public class UnknownException extends IoTDBException { public UnknownException() { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/GeneratePhysicalPlanException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/GeneratePhysicalPlanException.java similarity index 68% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/GeneratePhysicalPlanException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/qp/GeneratePhysicalPlanException.java index b5fe6ad00d0..1618141b72e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/GeneratePhysicalPlanException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/GeneratePhysicalPlanException.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.exception.qp; +package org.apache.iotdb.db.exception.qp; -import cn.edu.tsinghua.iotdb.qp.logical.crud.UpdateOperator; +import org.apache.iotdb.db.qp.logical.crud.UpdateOperator; +import org.apache.iotdb.db.qp.logical.crud.UpdateOperator; /** * This exception is threw while meeting error in diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/IllegalASTFormatException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/IllegalASTFormatException.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/IllegalASTFormatException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/qp/IllegalASTFormatException.java index 4cdde5251f4..2e0d67fc9f1 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/IllegalASTFormatException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/IllegalASTFormatException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception.qp; +package org.apache.iotdb.db.exception.qp; /** * This exception is thrown while meeting error in parsing ast tree diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOperatorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOperatorException.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOperatorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOperatorException.java index 3cec0055343..575f8337b3d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOperatorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOperatorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception.qp; +package org.apache.iotdb.db.exception.qp; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOptimizeException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOptimizeException.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOptimizeException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOptimizeException.java index 2249a311774..4b6f087b70f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/LogicalOptimizeException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/LogicalOptimizeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception.qp; +package org.apache.iotdb.db.exception.qp; /** * This exception is thrown while meeting error in optimizing logical operator diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/QueryProcessorException.java b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/QueryProcessorException.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/QueryProcessorException.java rename to iotdb/src/main/java/org/apache/iotdb/db/exception/qp/QueryProcessorException.java index 8e8b543700b..615d602f1d9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/exception/qp/QueryProcessorException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/exception/qp/QueryProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.exception.qp; +package org.apache.iotdb.db.exception.qp; /** * This exception is the basic exception of query process. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/ColumnSchema.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/ColumnSchema.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/ColumnSchema.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/ColumnSchema.java index 3b577e5ea95..60720e530f7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/ColumnSchema.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/ColumnSchema.java @@ -1,13 +1,11 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.HashMap; -import java.util.HashSet; import java.util.Map; -import java.util.Set; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; public class ColumnSchema implements Serializable { private static final long serialVersionUID = -8257474930341487207L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MGraph.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MGraph.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MGraph.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MGraph.java index 75dbc36edac..82865909054 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MGraph.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MGraph.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.*; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; /** * Metadata Graph consists of one {@code MTree} and several {@code PTree} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MManager.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MManager.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MManager.java index 715bc483b30..a85a053d726 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MManager.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.utils.RandomDeleteCache; -import cn.edu.tsinghua.tsfile.exception.cache.CacheException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.utils.RandomDeleteCache; +import org.apache.iotdb.tsfile.exception.cache.CacheException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; import java.io.*; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MNode.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MNode.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MNode.java index b9415a52396..2397e156185 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MNode.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; /** * This class is the implementation of Metadata Node where "MNode" is the diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MTree.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MTree.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MTree.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MTree.java index 159982edf49..1f6605f6f76 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MTree.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MTree.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.*; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.db.exception.PathErrorException; /** * The hierarchical struct of the Metadata Tree is implemented in this class. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/Metadata.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/Metadata.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/Metadata.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/Metadata.java index c3891b796c9..22bc224707e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/Metadata.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/Metadata.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; /** * This class stores all the metadata info for every deviceId and every diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataConstant.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataConstant.java similarity index 84% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataConstant.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataConstant.java index 47ab84fb430..5a5ba785140 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataConstant.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; public class MetadataConstant { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataOperationType.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataOperationType.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataOperationType.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataOperationType.java index e219fc176fa..d1859859178 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/MetadataOperationType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/MetadataOperationType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; public class MetadataOperationType { public final static String ADD_PATH_TO_MTREE = "0"; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PNode.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/PNode.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/PNode.java index 5e7bb26e81e..ffb36534522 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/PNode.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.HashMap; import java.util.LinkedHashMap; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; /** * PNode is the shorthand for "Property Node", which make up The {@code PTree} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PTree.java b/iotdb/src/main/java/org/apache/iotdb/db/metadata/PTree.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PTree.java rename to iotdb/src/main/java/org/apache/iotdb/db/metadata/PTree.java index ac43c3b4dee..d7d45cc4cf1 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/metadata/PTree.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/metadata/PTree.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.PathErrorException; /** * "PTree" is the shorthand for "Property Tree". One {@code PTree} consists diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/IStatistic.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/IStatistic.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/IStatistic.java rename to iotdb/src/main/java/org/apache/iotdb/db/monitor/IStatistic.java index 58c727688f0..c58b1e048f3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/IStatistic.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/IStatistic.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.monitor; +package org.apache.iotdb.db.monitor; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.TSRecord; import java.util.HashMap; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/MonitorConstants.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/MonitorConstants.java rename to iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java index 4d0552f5400..90f215f1906 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/MonitorConstants.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/MonitorConstants.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.monitor; +package org.apache.iotdb.db.monitor; import java.util.HashMap; import java.util.concurrent.atomic.AtomicLong; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/StatMonitor.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/StatMonitor.java rename to iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java index f8f516cdef1..b4e3f108cf5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/monitor/StatMonitor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java @@ -1,37 +1,34 @@ -package cn.edu.tsinghua.iotdb.monitor; +package org.apache.iotdb.db.monitor; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.*; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; -import cn.edu.tsinghua.tsfile.common.constant.StatisticConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -public class StatMonitor implements IService{ +public class StatMonitor implements IService { private static final Logger LOGGER = LoggerFactory.getLogger(StatMonitor.class); private long runningTimeMillis = System.currentTimeMillis(); @@ -67,7 +64,7 @@ public class StatMonitor implements IService{ if (!mManager.pathExist(prefix)) { mManager.setStorageLevelToMTree(prefix); } - } catch (PathErrorException|IOException e) { + } catch (PathErrorException |IOException e) { LOGGER.error("MManager cannot set storage level to MTree.", e); } } @@ -192,7 +189,7 @@ public class StatMonitor implements IService{ entry.getKey(), entry.getValue(), "RLE", new String[0]); } } - } catch (MetadataArgsErrorException|IOException|PathErrorException e) { + } catch (MetadataArgsErrorException |IOException|PathErrorException e) { LOGGER.error("Initialize the metadata error.", e); } } diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderConfig.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderConfig.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderConfig.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderConfig.java index 6276ea2e355..81054d4802d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderConfig.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderConfig.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.postback.conf; +package org.apache.iotdb.db.postback.conf; import java.io.File; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.IoTDBDescriptor; /** * @author lta diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderDescriptor.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderDescriptor.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderDescriptor.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderDescriptor.java index 469e3dc6b89..391ca1db969 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/conf/PostBackSenderDescriptor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/conf/PostBackSenderDescriptor.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.conf; +package org.apache.iotdb.db.postback.conf; import java.io.File; import java.io.FileInputStream; @@ -10,7 +10,7 @@ import java.util.Properties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConstant; /** * @author lta diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerManager.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerManager.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerManager.java index 839752628c4..64a3cd60620 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerManager.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.receiver; +package org.apache.iotdb.db.postback.receiver; import org.apache.thrift.TProcessor; import org.apache.thrift.protocol.TBinaryProtocol; @@ -10,8 +10,8 @@ import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; /** * @author lta diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerService.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerService.java similarity index 99% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerService.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerService.java index 3b50a703508..4abb9f94d92 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerService.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerService.java @@ -4,7 +4,7 @@ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ -package cn.edu.tsinghua.iotdb.postback.receiver; +package org.apache.iotdb.db.postback.receiver; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; @@ -12,7 +12,6 @@ import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; -import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; @@ -22,13 +21,11 @@ import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; -import java.util.Set; -import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; -import java.util.Arrays; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerServiceImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerServiceImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java index 0ad17c27680..73d7e482982 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/receiver/ServerServiceImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/receiver/ServerServiceImpl.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.receiver; +package org.apache.iotdb.db.postback.receiver; import java.io.*; import java.math.BigInteger; @@ -9,36 +9,30 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import java.util.ArrayList; import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; -import java.util.Set; -import java.util.Map.Entry; +import org.apache.iotdb.db.exception.FileNodeManagerException; import org.apache.thrift.TException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.utils.PostbackUtils; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -import cn.edu.tsinghua.iotdb.engine.filenode.OverflowChangeType; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.utils.PostbackUtils; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.filenode.OverflowChangeType; +import org.apache.iotdb.db.exception.FileNodeManagerException; /** * @author lta */ public class ServerServiceImpl implements ServerService.Iface { - private final String JDBC_DRIVER_NAME = "cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"; + private final String JDBC_DRIVER_NAME = "org.apache.iotdb.jdbc.TsfileDriver"; private ThreadLocal uuid = new ThreadLocal(); private ThreadLocal>> fileNodeMap = new ThreadLocal<>(); // String means Storage Group, // List means the set of new Files(AbsulutePath) in local IoTDB diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileManager.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileManager.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileManager.java index 94f7ec8415d..9786438a3a5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileManager.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -15,10 +15,10 @@ import java.util.Set; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderConfig; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderDescriptor; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.postback.conf.PostBackSenderConfig; +import org.apache.iotdb.db.postback.conf.PostBackSenderDescriptor; /** * The class is to pick up which files need to postback. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSender.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSender.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSender.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSender.java index a5cebbef8ad..e8e8b9d692e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSender.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSender.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; import java.util.Set; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSenderImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSenderImpl.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSenderImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSenderImpl.java index 73e57d20045..eb07465174d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/sender/FileSenderImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/sender/FileSenderImpl.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; import java.io.BufferedReader; import java.io.ByteArrayOutputStream; @@ -17,22 +17,18 @@ import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; import java.security.MessageDigest; -import java.sql.Connection; -import java.sql.DriverManager; -import java.sql.SQLException; -import java.sql.Statement; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.UUID; import java.util.Map.Entry; -import cn.edu.tsinghua.iotdb.postback.receiver.ServerService; +import org.apache.iotdb.db.postback.receiver.ServerService; +import org.apache.iotdb.db.postback.receiver.ServerService; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; @@ -42,17 +38,16 @@ import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderConfig; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderDescriptor; -import cn.edu.tsinghua.iotdb.utils.PostbackUtils; +import org.apache.iotdb.db.postback.conf.PostBackSenderConfig; +import org.apache.iotdb.db.postback.conf.PostBackSenderDescriptor; +import org.apache.iotdb.db.utils.PostbackUtils; /** * The class is to transfer tsfiles that needs to postback to receiver. * @author lta */ public class FileSenderImpl implements FileSender{ - private final String JDBC_DRIVER_NAME = "cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"; + private final String JDBC_DRIVER_NAME = "org.apache.iotdb.jdbc.TsfileDriver"; private TTransport transport; private ServerService.Client clientOfServer; @@ -317,7 +312,7 @@ public class FileSenderImpl implements FileSender{ // // for (String filePath : snapshotFileList) { // input = new TsRandomAccessLocalFileReader(filePath); -// cn.edu.tsinghua.tsfile.read.FileReader reader = new cn.edu.tsinghua.tsfile.read.FileReader( +// org.apache.iotdb.tsfile.read.FileReader reader = new org.apache.iotdb.tsfile.read.FileReader( // input); // Map deviceIdMap = reader.getFileMetaData().getDeviceMap(); // Iterator it = deviceIdMap.keySet().iterator(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender1.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender1.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender1.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender1.java index 70467f94362..5228f28c24b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender1.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender1.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.postback.utils; +package org.apache.iotdb.db.postback.utils; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConstant; import java.io.BufferedReader; import java.io.File; @@ -188,7 +188,7 @@ public class CreateDataSender1 { storageGroupList.add("root.range_event"); try { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); connection = DriverManager.getConnection("jdbc:iotdb://localhost:6667/", "root", "root"); statement = connection.createStatement(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender2.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender2.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender2.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender2.java index 2744b011b1d..8604a3a433d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender2.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender2.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.utils; +package org.apache.iotdb.db.postback.utils; import java.io.BufferedReader; import java.io.File; @@ -9,7 +9,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.*; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConstant; /** * @author lta @@ -185,7 +185,7 @@ public class CreateDataSender2 { storageGroupList.add("root.range_event1"); try { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); connection = DriverManager.getConnection("jdbc:iotdb://localhost:6667/", "root", "root"); statement = connection.createStatement(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender3.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender3.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender3.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender3.java index b95d0d39350..a203be565af 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/CreateDataSender3.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/CreateDataSender3.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.postback.utils; +package org.apache.iotdb.db.postback.utils; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConstant; import java.io.BufferedReader; import java.io.File; @@ -202,7 +202,7 @@ public class CreateDataSender3 { storageGroupList.add("root.range_event2"); try { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); connection = DriverManager.getConnection("jdbc:iotdb://localhost:6667/", "root", "root"); statement = connection.createStatement(); connection1 = DriverManager.getConnection("jdbc:iotdb://192.168.130.17:6667/", "root", "root"); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/RandomNum.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/RandomNum.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/RandomNum.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/utils/RandomNum.java index 6a881eca0e4..2ac2a9a8666 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/RandomNum.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/RandomNum.java @@ -1,7 +1,6 @@ -package cn.edu.tsinghua.iotdb.postback.utils; +package org.apache.iotdb.db.postback.utils; import java.util.Random; -import java.time.LocalDate; /** * Created by stefanie on 26/07/2017. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/Utils.java b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/Utils.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/Utils.java rename to iotdb/src/main/java/org/apache/iotdb/db/postback/utils/Utils.java index e602b6d72d6..bf07b4d8732 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/postback/utils/Utils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/postback/utils/Utils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.utils; +package org.apache.iotdb.db.postback.utils; /** * Created by stefanie on 07/08/2017. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/QueryProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/QueryProcessor.java similarity index 75% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/QueryProcessor.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/QueryProcessor.java index 3233cb8fea6..52a3fbf8677 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/QueryProcessor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/QueryProcessor.java @@ -1,32 +1,31 @@ -package cn.edu.tsinghua.iotdb.qp; +package org.apache.iotdb.db.qp; + +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.qp.IllegalASTFormatException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.qp.logical.crud.SFWOperator; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.strategy.LogicalGenerator; +import org.apache.iotdb.db.qp.strategy.PhysicalGenerator; +import org.apache.iotdb.db.qp.strategy.optimizer.ConcatPathOptimizer; +import org.apache.iotdb.db.qp.strategy.optimizer.DNFFilterOptimizer; +import org.apache.iotdb.db.qp.strategy.optimizer.MergeSingleFilterOptimizer; +import org.apache.iotdb.db.qp.strategy.optimizer.RemoveNotOptimizer; +import org.apache.iotdb.db.sql.ParseGenerator; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.ParseException; +import org.apache.iotdb.db.sql.parse.ParseUtils; import java.time.ZoneId; -import java.time.ZoneOffset; - -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.qp.IllegalASTFormatException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.SFWOperator; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.strategy.LogicalGenerator; -import cn.edu.tsinghua.iotdb.qp.strategy.PhysicalGenerator; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.ConcatPathOptimizer; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.DNFFilterOptimizer; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.MergeSingleFilterOptimizer; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.RemoveNotOptimizer; -import cn.edu.tsinghua.iotdb.sql.ParseGenerator; -import cn.edu.tsinghua.iotdb.sql.parse.ASTNode; -import cn.edu.tsinghua.iotdb.sql.parse.ParseException; -import cn.edu.tsinghua.iotdb.sql.parse.ParseUtils; /** * provide a integration method for other user. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/DatetimeUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/DatetimeUtils.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/DatetimeUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/constant/DatetimeUtils.java index 20b75f5b62f..bb3d7e46be4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/DatetimeUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/DatetimeUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.constant; +package org.apache.iotdb.db.qp.constant; import java.time.DateTimeException; import java.time.Instant; @@ -10,7 +10,7 @@ import java.time.format.DateTimeFormatterBuilder; import java.time.format.SignStyle; import java.time.temporal.ChronoField; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; public class DatetimeUtils { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/SQLConstant.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/SQLConstant.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/SQLConstant.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/constant/SQLConstant.java index 624f1d08c90..669a0f701a5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/SQLConstant.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/SQLConstant.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.qp.constant; +package org.apache.iotdb.db.qp.constant; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; import java.util.HashMap; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/TSParserConstant.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/TSParserConstant.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/TSParserConstant.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/constant/TSParserConstant.java index 96603a6ec0a..ed41788f2fe 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/constant/TSParserConstant.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/constant/TSParserConstant.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.iotdb.qp.constant; +package org.apache.iotdb.db.qp.constant; import java.util.HashMap; import java.util.Map; -import cn.edu.tsinghua.iotdb.sql.parse.TSParser; +import org.apache.iotdb.db.sql.parse.TSParser; +import org.apache.iotdb.db.sql.parse.TSParser; public class TSParserConstant { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/exception/DateTimeFormatException.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/exception/DateTimeFormatException.java similarity index 65% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/exception/DateTimeFormatException.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/exception/DateTimeFormatException.java index 89199933dcf..5d3c51996b5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/exception/DateTimeFormatException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/exception/DateTimeFormatException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.qp.exception; +package org.apache.iotdb.db.qp.exception; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; public class DateTimeFormatException extends QueryProcessorException { private static final long serialVersionUID = 5901175084493972130L; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/OverflowQPExecutor.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/executor/OverflowQPExecutor.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/OverflowQPExecutor.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/executor/OverflowQPExecutor.java index eef0daa2e33..2688610a787 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/OverflowQPExecutor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/executor/OverflowQPExecutor.java @@ -1,42 +1,42 @@ -package cn.edu.tsinghua.iotdb.qp.executor; +package org.apache.iotdb.db.qp.executor; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.authorizer.IAuthorizer; -import cn.edu.tsinghua.iotdb.auth.authorizer.LocalFileAuthorizer; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.metadata.MNode; -import cn.edu.tsinghua.iotdb.monitor.MonitorConstants; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.qp.logical.sys.AuthorOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.MetadataOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.AuthorPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.LoadDataPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.MetadataPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.PropertyPlan; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; -import cn.edu.tsinghua.iotdb.utils.LoadDataUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MNode; +import org.apache.iotdb.db.monitor.MonitorConstants; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.qp.logical.sys.AuthorOperator; +import org.apache.iotdb.db.qp.logical.sys.MetadataOperator; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.qp.physical.sys.AuthorPlan; +import org.apache.iotdb.db.qp.physical.sys.LoadDataPlan; +import org.apache.iotdb.db.qp.physical.sys.MetadataPlan; +import org.apache.iotdb.db.qp.physical.sys.PropertyPlan; +import org.apache.iotdb.db.utils.AuthUtils; +import org.apache.iotdb.db.utils.LoadDataUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/QueryProcessExecutor.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java similarity index 79% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/QueryProcessExecutor.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java index 22f686841e0..61f45cd4bd2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/executor/QueryProcessExecutor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java @@ -1,18 +1,25 @@ -package cn.edu.tsinghua.iotdb.qp.executor; +package org.apache.iotdb.db.qp.executor; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.QueryPlan; -import cn.edu.tsinghua.iotdb.query.executor.EngineQueryRouter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.QueryPlan; +import org.apache.iotdb.db.query.executor.EngineQueryRouter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.QueryPlan; +import org.apache.iotdb.db.query.executor.EngineQueryRouter; import java.io.IOException; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/Operator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/Operator.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/Operator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/Operator.java index 1f736929273..5cdc56ba904 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/Operator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/Operator.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.qp.logical; +package org.apache.iotdb.db.qp.logical; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; +import org.apache.iotdb.db.qp.constant.SQLConstant; /** * This class is a superclass of all operator. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/RootOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/RootOperator.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/RootOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/RootOperator.java index e95c3ec3d2d..95a40107544 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/RootOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/RootOperator.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.logical; +package org.apache.iotdb.db.qp.logical; /** * RootOperator indicates the operator that could be executed as a entire command. RootOperator diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicFunctionOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicFunctionOperator.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicFunctionOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicFunctionOperator.java index ce43d81f21d..2f2495f7b02 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicFunctionOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicFunctionOperator.java @@ -1,19 +1,19 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.StringContainer; /** * basic operator includes < > >= <= !=. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicOperatorType.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicOperatorType.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicOperatorType.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicOperatorType.java index 08200e4470f..b940520877f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/BasicOperatorType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/BasicOperatorType.java @@ -1,14 +1,14 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; /** * all basic operator in filter diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/DeleteOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/DeleteOperator.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/DeleteOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/DeleteOperator.java index d93c762d7e3..22236e3a165 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/DeleteOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/DeleteOperator.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.Operator; /** * this class extends {@code RootOperator} and process delete statement diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FilterOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FilterOperator.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FilterOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FilterOperator.java index 3b277cc0408..e6e755b6043 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FilterOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FilterOperator.java @@ -1,23 +1,23 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_AND; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_OR; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_AND; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_OR; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.utils.StringContainer; /** * This class is for filter operator and implements diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FromOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FromOperator.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FromOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FromOperator.java index 191bbec3038..64050ba470b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FromOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FromOperator.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FunctionOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FunctionOperator.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FunctionOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FunctionOperator.java index f955b667493..627765a8fbf 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/FunctionOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/FunctionOperator.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/InsertOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/InsertOperator.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/InsertOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/InsertOperator.java index e95e4764143..95d320d1ea0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/InsertOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/InsertOperator.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/QueryOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/QueryOperator.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/QueryOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/QueryOperator.java index 9b68cd635fb..4b6e7fe4b72 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/QueryOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/QueryOperator.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.query.fill.IFill; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.query.fill.IFill; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Pair; import java.util.List; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SFWOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SFWOperator.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SFWOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SFWOperator.java index 2ae4ddc03db..5acdd880242 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SFWOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SFWOperator.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.tsfile.read.common.Path; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SelectOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SelectOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java index adb5701357c..4b3d16a598f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/SelectOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/SelectOperator.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; /** * this class maintains information from select clause diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/UpdateOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/UpdateOperator.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/UpdateOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/UpdateOperator.java index c748756a13c..0cc2452337b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/crud/UpdateOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/crud/UpdateOperator.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.logical.crud; +package org.apache.iotdb.db.qp.logical.crud; /** * this class extends {@code RootOperator} and process update statement diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/AuthorOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/AuthorOperator.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/AuthorOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/AuthorOperator.java index 6e854378f38..64deed16ec8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/AuthorOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/AuthorOperator.java @@ -1,9 +1,7 @@ -package cn.edu.tsinghua.iotdb.qp.logical.sys; +package org.apache.iotdb.db.qp.logical.sys; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.tsfile.read.common.Path; /** * this class maintains information in Author statement, including CREATE, DROP, GRANT and REVOKE diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/LoadDataOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/LoadDataOperator.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/LoadDataOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/LoadDataOperator.java index 4e55b5aa35a..91a0558c57c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/LoadDataOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/LoadDataOperator.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.qp.logical.sys; +package org.apache.iotdb.db.qp.logical.sys; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; +import org.apache.iotdb.db.qp.logical.RootOperator; /** * this class maintains information in Author statement, including CREATE, DROP, GRANT and REVOKE diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/MetadataOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/MetadataOperator.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/MetadataOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/MetadataOperator.java index 7f3b5c2732f..2dd22df6e13 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/MetadataOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/MetadataOperator.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.qp.logical.sys; +package org.apache.iotdb.db.qp.logical.sys; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.tsfile.read.common.Path; /** * this class maintains information in Metadata.namespace statement diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/PropertyOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/PropertyOperator.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/PropertyOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/PropertyOperator.java index ecaba5e6cea..c33af09ccae 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/logical/sys/PropertyOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/logical/sys/PropertyOperator.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.qp.logical.sys; +package org.apache.iotdb.db.qp.logical.sys; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.tsfile.read.common.Path; /** * this class maintains information in Metadata.namespace statement diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/PhysicalPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/PhysicalPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java index 2b336420b94..2739688e497 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/PhysicalPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/PhysicalPlan.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.qp.physical; +package org.apache.iotdb.db.qp.physical; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; /** * This class is a abstract class for all type of PhysicalPlan. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/AggregationPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/AggregationPlan.java similarity index 77% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/AggregationPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/AggregationPlan.java index f6d245b4ca1..0f2e7d168cd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/AggregationPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/AggregationPlan.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.Operator; import java.util.ArrayList; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/DeletePlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/DeletePlan.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/DeletePlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/DeletePlan.java index 1d8ab27faf0..7ca6566b3cb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/DeletePlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/DeletePlan.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; public class DeletePlan extends PhysicalPlan { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/FillQueryPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/FillQueryPlan.java similarity index 66% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/FillQueryPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/FillQueryPlan.java index 8d7d54f933e..8a5b7a57a9b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/FillQueryPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/FillQueryPlan.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.query.fill.IFill; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.query.fill.IFill; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.query.fill.IFill; import java.util.Map; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/GroupByPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/GroupByPlan.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/GroupByPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/GroupByPlan.java index 0a1c39d4fea..a4ae2994ba9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/GroupByPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/GroupByPlan.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.db.qp.logical.Operator; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/InsertPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/InsertPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java index a1e65b89cb1..fbca46d78b4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/InsertPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; public class InsertPlan extends PhysicalPlan { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/QueryPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/QueryPlan.java similarity index 68% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/QueryPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/QueryPlan.java index b7e571d558c..df549b4b81f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/QueryPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/QueryPlan.java @@ -1,11 +1,13 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.logical.Operator; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/UpdatePlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/UpdatePlan.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/UpdatePlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/UpdatePlan.java index 0470b6123cf..ca1758b7fe6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/crud/UpdatePlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/crud/UpdatePlan.java @@ -1,16 +1,17 @@ -package cn.edu.tsinghua.iotdb.qp.physical.crud; +package org.apache.iotdb.db.qp.physical.crud; import java.util.ArrayList; import java.util.List; import java.util.Objects; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.db.qp.logical.Operator; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.lineFeedSignal; +import static org.apache.iotdb.db.qp.constant.SQLConstant.lineFeedSignal; public class UpdatePlan extends PhysicalPlan { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/AuthorPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/AuthorPlan.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/AuthorPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/AuthorPlan.java index 52272af85cc..824a063abe1 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/AuthorPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/AuthorPlan.java @@ -1,20 +1,24 @@ -package cn.edu.tsinghua.iotdb.qp.physical.sys; +package org.apache.iotdb.db.qp.physical.sys; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; -import cn.edu.tsinghua.iotdb.qp.logical.sys.AuthorOperator.AuthorType; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.qp.logical.sys.AuthorOperator.AuthorType; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.sys.AuthorOperator; public class AuthorPlan extends PhysicalPlan { - private final AuthorType authorType; + private final AuthorOperator.AuthorType authorType; private String userName; private String roleName; private String password; @@ -22,8 +26,8 @@ public class AuthorPlan extends PhysicalPlan { private Set permissions; private Path nodeName; - public AuthorPlan(AuthorType authorType, String userName, String roleName, String password, String newPassword, - String[] authorizationList, Path nodeName) throws AuthException { + public AuthorPlan(AuthorOperator.AuthorType authorType, String userName, String roleName, String password, String newPassword, + String[] authorizationList, Path nodeName) throws AuthException { super(false, Operator.OperatorType.AUTHOR); this.authorType = authorType; this.userName = userName; @@ -87,7 +91,7 @@ public class AuthorPlan extends PhysicalPlan { } } - public AuthorType getAuthorType() { + public AuthorOperator.AuthorType getAuthorType() { return authorType; } diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/LoadDataPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/LoadDataPlan.java similarity index 75% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/LoadDataPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/LoadDataPlan.java index a4aefb2cad4..71453522494 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/LoadDataPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/LoadDataPlan.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.iotdb.qp.physical.sys; +package org.apache.iotdb.db.qp.physical.sys; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; public class LoadDataPlan extends PhysicalPlan { private final String inputFilePath; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/MetadataPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/MetadataPlan.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/MetadataPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/MetadataPlan.java index 96c90895da2..78d4a69826c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/MetadataPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/MetadataPlan.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.iotdb.qp.physical.sys; +package org.apache.iotdb.db.qp.physical.sys; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.MetadataOperator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.sys.MetadataOperator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.sys.MetadataOperator; public class MetadataPlan extends PhysicalPlan { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/PropertyPlan.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/PropertyPlan.java similarity index 63% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/PropertyPlan.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/PropertyPlan.java index 8cc43790056..f2a727df98f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/physical/sys/PropertyPlan.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/physical/sys/PropertyPlan.java @@ -1,18 +1,20 @@ -package cn.edu.tsinghua.iotdb.qp.physical.sys; +package org.apache.iotdb.db.qp.physical.sys; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator.PropertyType; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator.PropertyType; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator; /** * Manipulate property plan */ public class PropertyPlan extends PhysicalPlan { - private final PropertyType propertyType; + private final PropertyOperator.PropertyType propertyType; private Path propertyPath; private Path metadataPath; @@ -24,12 +26,12 @@ public class PropertyPlan extends PhysicalPlan { return metadataPath; } - public PropertyType getPropertyType() { + public PropertyOperator.PropertyType getPropertyType() { return propertyType; } - public PropertyPlan(PropertyType propertyType, Path propertyPath, Path metadataPath) { + public PropertyPlan(PropertyOperator.PropertyType propertyType, Path propertyPath, Path metadataPath) { super(false, Operator.OperatorType.PROPERTY); this.propertyType = propertyType; this.propertyPath = propertyPath; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java index 308ca1f887c..5f85c05cacd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/LogicalGenerator.java @@ -1,48 +1,42 @@ -package cn.edu.tsinghua.iotdb.qp.strategy; +package org.apache.iotdb.db.qp.strategy; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.qp.constant.DatetimeUtils; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.qp.constant.TSParserConstant; -import cn.edu.tsinghua.iotdb.exception.qp.IllegalASTFormatException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.BasicFunctionOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.DeleteOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FromOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.InsertOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.QueryOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.SFWOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.SelectOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.UpdateOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.AuthorOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.AuthorOperator.AuthorType; -import cn.edu.tsinghua.iotdb.qp.logical.sys.LoadDataOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.MetadataOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator.PropertyType; -import cn.edu.tsinghua.iotdb.query.fill.IFill; -import cn.edu.tsinghua.iotdb.query.fill.LinearFill; -import cn.edu.tsinghua.iotdb.query.fill.PreviousFill; -import cn.edu.tsinghua.iotdb.sql.parse.ASTNode; -import cn.edu.tsinghua.iotdb.sql.parse.Node; -import cn.edu.tsinghua.iotdb.sql.parse.TSParser; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.utils.StringContainer; import org.antlr.runtime.Token; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.qp.IllegalASTFormatException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.constant.DatetimeUtils; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.qp.constant.TSParserConstant; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.db.qp.logical.crud.*; +import org.apache.iotdb.db.qp.logical.sys.AuthorOperator; +import org.apache.iotdb.db.qp.logical.sys.LoadDataOperator; +import org.apache.iotdb.db.qp.logical.sys.MetadataOperator; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator; +import org.apache.iotdb.db.query.fill.IFill; +import org.apache.iotdb.db.query.fill.LinearFill; +import org.apache.iotdb.db.query.fill.PreviousFill; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.Node; +import org.apache.iotdb.db.sql.parse.TSParser; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.utils.StringContainer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.time.ZoneId; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.*; +import static org.apache.iotdb.db.qp.constant.SQLConstant.LESSTHAN; +import static org.apache.iotdb.db.qp.constant.SQLConstant.LESSTHANOREQUALTO; /** * This class receives an ASTNode and transform it to an operator which is a @@ -233,22 +227,22 @@ public class LogicalGenerator { int tokenType = astNode.getChild(0).getType(); if(tokenType == TSParser.TOK_USER) { // list all users - initializedOperator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_USER); + initializedOperator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_USER); } else if(tokenType == TSParser.TOK_ROLE) { // list all roles - initializedOperator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_ROLE); + initializedOperator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_ROLE); } } else if(childrenSize == 3) { int tokenType = astNode.getChild(1).getType(); if(tokenType == TSParser.TOK_USER) { // list user privileges on seriesPath - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_USER_PRIVILEGE); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_USER_PRIVILEGE); initializedOperator = operator; operator.setUserName(astNode.getChild(1).getChild(0).getText()); operator.setNodeNameList(parsePath(astNode.getChild(2))); } else if(tokenType == TSParser.TOK_ROLE) { // list role privileges on seriesPath - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_ROLE_PRIVILEGE); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_ROLE_PRIVILEGE); initializedOperator = operator; operator.setRoleName(astNode.getChild(1).getChild(0).getText()); operator.setNodeNameList(parsePath(astNode.getChild(2))); @@ -258,12 +252,12 @@ public class LogicalGenerator { tokenType = astNode.getChild(2).getType(); if(tokenType == TSParser.TOK_USER) { // list all privileges of a user - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_USER_PRIVILEGE); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_USER_PRIVILEGE); initializedOperator = operator; operator.setUserName(astNode.getChild(2).getChild(0).getText()); } else if (tokenType == TSParser.TOK_ROLE) { // list all privileges of a role - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_ROLE_PRIVILEGE); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_ROLE_PRIVILEGE); initializedOperator = operator; operator.setRoleName(astNode.getChild(2).getChild(0).getText()); } @@ -271,12 +265,12 @@ public class LogicalGenerator { tokenType = astNode.getChild(2).getType(); if(tokenType == TSParser.TOK_USER) { // list all roles of a user - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_USER_ROLES); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_USER_ROLES); initializedOperator = operator; operator.setUserName(astNode.getChild(2).getChild(0).getText()); } else if(tokenType == TSParser.TOK_ROLE) { // list all users of a role - AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorType.LIST_ROLE_USERS); + AuthorOperator operator = new AuthorOperator(SQLConstant.TOK_LIST, AuthorOperator.AuthorType.LIST_ROLE_USERS); initializedOperator = operator; operator.setRoleName(astNode.getChild(2).getChild(0).getText()); } @@ -287,14 +281,14 @@ public class LogicalGenerator { private void analyzePropertyCreate(ASTNode astNode) { PropertyOperator propertyOperator = new PropertyOperator(SQLConstant.TOK_PROPERTY_CREATE, - PropertyType.ADD_TREE); + PropertyOperator.PropertyType.ADD_TREE); propertyOperator.setPropertyPath(new Path(astNode.getChild(0).getChild(0).getText())); initializedOperator = propertyOperator; } private void analyzePropertyAddLabel(ASTNode astNode) { PropertyOperator propertyOperator = new PropertyOperator(SQLConstant.TOK_PROPERTY_ADD_LABEL, - PropertyType.ADD_PROPERTY_LABEL); + PropertyOperator.PropertyType.ADD_PROPERTY_LABEL); Path propertyLabel = parsePropertyAndLabel(astNode, 0); propertyOperator.setPropertyPath(propertyLabel); initializedOperator = propertyOperator; @@ -302,7 +296,7 @@ public class LogicalGenerator { private void analyzePropertyDeleteLabel(ASTNode astNode) { PropertyOperator propertyOperator = new PropertyOperator(SQLConstant.TOK_PROPERTY_DELETE_LABEL, - PropertyType.DELETE_PROPERTY_LABEL); + PropertyOperator.PropertyType.DELETE_PROPERTY_LABEL); Path propertyLabel = parsePropertyAndLabel(astNode, 0); propertyOperator.setPropertyPath(propertyLabel); initializedOperator = propertyOperator; @@ -316,7 +310,7 @@ public class LogicalGenerator { private void analyzePropertyLink(ASTNode astNode) { PropertyOperator propertyOperator = new PropertyOperator(SQLConstant.TOK_PROPERTY_LINK, - PropertyType.ADD_PROPERTY_TO_METADATA); + PropertyOperator.PropertyType.ADD_PROPERTY_TO_METADATA); Path metaPath = parsePath(astNode.getChild(0)); propertyOperator.setMetadataPath(metaPath); Path propertyLabel = parsePropertyAndLabel(astNode, 1); @@ -326,7 +320,7 @@ public class LogicalGenerator { private void analyzePropertyUnLink(ASTNode astNode) { PropertyOperator propertyOperator = new PropertyOperator(SQLConstant.TOK_PROPERTY_UNLINK, - PropertyType.DEL_PROPERTY_FROM_METADATA); + PropertyOperator.PropertyType.DEL_PROPERTY_FROM_METADATA); Path metaPath = parsePath(astNode.getChild(0)); propertyOperator.setMetadataPath(metaPath); Path propertyLabel = parsePropertyAndLabel(astNode, 1); @@ -848,12 +842,12 @@ public class LogicalGenerator { AuthorOperator authorOperator; if (childCount == 2) { // create user - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_CREATE, AuthorType.CREATE_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_CREATE, AuthorOperator.AuthorType.CREATE_USER); authorOperator.setUserName(astNode.getChild(0).getChild(0).getText()); authorOperator.setPassWord(astNode.getChild(1).getChild(0).getText()); } else if (childCount == 1) { // create role - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_CREATE, AuthorType.CREATE_ROLE); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_CREATE, AuthorOperator.AuthorType.CREATE_ROLE); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); } else { throw new IllegalASTFormatException("illegal ast tree in grant author command, please check you SQL statement"); @@ -865,7 +859,7 @@ public class LogicalGenerator { int childCount = astNode.getChildCount(); AuthorOperator authorOperator; if (childCount == 1) { - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_UPDATE_USER, AuthorType.UPDATE_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_UPDATE_USER, AuthorOperator.AuthorType.UPDATE_USER); ASTNode user = astNode.getChild(0); if (user.getChildCount() != 2) { throw new IllegalASTFormatException("illegal ast tree in update password command, please check you SQL statement"); @@ -885,11 +879,11 @@ public class LogicalGenerator { // drop user or role switch (astNode.getChild(0).getType()) { case TSParser.TOK_USER: - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_DROP, AuthorType.DROP_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_DROP, AuthorOperator.AuthorType.DROP_USER); authorOperator.setUserName(astNode.getChild(0).getChild(0).getText()); break; case TSParser.TOK_ROLE: - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_DROP, AuthorType.DROP_ROLE); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_DROP, AuthorOperator.AuthorType.DROP_ROLE); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); break; default: @@ -906,7 +900,7 @@ public class LogicalGenerator { AuthorOperator authorOperator; if (childCount == 2) { // grant role to user - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorType.GRANT_ROLE_TO_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorOperator.AuthorType.GRANT_ROLE_TO_USER); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); authorOperator.setUserName(astNode.getChild(1).getChild(0).getText()); } else if (childCount == 3) { @@ -918,13 +912,13 @@ public class LogicalGenerator { Path nodePath = parsePath(astNode.getChild(2)); if (astNode.getChild(0).getType() == TSParser.TOK_USER) { // grant user - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorType.GRANT_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorOperator.AuthorType.GRANT_USER); authorOperator.setUserName(astNode.getChild(0).getChild(0).getText()); authorOperator.setPrivilegeList(privileges); authorOperator.setNodeNameList(nodePath); } else if (astNode.getChild(0).getType() == TSParser.TOK_ROLE) { // grant role - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorType.GRANT_ROLE); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_GRANT, AuthorOperator.AuthorType.GRANT_ROLE); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); authorOperator.setPrivilegeList(privileges); authorOperator.setNodeNameList(nodePath); @@ -942,7 +936,7 @@ public class LogicalGenerator { AuthorOperator authorOperator; if (childCount == 2) { // revoke role to user - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorType.REVOKE_ROLE_FROM_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorOperator.AuthorType.REVOKE_ROLE_FROM_USER); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); authorOperator.setUserName(astNode.getChild(1).getChild(0).getText()); } else if (childCount == 3) { @@ -954,13 +948,13 @@ public class LogicalGenerator { Path nodePath = parsePath(astNode.getChild(2)); if (astNode.getChild(0).getType() == TSParser.TOK_USER) { // revoke user - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorType.REVOKE_USER); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorOperator.AuthorType.REVOKE_USER); authorOperator.setUserName(astNode.getChild(0).getChild(0).getText()); authorOperator.setPrivilegeList(privileges); authorOperator.setNodeNameList(nodePath); } else if (astNode.getChild(0).getType() == TSParser.TOK_ROLE) { // revoke role - authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorType.REVOKE_ROLE); + authorOperator = new AuthorOperator(SQLConstant.TOK_AUTHOR_REVOKE, AuthorOperator.AuthorType.REVOKE_ROLE); authorOperator.setRoleName(astNode.getChild(0).getChild(0).getText()); authorOperator.setPrivilegeList(privileges); authorOperator.setNodeNameList(nodePath); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/PhysicalGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/PhysicalGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java index 14953bd5fb0..22a32a458e0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/PhysicalGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java @@ -1,24 +1,27 @@ -package cn.edu.tsinghua.iotdb.qp.strategy; +package org.apache.iotdb.db.qp.strategy; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.*; -import cn.edu.tsinghua.iotdb.qp.logical.sys.AuthorOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.LoadDataOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.MetadataOperator; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.*; -import cn.edu.tsinghua.iotdb.qp.physical.sys.AuthorPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.LoadDataPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.MetadataPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.PropertyPlan; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.qp.logical.crud.InsertOperator; +import org.apache.iotdb.db.qp.logical.crud.QueryOperator; +import org.apache.iotdb.db.qp.logical.sys.AuthorOperator; +import org.apache.iotdb.db.qp.logical.sys.LoadDataOperator; +import org.apache.iotdb.db.qp.logical.sys.MetadataOperator; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.*; +import org.apache.iotdb.db.qp.physical.sys.AuthorPlan; +import org.apache.iotdb.db.qp.physical.sys.LoadDataPlan; +import org.apache.iotdb.db.qp.physical.sys.MetadataPlan; +import org.apache.iotdb.db.qp.physical.sys.PropertyPlan; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -263,13 +266,13 @@ public class PhysicalGenerator { // "in format:[(a) and () and ()] or [] or [], a is not single! a:" + child); // } // switch (child.getSinglePath().toString()) { -// case SQLConstant.RESERVED_TIME: +// case RESERVED_TIME: // if (timeFilter != null) { // throw new GeneratePhysicalPlanException("time filter has been specified more than once"); // } // timeFilter = child; // break; -// case SQLConstant.RESERVED_FREQ: +// case RESERVED_FREQ: // if (freqFilter != null) { // throw new GeneratePhysicalPlanException("freq filter has been specified more than once"); // } diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ConcatPathOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ConcatPathOptimizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java index 9478e612c8f..ba7babed1ed 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/ConcatPathOptimizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ConcatPathOptimizer.java @@ -1,21 +1,26 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; +package org.apache.iotdb.db.qp.strategy.optimizer; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.*; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.crud.*; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.logical.crud.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.tsfile.read.common.Path; /** * concat paths in select and from clause diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/DNFFilterOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/DNFFilterOptimizer.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/DNFFilterOptimizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/DNFFilterOptimizer.java index 7a20f6d5f0b..9352a4656b3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/DNFFilterOptimizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/DNFFilterOptimizer.java @@ -1,13 +1,15 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; +package org.apache.iotdb.db.qp.strategy.optimizer; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_AND; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_OR; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_AND; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_OR; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; public class DNFFilterOptimizer implements IFilterOptimizer { diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/IFilterOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/IFilterOptimizer.java new file mode 100644 index 00000000000..cd38fd5f1be --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/IFilterOptimizer.java @@ -0,0 +1,13 @@ +package org.apache.iotdb.db.qp.strategy.optimizer; + +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; + +/** + * provide a filter operator, optimize it. + */ +public interface IFilterOptimizer { + FilterOperator optimize(FilterOperator filter) throws QueryProcessorException; +} diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ILogicalOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ILogicalOptimizer.java new file mode 100644 index 00000000000..b65c232bc8c --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/ILogicalOptimizer.java @@ -0,0 +1,14 @@ +package org.apache.iotdb.db.qp.strategy.optimizer; + +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.Operator; + +/** + * provide a context, transform it for optimization. + */ +public interface ILogicalOptimizer { + + Operator transform(Operator operator) throws LogicalOptimizeException; +} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/MergeSingleFilterOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/MergeSingleFilterOptimizer.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/MergeSingleFilterOptimizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/MergeSingleFilterOptimizer.java index ff85f153d3e..e9b542a9202 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/MergeSingleFilterOptimizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/MergeSingleFilterOptimizer.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; +package org.apache.iotdb.db.qp.strategy.optimizer; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.qp.logical.crud.BasicFunctionOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; import java.util.ArrayList; import java.util.Comparator; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/RemoveNotOptimizer.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/RemoveNotOptimizer.java similarity index 78% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/RemoveNotOptimizer.java rename to iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/RemoveNotOptimizer.java index 5fbfdb8990e..50103f8dbf4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/qp/strategy/optimizer/RemoveNotOptimizer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/optimizer/RemoveNotOptimizer.java @@ -1,16 +1,20 @@ -package cn.edu.tsinghua.iotdb.qp.strategy.optimizer; +package org.apache.iotdb.db.qp.strategy.optimizer; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_AND; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_NOT; -import static cn.edu.tsinghua.iotdb.qp.constant.SQLConstant.KW_OR; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_AND; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_NOT; +import static org.apache.iotdb.db.qp.constant.SQLConstant.KW_OR; import java.util.List; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.logical.crud.BasicFunctionOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.qp.logical.crud.BasicFunctionOperator; +import org.apache.iotdb.db.qp.logical.crud.FilterOperator; public class RemoveNotOptimizer implements IFilterOptimizer { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/executor/QueryJobExecutor.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/executor/QueryJobExecutor.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/executor/QueryJobExecutor.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/executor/QueryJobExecutor.java index 5077b479c93..2bf4f26bbc1 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/executor/QueryJobExecutor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/executor/QueryJobExecutor.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.query.component.executor; +package org.apache.iotdb.db.query.component.executor; -import cn.edu.tsinghua.iotdb.query.component.job.QueryJob; -import cn.edu.tsinghua.iotdb.query.component.job.QueryJobExecutionMessage; -import cn.edu.tsinghua.iotdb.query.component.job.QueryEngineImpl; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.iotdb.query.component.job.QueryEngine; +import org.apache.iotdb.db.query.component.job.QueryJob; +import org.apache.iotdb.db.query.component.job.QueryJobExecutionMessage; +import org.apache.iotdb.db.query.component.job.QueryEngineImpl; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.query.component.job.QueryEngine; public abstract class QueryJobExecutor implements Runnable { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngine.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngine.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngine.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngine.java index bf0bcdc1bd1..66357b5f375 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngine.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngine.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; -import cn.edu.tsinghua.iotdb.query.component.job.QueryJob; -import cn.edu.tsinghua.iotdb.query.component.job.QueryJobFuture; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.query.component.job.QueryJob; +import org.apache.iotdb.db.query.component.job.QueryJobFuture; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; public interface QueryEngine { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngineImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngineImpl.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngineImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngineImpl.java index 919bd3f4e50..183044978bc 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryEngineImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryEngineImpl.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.query.component.executor.QueryJobExecutor; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.query.component.executor.QueryJobExecutor; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.query.component.executor.QueryJobExecutor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJob.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJob.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJob.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJob.java index ee65172bcf2..6f871094c5e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJob.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJob.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; public abstract class QueryJob { diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobContext.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobContext.java new file mode 100644 index 00000000000..aaa34165f8b --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobContext.java @@ -0,0 +1,5 @@ +package org.apache.iotdb.db.query.component.job; + + +public class QueryJobContext { +} diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobDispatcher.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobDispatcher.java new file mode 100644 index 00000000000..e2be8c0c947 --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobDispatcher.java @@ -0,0 +1,12 @@ +package org.apache.iotdb.db.query.component.job; + +import org.apache.iotdb.db.query.component.executor.QueryJobExecutor; +import org.apache.iotdb.db.query.component.job.QueryJob; +import org.apache.iotdb.db.query.component.executor.QueryJobExecutor; + + +public interface QueryJobDispatcher { + + QueryJobExecutor dispatch(QueryJob queryJob); + +} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobExecutionMessage.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobExecutionMessage.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobExecutionMessage.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobExecutionMessage.java index 3d310414da1..0039d2b3b2c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobExecutionMessage.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobExecutionMessage.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; public class QueryJobExecutionMessage { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFuture.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFuture.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFuture.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFuture.java index 2ca2d15d162..28325b999d7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFuture.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFuture.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; public interface QueryJobFuture { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFutureImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFutureImpl.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFutureImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFutureImpl.java index bbf29207c42..de05955577c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobFutureImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobFutureImpl.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobStatus.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobStatus.java similarity index 68% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobStatus.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobStatus.java index 5fadeb24496..f90acfdceef 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobStatus.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobStatus.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; public enum QueryJobStatus { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobType.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobType.java similarity index 56% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobType.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobType.java index 88c83bdcffb..c12c924ae4f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/job/QueryJobType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/job/QueryJobType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.component.job; +package org.apache.iotdb.db.query.component.job; public enum QueryJobType { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/resource/QueryResource.java b/iotdb/src/main/java/org/apache/iotdb/db/query/component/resource/QueryResource.java similarity index 74% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/resource/QueryResource.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/component/resource/QueryResource.java index 93d44439000..bdeebdb7028 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/component/resource/QueryResource.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/component/resource/QueryResource.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.component.resource; +package org.apache.iotdb.db.query.component.resource; public interface QueryResource { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManager.java b/iotdb/src/main/java/org/apache/iotdb/db/query/control/FileReaderManager.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/control/FileReaderManager.java index 8b5bd9dfce9..c5d63eb26f7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/control/FileReaderManager.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.UnClosedTsFileReader; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.UnClosedTsFileReader; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -17,8 +17,6 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; -import static cn.edu.tsinghua.iotdb.service.ServiceType.FILE_READER_MANAGER_SERVICE; - /** *

Singleton pattern, to manage all file reader. * Manage all opened file streams, to ensure that each file will be opened at most once. @@ -165,7 +163,7 @@ public class FileReaderManager implements IService { @Override public ServiceType getID() { - return FILE_READER_MANAGER_SERVICE; + return ServiceType.FILE_READER_MANAGER_SERVICE; } private static class FileReaderManagerHelper { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManager.java b/iotdb/src/main/java/org/apache/iotdb/db/query/control/OpenedFilePathsManager.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/control/OpenedFilePathsManager.java index 5a91cdee7ae..4b1ca250dc8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/control/OpenedFilePathsManager.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; -import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowInsertFile; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; import java.util.HashSet; import java.util.Set; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryDataSourceManager.java b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java similarity index 58% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryDataSourceManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java index 3e7b6e09dca..b081356fa20 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryDataSourceManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java @@ -1,10 +1,13 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; /** *

This class is used to get query data source of a given path. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManager.java b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryTokenManager.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryTokenManager.java index 8870841dabd..761c878b6f2 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryTokenManager.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.ExpressionType; -import cn.edu.tsinghua.tsfile.read.expression.IBinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; import java.util.HashSet; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithTimeGenerator.java similarity index 77% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithTimeGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithTimeGenerator.java index 69b078f1c65..270d39e9f4a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithTimeGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithTimeGenerator.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.iotdb.query.dataset; +package org.apache.iotdb.db.query.dataset; -import cn.edu.tsinghua.iotdb.query.reader.merge.EngineReaderByTimeStamp; -import cn.edu.tsinghua.iotdb.query.timegenerator.EngineTimeGenerator; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.db.query.reader.merge.EngineReaderByTimeStamp; +import org.apache.iotdb.db.query.timegenerator.EngineTimeGenerator; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Binary; import java.io.IOException; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithoutTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithoutTimeGenerator.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithoutTimeGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithoutTimeGenerator.java index 1a98dced585..f73b8979730 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/dataset/EngineDataSetWithoutTimeGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/dataset/EngineDataSetWithoutTimeGenerator.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.iotdb.query.dataset; +package org.apache.iotdb.db.query.dataset; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; import java.io.IOException; import java.util.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java similarity index 61% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithTimeGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java index 5c5253d3c93..bba04c053d7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithTimeGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java @@ -1,22 +1,30 @@ -package cn.edu.tsinghua.iotdb.query.executor; +package org.apache.iotdb.db.query.executor; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.query.control.QueryDataSourceManager; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.iotdb.query.dataset.EngineDataSetWithTimeGenerator; -import cn.edu.tsinghua.iotdb.query.factory.SeriesReaderFactory; -import cn.edu.tsinghua.iotdb.query.reader.merge.EngineReaderByTimeStamp; -import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReader; -import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReaderByTimestamp; -import cn.edu.tsinghua.iotdb.query.reader.sequence.SequenceDataReader; -import cn.edu.tsinghua.iotdb.query.timegenerator.EngineTimeGenerator; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.dataset.EngineDataSetWithTimeGenerator; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; +import org.apache.iotdb.db.query.reader.merge.EngineReaderByTimeStamp; +import org.apache.iotdb.db.query.reader.merge.PriorityMergeReader; +import org.apache.iotdb.db.query.reader.merge.PriorityMergeReaderByTimestamp; +import org.apache.iotdb.db.query.reader.sequence.SequenceDataReader; +import org.apache.iotdb.db.query.timegenerator.EngineTimeGenerator; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.dataset.EngineDataSetWithTimeGenerator; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithoutTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithoutTimeGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java index f4ffc1a0e0f..7d1d4271003 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineExecutorWithoutTimeGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java @@ -1,22 +1,30 @@ -package cn.edu.tsinghua.iotdb.query.executor; +package org.apache.iotdb.db.query.executor; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.query.control.QueryDataSourceManager; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.iotdb.query.dataset.EngineDataSetWithoutTimeGenerator; -import cn.edu.tsinghua.iotdb.query.factory.SeriesReaderFactory; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReader; -import cn.edu.tsinghua.iotdb.query.reader.sequence.SequenceDataReader; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.dataset.EngineDataSetWithoutTimeGenerator; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.query.reader.merge.PriorityMergeReader; +import org.apache.iotdb.db.query.reader.sequence.SequenceDataReader; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.dataset.EngineDataSetWithoutTimeGenerator; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineQueryRouter.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineQueryRouter.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineQueryRouter.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineQueryRouter.java index 7d8754d04e6..b8a6625ac2f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/executor/EngineQueryRouter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineQueryRouter.java @@ -1,21 +1,25 @@ -package cn.edu.tsinghua.iotdb.query.executor; +package org.apache.iotdb.db.query.executor; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.query.control.OpenedFilePathsManager; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.tsfile.exception.filter.QueryFilterOptimizationException; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.expression.util.ExpressionOptimizer; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.query.control.OpenedFilePathsManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.util.ExpressionOptimizer; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.query.control.OpenedFilePathsManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; -import static cn.edu.tsinghua.tsfile.read.expression.ExpressionType.GLOBAL_TIME; +import static org.apache.iotdb.tsfile.read.expression.ExpressionType.GLOBAL_TIME; /** *

Query entrance class of IoTDB query process. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJob.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJob.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJob.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJob.java index 72053cae570..c86971b125a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJob.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJob.java @@ -1,4 +1,4 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // // //import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobEngine.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobEngine.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobEngine.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobEngine.java index 43621a39f02..65c662eadee 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobEngine.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobEngine.java @@ -1,6 +1,6 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // //import java.io.IOException; //import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobPart.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobPart.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobPart.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobPart.java index 15894cc373c..67fa3bcad4b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobPart.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobPart.java @@ -1,6 +1,6 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // //import java.io.IOException; // diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobScheduler.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobScheduler.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobScheduler.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobScheduler.java index fdfbfe49488..a48e8452c2c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/ExternalSortJobScheduler.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/ExternalSortJobScheduler.java @@ -1,4 +1,4 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // // //public class ExternalSortJobScheduler { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/LineMerger.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/LineMerger.java similarity index 61% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/LineMerger.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/LineMerger.java index 0e62daf6bb5..ede1a65ce19 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/LineMerger.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/LineMerger.java @@ -1,11 +1,11 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairDeserializer; -//import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairSerializer; -//import cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl.FixLengthTimeValuePairDeserializer; -//import cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl.FixLengthTimeValuePairSerializer; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReader; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairDeserializer; +//import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairSerializer; +//import org.apache.iotdb.db.query.externalsort.serialize.impl.FixLengthTimeValuePairDeserializer; +//import org.apache.iotdb.db.query.externalsort.serialize.impl.FixLengthTimeValuePairSerializer; +//import org.apache.iotdb.db.query.reader.merge.PriorityMergeReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // //import java.io.IOException; //import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/MultiSourceExternalSortJobPart.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/MultiSourceExternalSortJobPart.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/MultiSourceExternalSortJobPart.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/MultiSourceExternalSortJobPart.java index 0cebb597310..2f6f5a642a5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/MultiSourceExternalSortJobPart.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/MultiSourceExternalSortJobPart.java @@ -1,6 +1,6 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // //import java.io.IOException; //import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SimpleExternalSortEngine.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SimpleExternalSortEngine.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SimpleExternalSortEngine.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SimpleExternalSortEngine.java index 9cbe1231e13..cfd884000c9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SimpleExternalSortEngine.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SimpleExternalSortEngine.java @@ -1,7 +1,7 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.conf.TsfileDBDescriptor; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.conf.TsfileDBDescriptor; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // //import java.io.File; //import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SingleSourceExternalSortJobPart.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SingleSourceExternalSortJobPart.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SingleSourceExternalSortJobPart.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SingleSourceExternalSortJobPart.java index b6f0b483266..41b2dbe5be9 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/SingleSourceExternalSortJobPart.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/SingleSourceExternalSortJobPart.java @@ -1,6 +1,6 @@ -//package cn.edu.tsinghua.iotdb.query.externalsort; +//package org.apache.iotdb.db.query.externalsort; // -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; // // //public class SingleSourceExternalSortJobPart extends ExternalSortJobPart { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairDeserializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairDeserializer.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairDeserializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairDeserializer.java index 7593c3fe13a..86a5d9779ae 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairDeserializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairDeserializer.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize; +package org.apache.iotdb.db.query.externalsort.serialize; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TimeValuePair; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairSerializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairSerializer.java similarity index 62% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairSerializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairSerializer.java index 3679cff2bed..21f850ad176 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/TimeValuePairSerializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/TimeValuePairSerializer.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize; +package org.apache.iotdb.db.query.externalsort.serialize; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TimeValuePair; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java index 5b15990aa3b..5d6edc8a9f3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairDeserializer.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl; +package org.apache.iotdb.db.query.externalsort.serialize.impl; -import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairDeserializer; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairDeserializer; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairDeserializer; import java.io.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java index 26082d5f8ec..f98aac1c9bd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/FixLengthTimeValuePairSerializer.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl; +package org.apache.iotdb.db.query.externalsort.serialize.impl; -import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairSerializer; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairSerializer; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.BytesUtils; import java.io.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java index b8f8bfb8255..72454a8e6ea 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairDeserializer.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl; +package org.apache.iotdb.db.query.externalsort.serialize.impl; -import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairDeserializer; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairDeserializer; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairDeserializer; import java.io.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java index 89b3720f41b..3c729a4b825 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/externalsort/serialize/impl/SimpleTimeValuePairSerializer.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.externalsort.serialize.impl; +package org.apache.iotdb.db.query.externalsort.serialize.impl; -import cn.edu.tsinghua.iotdb.query.externalsort.serialize.TimeValuePairSerializer; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; +import org.apache.iotdb.db.query.externalsort.serialize.TimeValuePairSerializer; +import org.apache.iotdb.db.utils.TimeValuePair; import java.io.*; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/factory/SeriesReaderFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java similarity index 73% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/factory/SeriesReaderFactory.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java index 90f80dfee4d..ceb284ed481 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/factory/SeriesReaderFactory.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java @@ -1,30 +1,34 @@ -package cn.edu.tsinghua.iotdb.query.factory; +package org.apache.iotdb.db.query.factory; -import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowInsertFile; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowSeriesDataSource; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.query.reader.mem.MemChunkReaderWithFilter; -import cn.edu.tsinghua.iotdb.query.reader.mem.MemChunkReaderWithoutFilter; -import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReader; -import cn.edu.tsinghua.iotdb.query.reader.sequence.SealedTsFilesReader; -import cn.edu.tsinghua.iotdb.query.reader.unsequence.EngineChunkReader; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.tsfile.common.constant.StatisticConstant; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerier; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReader; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReaderWithFilter; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReaderWithoutFilter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithFilter; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithoutFilter; +import org.apache.iotdb.db.query.reader.merge.PriorityMergeReader; +import org.apache.iotdb.db.query.reader.sequence.SealedTsFilesReader; +import org.apache.iotdb.db.query.reader.unsequence.EngineChunkReader; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.tsfile.common.constant.StatisticConstant; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReader; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderWithoutFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.query.control.FileReaderManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/IFill.java b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/IFill.java similarity index 64% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/IFill.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/fill/IFill.java index 9cfafc2006f..c1545250655 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/IFill.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/IFill.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.fill; +package org.apache.iotdb.db.query.fill; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/LinearFill.java b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/LinearFill.java similarity index 78% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/LinearFill.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/fill/LinearFill.java index 1fc813d9aae..d80a6539569 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/LinearFill.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/LinearFill.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.fill; +package org.apache.iotdb.db.query.fill; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/PreviousFill.java b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/PreviousFill.java similarity index 71% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/PreviousFill.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/fill/PreviousFill.java index 9f3cd8482db..92d78cb8894 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/fill/PreviousFill.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/fill/PreviousFill.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.iotdb.query.fill; +package org.apache.iotdb.db.query.fill; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/IReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/IReader.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/IReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/IReader.java index 0d98241f163..4c6c5bd849a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/IReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/IReader.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.query.reader; +package org.apache.iotdb.db.query.reader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.db.utils.TimeValuePair; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderByTimestamp.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderByTimestamp.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderByTimestamp.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderByTimestamp.java index d29b803f00a..2c7b62e64e8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderByTimestamp.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderByTimestamp.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.iotdb.query.reader.mem; +package org.apache.iotdb.db.query.reader.mem; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.iotdb.query.reader.merge.EngineReaderByTimeStamp; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.query.reader.merge.EngineReaderByTimeStamp; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.query.reader.merge.EngineReaderByTimeStamp; import java.io.IOException; import java.util.Iterator; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithFilter.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithFilter.java similarity index 81% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithFilter.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithFilter.java index 2dbb4ce2c6c..19ec64c4784 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithFilter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithFilter.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.reader.mem; +package org.apache.iotdb.db.query.reader.mem; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; import java.io.IOException; import java.util.Iterator; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithoutFilter.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithoutFilter.java similarity index 75% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithoutFilter.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithoutFilter.java index 62c1e7765a2..573f34468b7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/mem/MemChunkReaderWithoutFilter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/mem/MemChunkReaderWithoutFilter.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.query.reader.mem; +package org.apache.iotdb.db.query.reader.mem; -import cn.edu.tsinghua.iotdb.engine.memtable.TimeValuePairSorter; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.db.engine.memtable.TimeValuePairSorter; import java.io.IOException; import java.util.Iterator; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/EngineReaderByTimeStamp.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/EngineReaderByTimeStamp.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/EngineReaderByTimeStamp.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/EngineReaderByTimeStamp.java index 0507cec6eb5..598efdb3e0e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/EngineReaderByTimeStamp.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/EngineReaderByTimeStamp.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TsPrimitiveType; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReader.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReader.java index 31e7313ca8f..53b632dea6e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReader.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.common.BatchData; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestamp.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestamp.java similarity index 88% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestamp.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestamp.java index 012463543aa..5108ab845c0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestamp.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestamp.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SealedTsFilesReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SealedTsFilesReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java index b17970e214b..70b5f3e282c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SealedTsFilesReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java @@ -1,21 +1,23 @@ -package cn.edu.tsinghua.iotdb.query.reader.sequence; +package org.apache.iotdb.db.query.reader.sequence; -import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePairUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePairUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +import org.apache.iotdb.db.query.control.FileReaderManager; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceDataReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java similarity index 79% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceDataReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java index b47a74f65af..b737435ee0f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceDataReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java @@ -1,12 +1,15 @@ -package cn.edu.tsinghua.iotdb.query.reader.sequence; +package org.apache.iotdb.db.query.reader.sequence; -import cn.edu.tsinghua.iotdb.engine.querycontext.GlobalSortedSeriesDataSource; -import cn.edu.tsinghua.iotdb.query.reader.mem.MemChunkReaderWithFilter; -import cn.edu.tsinghua.iotdb.query.reader.mem.MemChunkReaderWithoutFilter; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.db.engine.querycontext.GlobalSortedSeriesDataSource; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithFilter; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithoutFilter; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.db.engine.querycontext.GlobalSortedSeriesDataSource; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithFilter; +import org.apache.iotdb.db.query.reader.mem.MemChunkReaderWithoutFilter; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceInsertDataByTimeStampReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceInsertDataByTimeStampReader.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceInsertDataByTimeStampReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceInsertDataByTimeStampReader.java index 960d7fcec7c..d08745ca9e7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/SequenceInsertDataByTimeStampReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceInsertDataByTimeStampReader.java @@ -1,16 +1,16 @@ -//package cn.edu.tsinghua.iotdb.read.reader; +//package org.apache.iotdb.read.reader; // -//import cn.edu.tsinghua.iotdb.engine.filenode.IntervalFileNode; -//import cn.edu.tsinghua.iotdb.engine.querycontext.GlobalSortedSeriesDataSource; -//import cn.edu.tsinghua.iotdb.engine.querycontext.UnsealedTsFile; -//import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReaderByTimestamp; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReader; -//import cn.edu.tsinghua.iotdb.query.reader.merge.PrioritySeriesReaderByTimestamp; -//import cn.edu.tsinghua.iotdb.query.reader.merge.EngineReaderByTimeStamp; -//import cn.edu.tsinghua.iotdb.query.reader.mem.MemChunkReaderByTimestamp; -//import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -//import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; +//import org.apache.iotdb.db.engine.filenode.IntervalFileNode; +//import org.apache.iotdb.db.engine.querycontext.GlobalSortedSeriesDataSource; +//import org.apache.iotdb.db.engine.querycontext.UnsealedTsFile; +//import org.apache.iotdb.db.query.control.FileReaderManager; +//import org.apache.iotdb.db.query.reader.merge.PriorityMergeReaderByTimestamp; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReader; +//import org.apache.iotdb.db.query.reader.merge.PrioritySeriesReaderByTimestamp; +//import org.apache.iotdb.db.query.reader.merge.EngineReaderByTimeStamp; +//import org.apache.iotdb.db.query.reader.mem.MemChunkReaderByTimestamp; +//import org.apache.iotdb.db.utils.TimeValuePair; +//import org.apache.iotdb.db.utils.TsPrimitiveType; // //import java.io.IOException; //import java.io.RandomAccessFile; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/UnSealedTsFileReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/UnSealedTsFileReader.java similarity index 64% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/UnSealedTsFileReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/UnSealedTsFileReader.java index 54be1e5a70e..c9ed3430eb0 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/sequence/UnSealedTsFileReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/UnSealedTsFileReader.java @@ -1,19 +1,21 @@ -package cn.edu.tsinghua.iotdb.query.reader.sequence; +package org.apache.iotdb.db.query.reader.sequence; -import cn.edu.tsinghua.iotdb.engine.querycontext.UnsealedTsFile; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePairUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.db.engine.querycontext.UnsealedTsFile; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePairUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.db.engine.querycontext.UnsealedTsFile; +import org.apache.iotdb.db.query.control.FileReaderManager; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/unsequence/EngineChunkReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/unsequence/EngineChunkReader.java similarity index 78% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/unsequence/EngineChunkReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/reader/unsequence/EngineChunkReader.java index adbf34745a3..910ffbcf1a6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/reader/unsequence/EngineChunkReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/unsequence/EngineChunkReader.java @@ -1,12 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.reader.unsequence; +package org.apache.iotdb.db.query.reader.unsequence; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePairUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.UnClosedTsFileReader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReader; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePairUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReader; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineLeafNode.java b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineLeafNode.java similarity index 82% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineLeafNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineLeafNode.java index 49b3433d190..ed0ad4f056f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineLeafNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineLeafNode.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.query.timegenerator; +package org.apache.iotdb.db.query.timegenerator; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.Node; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.NodeType; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.NodeType; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineNodeConstructor.java b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java similarity index 62% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineNodeConstructor.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java index 3988678f32f..d0c5c1a412f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineNodeConstructor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java @@ -1,24 +1,28 @@ -package cn.edu.tsinghua.iotdb.query.timegenerator; +package org.apache.iotdb.db.query.timegenerator; -import cn.edu.tsinghua.iotdb.engine.querycontext.QueryDataSource; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.query.control.QueryDataSourceManager; -import cn.edu.tsinghua.iotdb.query.factory.SeriesReaderFactory; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.query.reader.merge.PriorityMergeReader; -import cn.edu.tsinghua.iotdb.query.reader.sequence.SequenceDataReader; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.read.expression.IBinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.AndNode; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.Node; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.OrNode; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.query.reader.merge.PriorityMergeReader; +import org.apache.iotdb.db.query.reader.sequence.SequenceDataReader; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.AndNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.OrNode; +import org.apache.iotdb.db.engine.querycontext.QueryDataSource; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.control.QueryDataSourceManager; +import org.apache.iotdb.db.query.factory.SeriesReaderFactory; import java.io.IOException; -import static cn.edu.tsinghua.tsfile.read.expression.ExpressionType.*; +import static org.apache.iotdb.tsfile.read.expression.ExpressionType.*; public class EngineNodeConstructor { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineTimeGenerator.java similarity index 73% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineTimeGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineTimeGenerator.java index 12208cceb30..05144681a6c 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/query/timegenerator/EngineTimeGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineTimeGenerator.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.query.timegenerator; +package org.apache.iotdb.db.query.timegenerator; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.TimeGenerator; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.db.exception.FileNodeManagerException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/CloseMergeService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/CloseMergeService.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/CloseMergeService.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/CloseMergeService.java index 1abaa7dcd11..80510f46134 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/CloseMergeService.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/CloseMergeService.java @@ -1,19 +1,22 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.time.Instant; import java.time.ZonedDateTime; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.exception.StartupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.StartupException; /** * A service that triggers close and merge operation regularly diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/IService.java similarity index 70% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IService.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/IService.java index a713aa87896..b196a70d54a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IService.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/IService.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; public interface IService { /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDB.java b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java similarity index 76% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDB.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java index fd1fb97177b..3a38a8a4904 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/IoTDB.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDB.java @@ -1,19 +1,26 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBDefaultThreadExceptionHandler; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; -import cn.edu.tsinghua.iotdb.exception.*; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.monitor.StatMonitor; -import cn.edu.tsinghua.iotdb.postback.receiver.ServerManager; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.manager.WriteLogNodeManager; +import org.apache.iotdb.db.concurrent.IoTDBDefaultThreadExceptionHandler; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.StatMonitor; +import org.apache.iotdb.db.postback.receiver.ServerManager; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.manager.WriteLogNodeManager; +import org.apache.iotdb.db.concurrent.IoTDBDefaultThreadExceptionHandler; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.postback.receiver.ServerManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.manager.WriteLogNodeManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDBMBean.java b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDBMBean.java new file mode 100644 index 00000000000..b95c984dc77 --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/IoTDBMBean.java @@ -0,0 +1,10 @@ +package org.apache.iotdb.db.service; + +import java.io.IOException; + +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.FileNodeManagerException; + +public interface IoTDBMBean { + void stop() throws FileNodeManagerException, IOException; +} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCService.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java index ac80378ff33..5d032f3bbb8 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCService.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCService.java @@ -1,7 +1,13 @@ -package cn.edu.tsinghua.iotdb.service; - -import java.io.IOException; +package org.apache.iotdb.db.service; +import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.service.rpc.thrift.TSIService; +import org.apache.iotdb.service.rpc.thrift.TSIService.Processor; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TBinaryProtocol.Factory; import org.apache.thrift.server.TServer; @@ -11,14 +17,7 @@ import org.apache.thrift.transport.TTransportException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.concurrent.IoTDBThreadPoolFactory; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TSIService.Processor; +import java.io.IOException; /** * A service to handle jdbc request from client. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceEventHandler.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceEventHandler.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceEventHandler.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceEventHandler.java index 4d849c63cb9..02cbc21bb22 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceEventHandler.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceEventHandler.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import org.apache.thrift.TException; import org.apache.thrift.protocol.TProtocol; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceMBean.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceMBean.java similarity index 60% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceMBean.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceMBean.java index cace887f91e..fd5fc583bcb 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JDBCServiceMBean.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JDBCServiceMBean.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; public interface JDBCServiceMBean { String getJDBCServiceStatus(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JMXService.java b/iotdb/src/main/java/org/apache/iotdb/db/service/JMXService.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JMXService.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/JMXService.java index 10f268cb221..fdf0e293635 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/JMXService.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/JMXService.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.io.IOException; import java.lang.management.ManagementFactory; @@ -17,11 +17,12 @@ import javax.management.remote.JMXConnectorServer; import javax.management.remote.JMXConnectorServerFactory; import javax.management.remote.JMXServiceURL; +import org.apache.iotdb.db.exception.StartupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.exception.StartupException; public class JMXService implements IService { private static final Logger LOGGER = LoggerFactory.getLogger(JMXService.class); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Monitor.java b/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Monitor.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java index fbee61deb55..264d55e7ea6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Monitor.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/Monitor.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.io.File; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.utils.OpenFileNumUtil; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.utils.OpenFileNumUtil; +import org.apache.iotdb.db.exception.StartupException; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.exception.StartupException; public class Monitor implements MonitorMBean, IService{ private IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/MonitorMBean.java b/iotdb/src/main/java/org/apache/iotdb/db/service/MonitorMBean.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/MonitorMBean.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/MonitorMBean.java index 48d6a9c77f3..64f34075566 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/MonitorMBean.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/MonitorMBean.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; public interface MonitorMBean { long getDataSizeInByte(); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/RegisterManager.java b/iotdb/src/main/java/org/apache/iotdb/db/service/RegisterManager.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/RegisterManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/RegisterManager.java index e946f91b6d1..7d8d4f2f5fe 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/RegisterManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/RegisterManager.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.util.ArrayList; import java.util.List; +import org.apache.iotdb.db.exception.StartupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; public class RegisterManager { private static final Logger LOGGER = LoggerFactory.getLogger(RegisterManager.class); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/ServiceType.java b/iotdb/src/main/java/org/apache/iotdb/db/service/ServiceType.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/ServiceType.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/ServiceType.java index e8491877d92..e64f4a94709 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/ServiceType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/ServiceType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; public enum ServiceType { FILE_NODE_SERVICE("File Node ServerService",""), diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupCheck.java b/iotdb/src/main/java/org/apache/iotdb/db/service/StartupCheck.java similarity index 52% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupCheck.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/StartupCheck.java index 9225735f136..6131f19e3df 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupCheck.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/StartupCheck.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; -import cn.edu.tsinghua.iotdb.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.exception.StartupException; public interface StartupCheck { /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupChecks.java b/iotdb/src/main/java/org/apache/iotdb/db/service/StartupChecks.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupChecks.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/StartupChecks.java index 6bac350cf3b..b65efe8ef8f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/StartupChecks.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/StartupChecks.java @@ -1,15 +1,16 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.utils.CommonUtils; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.utils.CommonUtils; +import org.apache.iotdb.db.exception.StartupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConstant; public class StartupChecks { private static final Logger LOGGER = LoggerFactory.getLogger(StartupChecks.class); diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/TSServiceImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/TSServiceImpl.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java index 3439f97fb77..5bd8d9e6a22 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/TSServiceImpl.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/TSServiceImpl.java @@ -1,32 +1,39 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.AuthorityChecker; -import cn.edu.tsinghua.iotdb.auth.authorizer.IAuthorizer; -import cn.edu.tsinghua.iotdb.auth.authorizer.LocalFileAuthorizer; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.qp.IllegalASTFormatException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.metadata.Metadata; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.qp.executor.OverflowQPExecutor; -import cn.edu.tsinghua.iotdb.qp.logical.Operator; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.QueryPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.AuthorPlan; -import cn.edu.tsinghua.iotdb.query.control.OpenedFilePathsManager; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.service.rpc.thrift.*; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.AuthorityChecker; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.qp.IllegalASTFormatException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.Metadata; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.qp.executor.OverflowQPExecutor; +import org.apache.iotdb.db.qp.logical.Operator; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.QueryPlan; +import org.apache.iotdb.db.qp.physical.sys.AuthorPlan; +import org.apache.iotdb.db.query.control.OpenedFilePathsManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.service.rpc.thrift.*; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.Metadata; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.qp.logical.Operator; import org.apache.thrift.TException; import org.apache.thrift.server.ServerContext; import org.slf4j.Logger; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Utils.java b/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java similarity index 83% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Utils.java rename to iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java index 3c965fb5d4d..3f37384fa2d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/service/Utils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/service/Utils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.service; +package org.apache.iotdb.db.service; import java.io.IOException; import java.nio.ByteBuffer; @@ -7,15 +7,16 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.service.rpc.thrift.TSColumnSchema; -import cn.edu.tsinghua.service.rpc.thrift.TSDataValue; -import cn.edu.tsinghua.service.rpc.thrift.TSQueryDataSet; -import cn.edu.tsinghua.service.rpc.thrift.TSRowRecord; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.service.rpc.thrift.TSColumnSchema; +import org.apache.iotdb.service.rpc.thrift.TSDataValue; +import org.apache.iotdb.service.rpc.thrift.TSQueryDataSet; +import org.apache.iotdb.service.rpc.thrift.TSRowRecord; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.metadata.ColumnSchema; /** * TimeValuePairUtils to convert between thrift format and TsFile format diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/ParseGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/ParseGenerator.java similarity index 52% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/ParseGenerator.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/ParseGenerator.java index f15f1721687..f15b0bbaeb3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/ParseGenerator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/ParseGenerator.java @@ -1,10 +1,13 @@ -package cn.edu.tsinghua.iotdb.sql; +package org.apache.iotdb.db.sql; -import cn.edu.tsinghua.iotdb.sql.parse.ASTNode; -import cn.edu.tsinghua.iotdb.sql.parse.ParseDriver; -import cn.edu.tsinghua.iotdb.sql.parse.ParseException; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.ParseDriver; +import org.apache.iotdb.db.sql.parse.ParseException; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.ParseDriver; +import org.apache.iotdb.db.sql.parse.ParseException; /** * ParseContextGenerator is a class that offers methods to generate ASTNode Tree diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTErrorNode.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTErrorNode.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTErrorNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTErrorNode.java index 7253bdc1762..c61683daa5b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTErrorNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTErrorNode.java @@ -1,5 +1,5 @@ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import org.antlr.runtime.RecognitionException; import org.antlr.runtime.Token; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNode.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNode.java similarity index 99% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNode.java index e740691c243..83c25ef037e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNode.java @@ -1,5 +1,5 @@ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import java.io.Serializable; import java.util.ArrayDeque; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNodeOrigin.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNodeOrigin.java similarity index 98% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNodeOrigin.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNodeOrigin.java index 58a3c12e1e3..975c1920b90 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ASTNodeOrigin.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ASTNodeOrigin.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; /** * ASTNodeOrigin contains contextual information about the object from whose * definition a particular ASTNode originated. For example, suppose a view v is diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/Node.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/Node.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/Node.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/Node.java index 4efcab961b8..85c7503ecfd 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/Node.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/Node.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseDriver.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java similarity index 99% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseDriver.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java index 5e7d344c036..7c1e36775b5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseDriver.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseDriver.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseError.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseError.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseError.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseError.java index 51c12e8b738..b983e957208 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseError.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseError.java @@ -1,5 +1,5 @@ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import org.antlr.runtime.BaseRecognizer; import org.antlr.runtime.RecognitionException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseException.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseException.java similarity index 92% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseException.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseException.java index ed08a0b7b97..5322b5aad4f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseException.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseException.java @@ -1,5 +1,5 @@ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseUtils.java similarity index 93% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseUtils.java index 15fd91d5464..aee5acda780 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/sql/parse/ParseUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/sql/parse/ParseUtils.java @@ -1,5 +1,5 @@ -package cn.edu.tsinghua.iotdb.sql.parse; +package org.apache.iotdb.db.sql.parse; /** * Library of utility functions used in the parse code. diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/AuthUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/AuthUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java index 5d130060aa3..c82b4087160 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/AuthUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/AuthUtils.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.PrivilegeType; +import org.apache.iotdb.db.conf.IoTDBConstant; import java.io.UnsupportedEncodingException; import java.security.MessageDigest; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/CommonUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/CommonUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java index c05cfa19601..3bde3d5c6bf 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/CommonUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.lang.reflect.Field; import java.lang.reflect.Method; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileSchemaUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileSchemaUtils.java similarity index 79% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileSchemaUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/FileSchemaUtils.java index bcc2d0bac4a..4ecbc4c5493 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileSchemaUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileSchemaUtils.java @@ -1,16 +1,18 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.util.List; import java.util.Map.Entry; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; import org.json.JSONArray; import org.json.JSONObject; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.write.schema.FileSchema; public class FileSchemaUtils { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java index c82fc30b046..9e037a19c7a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/FileUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/FileUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.io.File; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/IOUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/IOUtils.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/IOUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/IOUtils.java index 80c56b585ad..5dee450845b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/IOUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/IOUtils.java @@ -1,11 +1,10 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.PrivilegeType; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.PrivilegeType; import java.io.*; import java.nio.ByteBuffer; -import java.nio.channels.FileChannel; public class IOUtils { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/LoadDataUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/LoadDataUtils.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/LoadDataUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/LoadDataUtils.java index 528a55c56b9..287afada45d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/LoadDataUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/LoadDataUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -12,20 +12,25 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; /** * @author kangrong diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/MemUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/MemUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java index cbb1bc4ed09..2f5ff2ade2a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/MemUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/MemUtils.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.*; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtil.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/OpenFileNumUtil.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtil.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/OpenFileNumUtil.java index 68349e8bf19..0a55efcc62f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtil.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/OpenFileNumUtil.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.BufferedReader; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PostbackUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/PostbackUtils.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PostbackUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/PostbackUtils.java index a6802e560a5..a9a3d3085c6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PostbackUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/PostbackUtils.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; + +import org.apache.iotdb.db.postback.conf.PostBackSenderDescriptor; import java.io.File; import java.text.DecimalFormat; import java.util.Map; -import java.util.Set; import java.util.Map.Entry; - -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderDescriptor; +import java.util.Set; /** * @author lta diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayList.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java similarity index 99% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayList.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java index 3092bbad49c..cea1b33f820 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayList.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayList.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.lang.reflect.Array; import java.util.ArrayList; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListFactory.java similarity index 77% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListFactory.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListFactory.java index d79a40fb52c..aa23e4f156f 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListFactory.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/PrimitiveArrayListFactory.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; public class PrimitiveArrayListFactory { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RandomDeleteCache.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/RandomDeleteCache.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RandomDeleteCache.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/RandomDeleteCache.java index b8cdacc8823..0c503788635 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RandomDeleteCache.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/RandomDeleteCache.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.tsfile.exception.cache.CacheException; -import cn.edu.tsinghua.tsfile.common.cache.Cache; +import org.apache.iotdb.tsfile.exception.cache.CacheException; +import org.apache.iotdb.tsfile.common.cache.Cache; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RecordUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/RecordUtils.java similarity index 90% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RecordUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/RecordUtils.java index 71c473bfafc..7b7955dd4d3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/RecordUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/RecordUtils.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.*; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.*; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePair.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePair.java similarity index 97% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePair.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePair.java index 20bf706f57d..5a4ccff9316 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePair.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePair.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import java.io.Serializable; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePairUtils.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePairUtils.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePairUtils.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePairUtils.java index 540b9db4d71..07d99040d3a 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TimeValuePairUtils.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/TimeValuePairUtils.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.read.common.BatchData; public class TimeValuePairUtils { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TsPrimitiveType.java b/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TsPrimitiveType.java rename to iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java index 8a0da66d23d..82d239369f3 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/utils/TsPrimitiveType.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/utils/TsPrimitiveType.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; import java.io.Serializable; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/LogPosition.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/LogPosition.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/LogPosition.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/LogPosition.java index eb0a82c6ce7..fdb4236b9af 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/LogPosition.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/LogPosition.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; public class LogPosition { public String logPath; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/RecoverStage.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/RecoverStage.java similarity index 95% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/RecoverStage.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/RecoverStage.java index 15c9eb6c4c3..2dc6076bcaa 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/RecoverStage.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/RecoverStage.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; public enum RecoverStage { /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogReader.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogReader.java similarity index 69% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogReader.java index c6e6aa4ef77..f441b26566e 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogReader.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.writelog.io; +package org.apache.iotdb.db.writelog.io; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; import java.io.File; import java.io.FileNotFoundException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogWriter.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogWriter.java similarity index 80% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogWriter.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogWriter.java index 0d8c84de2c4..81d6a9468e6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/ILogWriter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/ILogWriter.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.writelog.io; +package org.apache.iotdb.db.writelog.io; import java.io.IOException; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriter.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java similarity index 96% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriter.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java index 4398295e6a8..ad85098a8c4 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriter.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/LogWriter.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.writelog.io; +package org.apache.iotdb.db.writelog.io; import java.io.File; import java.io.FileOutputStream; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/RAFLogReader.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/RAFLogReader.java similarity index 91% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/RAFLogReader.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/io/RAFLogReader.java index e77cd646fbc..f436d49af09 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/io/RAFLogReader.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/io/RAFLogReader.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.writelog.io; +package org.apache.iotdb.db.writelog.io; -import cn.edu.tsinghua.iotdb.writelog.transfer.PhysicalPlanLogTransfer; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/MultiFileLogNodeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/MultiFileLogNodeManager.java similarity index 89% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/MultiFileLogNodeManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/MultiFileLogNodeManager.java index 5628a59c7b7..0e715797da6 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/MultiFileLogNodeManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/MultiFileLogNodeManager.java @@ -1,15 +1,18 @@ -package cn.edu.tsinghua.iotdb.writelog.manager; +package org.apache.iotdb.db.writelog.manager; -import cn.edu.tsinghua.iotdb.concurrent.ThreadName; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.service.IService; -import cn.edu.tsinghua.iotdb.service.ServiceType; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.service.IService; +import org.apache.iotdb.db.service.ServiceType; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.concurrent.ThreadName; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.exception.StartupException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/WriteLogNodeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/WriteLogNodeManager.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/WriteLogNodeManager.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/WriteLogNodeManager.java index a4a12a1e372..b477aba0785 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/manager/WriteLogNodeManager.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/manager/WriteLogNodeManager.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.writelog.manager; +package org.apache.iotdb.db.writelog.manager; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.exception.RecoverException; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/ExclusiveWriteLogNode.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java similarity index 87% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/ExclusiveWriteLogNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java index 0dfdabc1bff..4b5a16c8ba5 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/ExclusiveWriteLogNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/ExclusiveWriteLogNode.java @@ -1,17 +1,21 @@ -package cn.edu.tsinghua.iotdb.writelog.node; +package org.apache.iotdb.db.writelog.node; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.iotdb.writelog.LogPosition; -import cn.edu.tsinghua.iotdb.writelog.io.ILogWriter; -import cn.edu.tsinghua.iotdb.writelog.io.LogWriter; -import cn.edu.tsinghua.iotdb.writelog.recover.ExclusiveLogRecoverPerformer; -import cn.edu.tsinghua.iotdb.writelog.recover.RecoverPerformer; -import cn.edu.tsinghua.iotdb.writelog.transfer.PhysicalPlanLogTransfer; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.writelog.LogPosition; +import org.apache.iotdb.db.writelog.io.ILogWriter; +import org.apache.iotdb.db.writelog.io.LogWriter; +import org.apache.iotdb.db.writelog.recover.ExclusiveLogRecoverPerformer; +import org.apache.iotdb.db.writelog.recover.RecoverPerformer; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.writelog.recover.ExclusiveLogRecoverPerformer; +import org.apache.iotdb.db.writelog.recover.RecoverPerformer; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/WriteLogNode.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/WriteLogNode.java similarity index 85% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/WriteLogNode.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/node/WriteLogNode.java index 74bac5d1131..2b02cfe8659 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/node/WriteLogNode.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/node/WriteLogNode.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.iotdb.writelog.node; +package org.apache.iotdb.db.writelog.node; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.writelog.LogPosition; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.writelog.LogPosition; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.exception.RecoverException; import java.io.IOException; import java.util.List; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/ExclusiveLogRecoverPerformer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/ExclusiveLogRecoverPerformer.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/ExclusiveLogRecoverPerformer.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/ExclusiveLogRecoverPerformer.java index 75abc17fb6b..9bfd30c4017 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/ExclusiveLogRecoverPerformer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/ExclusiveLogRecoverPerformer.java @@ -1,16 +1,18 @@ -package cn.edu.tsinghua.iotdb.writelog.recover; +package org.apache.iotdb.db.writelog.recover; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.writelog.RecoverStage; -import cn.edu.tsinghua.iotdb.writelog.replay.ConcreteLogReplayer; -import cn.edu.tsinghua.iotdb.writelog.io.RAFLogReader; -import cn.edu.tsinghua.iotdb.writelog.replay.LogReplayer; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.writelog.RecoverStage; +import org.apache.iotdb.db.writelog.replay.ConcreteLogReplayer; +import org.apache.iotdb.db.writelog.io.RAFLogReader; +import org.apache.iotdb.db.writelog.replay.LogReplayer; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.RecoverException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -20,7 +22,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -import static cn.edu.tsinghua.iotdb.writelog.RecoverStage.*; +import static org.apache.iotdb.db.writelog.RecoverStage.*; public class ExclusiveLogRecoverPerformer implements RecoverPerformer { diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/FileNodeRecoverPerformer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/FileNodeRecoverPerformer.java similarity index 68% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/FileNodeRecoverPerformer.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/FileNodeRecoverPerformer.java index ca4c579d4d2..50b83c42fa7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/FileNodeRecoverPerformer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/FileNodeRecoverPerformer.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.iotdb.writelog.recover; +package org.apache.iotdb.db.writelog.recover; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.FileNodeProcessorException; -import cn.edu.tsinghua.iotdb.exception.RecoverException; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.FileNodeProcessorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.FileNodeProcessorException; +import org.apache.iotdb.db.exception.RecoverException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/RecoverPerformer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/RecoverPerformer.java similarity index 57% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/RecoverPerformer.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/RecoverPerformer.java index 6035098b0fd..f8e71d71e33 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/recover/RecoverPerformer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/recover/RecoverPerformer.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.writelog.recover; +package org.apache.iotdb.db.writelog.recover; -import cn.edu.tsinghua.iotdb.exception.RecoverException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.exception.RecoverException; public interface RecoverPerformer { /** diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/ConcreteLogReplayer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java similarity index 73% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/ConcreteLogReplayer.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java index 8f124d698bd..de256bbe23d 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/replay/ConcreteLogReplayer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java @@ -1,19 +1,21 @@ -package cn.edu.tsinghua.iotdb.writelog.replay; +package org.apache.iotdb.db.writelog.replay; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; import java.util.List; diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/LogReplayer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/LogReplayer.java new file mode 100644 index 00000000000..35c90795da6 --- /dev/null +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/LogReplayer.java @@ -0,0 +1,8 @@ +package org.apache.iotdb.db.writelog.replay; + +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; + +public interface LogReplayer { + void replay(PhysicalPlan plan) throws ProcessorException; +} diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/Codec.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/Codec.java similarity index 57% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/Codec.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/Codec.java index 33d62a00a37..71c3ac0257b 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/Codec.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/Codec.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.iotdb.writelog.transfer; +package org.apache.iotdb.db.writelog.transfer; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; import java.io.IOException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanCodec.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanCodec.java similarity index 94% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanCodec.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanCodec.java index 67e06faa671..7534e2a73ec 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanCodec.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanCodec.java @@ -1,13 +1,13 @@ -package cn.edu.tsinghua.iotdb.writelog.transfer; +package org.apache.iotdb.db.writelog.transfer; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.Pair; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanLogTransfer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanLogTransfer.java similarity index 86% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanLogTransfer.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanLogTransfer.java index 1cd08e5941a..0979f305220 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/PhysicalPlanLogTransfer.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/PhysicalPlanLogTransfer.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.iotdb.writelog.transfer; +package org.apache.iotdb.db.writelog.transfer; -import cn.edu.tsinghua.iotdb.exception.WALOverSizedException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.exception.WALOverSizedException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.exception.WALOverSizedException; import java.io.IOException; import java.nio.BufferOverflowException; diff --git a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/SystemLogOperator.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/SystemLogOperator.java similarity index 72% rename from iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/SystemLogOperator.java rename to iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/SystemLogOperator.java index dee4ae74958..1d4351263e7 100644 --- a/iotdb/src/main/java/cn/edu/tsinghua/iotdb/writelog/transfer/SystemLogOperator.java +++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/transfer/SystemLogOperator.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.writelog.transfer; +package org.apache.iotdb.db.writelog.transfer; /** - * To avoid conflict with cn.edu.thu.tsfiledb.qp.constant.SQLConstant.Operator. + * To avoid conflict with org.apache.iotdb.tsfiledb.qp.constant.SQLConstant.Operator. */ public class SystemLogOperator { public static final int INSERT = 0; diff --git a/iotdb/src/test/java/PerformanceTest.java b/iotdb/src/test/java/PerformanceTest.java index 0b9954698cb..547c88b37a6 100644 --- a/iotdb/src/test/java/PerformanceTest.java +++ b/iotdb/src/test/java/PerformanceTest.java @@ -1,15 +1,15 @@ -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.query.executor.EngineQueryRouter; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.executor.EngineQueryRouter; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; import java.io.IOException; import java.util.ArrayList; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/jdbc/JDBCClientTest.java b/iotdb/src/test/java/cn/edu/tsinghua/iotdb/jdbc/JDBCClientTest.java deleted file mode 100644 index 14540c0a4ae..00000000000 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/jdbc/JDBCClientTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.edu.tsinghua.iotdb.jdbc; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.DriverManager; -import java.sql.ResultSet; -import java.sql.SQLException; - -public class JDBCClientTest { - - public static void main(String[] args) throws ClassNotFoundException, SQLException { - Class.forName(Config.JDBC_DRIVER_NAME); - Connection connection = null; - try { - connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX+"127.0.0.1:6667/", "root", "root"); - DatabaseMetaData databaseMetaData = connection.getMetaData(); -// ResultSet resultSet = databaseMetaData.getColumns(null, null, "root.vehicle.d1.s0", null); -// while(resultSet.next()){ -// //System.out.println(String.format("column %s, type %s", resultSet.getString("COLUMN_NAME"), resultSet.getString("COLUMN_TYPE"))); -// System.out.println(String.format("column %s, type %s", resultSet.getString(0), resultSet.getString(1))); -// } - - ResultSet resultSet = databaseMetaData.getColumns(null, null, "root.*", null); - while(resultSet.next()){ - //System.out.println(String.format("column %s, type %s", resultSet.getString("COLUMN_NAME"), resultSet.getString("COLUMN_TYPE"))); - System.out.println(String.format("column %s", resultSet.getString(0))); - } - } finally { - connection.close(); - } - } - -} diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManagerTest.java b/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManagerTest.java deleted file mode 100644 index 515925594ff..00000000000 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/OpenedFilePathsManagerTest.java +++ /dev/null @@ -1,5 +0,0 @@ -package cn.edu.tsinghua.iotdb.query.control; - - -public class OpenedFilePathsManagerTest { -} diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFIleRoleAccessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFIleRoleAccessorTest.java similarity index 88% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFIleRoleAccessorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFIleRoleAccessorTest.java index b5ab9a4f098..f041248a46f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFIleRoleAccessorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFIleRoleAccessorTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.Role.LocalFileRoleAccessor; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.auth.Role.LocalFileRoleAccessor; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.utils.EnvironmentUtils; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileAuthorizerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileAuthorizerTest.java similarity index 96% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileAuthorizerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileAuthorizerTest.java index 7bf2b4e2390..35aa357743f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileAuthorizerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileAuthorizerTest.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.authorizer.IAuthorizer; -import cn.edu.tsinghua.iotdb.auth.authorizer.LocalFileAuthorizer; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.utils.EnvironmentUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileRoleManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileRoleManagerTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileRoleManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileRoleManagerTest.java index bdbbd0bfbc5..30b0d41044f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileRoleManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileRoleManagerTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.Role.LocalFileRoleManager; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.Role; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.auth.Role.LocalFileRoleManager; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.Role; +import org.apache.iotdb.db.utils.EnvironmentUtils; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserAccessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserAccessorTest.java similarity index 91% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserAccessorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserAccessorTest.java index 11b97e57ace..3cbacb044a2 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserAccessorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserAccessorTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.auth.user.LocalFileUserAccessor; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.auth.user.LocalFileUserAccessor; +import org.apache.iotdb.db.utils.EnvironmentUtils; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserManagerTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserManagerTest.java index ec454a81655..8c9276c2af1 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/auth/LocalFileUserManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/auth/LocalFileUserManagerTest.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.iotdb.auth; +package org.apache.iotdb.db.auth; -import cn.edu.tsinghua.iotdb.auth.entity.PathPrivilege; -import cn.edu.tsinghua.iotdb.auth.entity.User; -import cn.edu.tsinghua.iotdb.auth.user.LocalFileUserManager; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.AuthUtils; +import org.apache.iotdb.db.auth.entity.PathPrivilege; +import org.apache.iotdb.db.auth.entity.User; +import org.apache.iotdb.db.auth.user.LocalFileUserManager; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.AuthUtils; import org.apache.commons.io.FileUtils; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java similarity index 89% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java index eb094b935ae..465d28e3fad 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBDefaultThreadExceptionHandlerTest.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.iotdb.concurrent; - -import static org.junit.Assert.*; -import java.util.concurrent.atomic.AtomicInteger; +package org.apache.iotdb.db.concurrent; import org.junit.After; import org.junit.Before; import org.junit.Test; +import java.util.concurrent.atomic.AtomicInteger; + +import static org.junit.Assert.assertEquals; + public class IoTDBDefaultThreadExceptionHandlerTest { private Thread.UncaughtExceptionHandler handler; private AtomicInteger count; @@ -31,8 +32,8 @@ public class IoTDBDefaultThreadExceptionHandlerTest { TestThread thread = new TestThread(); thread.start(); } - Thread.sleep(100); - assertEquals(count.get(), num); + Thread.sleep(500); + assertEquals(num, count.get()); } class TestThread extends Thread{ diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactoryTest.java b/iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactoryTest.java similarity index 99% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactoryTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactoryTest.java index 588763501d9..4cb40ce2623 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/concurrent/IoTDBThreadPoolFactoryTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/concurrent/IoTDBThreadPoolFactoryTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.concurrent; +package org.apache.iotdb.db.concurrent; import static org.junit.Assert.*; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/MetadataManagerHelper.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/MetadataManagerHelper.java similarity index 96% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/MetadataManagerHelper.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/MetadataManagerHelper.java index 8abda8f43c2..9fce3f70476 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/MetadataManagerHelper.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/MetadataManagerHelper.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.engine; +package org.apache.iotdb.db.engine; -import cn.edu.tsinghua.iotdb.metadata.MManager; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.metadata.MManager; /** * @author liukun diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/PathUtils.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/PathUtils.java similarity index 88% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/PathUtils.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/PathUtils.java index e21e1090484..f55cdc55b2a 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/PathUtils.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/PathUtils.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.engine; +package org.apache.iotdb.db.engine; import java.io.File; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; public class PathUtils { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/ProcessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/ProcessorTest.java similarity index 92% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/ProcessorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/ProcessorTest.java index ed017f11f65..140803b3c9c 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/ProcessorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/ProcessorTest.java @@ -1,15 +1,16 @@ -package cn.edu.tsinghua.iotdb.engine; +package org.apache.iotdb.db.engine; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.ProcessorException; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.EnvironmentUtils; import java.io.IOException; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java similarity index 86% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteBenchmark.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java index e315d92c71c..baf475d690a 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteBenchmark.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java @@ -1,13 +1,14 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; import java.io.File; import java.io.IOException; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorNewTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java similarity index 81% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorNewTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java index e550580f9e0..c14f6797b5b 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorNewTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java @@ -1,16 +1,20 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.querycontext.ReadOnlyMemChunk; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.FileSchemaUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.TimeValuePair; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java similarity index 85% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java index 46f413c1d5a..5a420e1f94f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/BufferWriteProcessorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java @@ -1,21 +1,26 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.PathUtils; -import cn.edu.tsinghua.iotdb.engine.querycontext.ReadOnlyMemChunk; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.FileSchemaUtils; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.PathUtils; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.TimeValuePair; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -193,9 +198,9 @@ public class BufferWriteProcessorTest { ReadOnlyMemChunk rawSeriesChunk = (ReadOnlyMemChunk) pair.left; assertEquals(false, rawSeriesChunk.isEmpty()); assertEquals(87, rawSeriesChunk.getMinTimestamp()); - assertEquals(87, rawSeriesChunk.getValueAtMinTime().getInt()); + Assert.assertEquals(87, rawSeriesChunk.getValueAtMinTime().getInt()); assertEquals(100, rawSeriesChunk.getMaxTimestamp()); - assertEquals(100, rawSeriesChunk.getValueAtMaxTime().getInt()); + Assert.assertEquals(100, rawSeriesChunk.getValueAtMaxTime().getInt()); Iterator iterator = rawSeriesChunk.getIterator(); for (int i = 87; i <= 100; i++) { iterator.hasNext(); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriterTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java similarity index 86% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriterTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java index 61ad2716374..6112e6f4775 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/bufferwrite/RestorableTsFileIOWriterTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/RestorableTsFileIOWriterTest.java @@ -1,22 +1,25 @@ -package cn.edu.tsinghua.iotdb.engine.bufferwrite; +package org.apache.iotdb.db.engine.bufferwrite; -import cn.edu.tsinghua.iotdb.engine.memtable.IMemTable; -import cn.edu.tsinghua.iotdb.engine.memtable.MemTableFlushUtil; -import cn.edu.tsinghua.iotdb.engine.memtable.MemTableTestUtils; -import cn.edu.tsinghua.iotdb.engine.memtable.PrimitiveMemTable; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.engine.memtable.IMemTable; +import org.apache.iotdb.db.engine.memtable.MemTableFlushUtil; +import org.apache.iotdb.db.engine.memtable.MemTableTestUtils; +import org.apache.iotdb.db.engine.memtable.PrimitiveMemTable; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.file.metadata.ChunkGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.db.engine.memtable.IMemTable; +import org.apache.iotdb.db.engine.memtable.MemTableFlushUtil; +import org.apache.iotdb.db.engine.memtable.PrimitiveMemTable; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtilTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/filenode/SerializeUtilTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtilTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/filenode/SerializeUtilTest.java index fa60458f2ae..9d349cc9b59 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenode/SerializeUtilTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/filenode/SerializeUtilTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.filenode; +package org.apache.iotdb.db.engine.filenode; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -16,7 +16,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.EnvironmentUtils; /** * @author liukun diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/FileNodeManagerBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerBenchmark.java similarity index 75% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/FileNodeManagerBenchmark.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerBenchmark.java index 055a200b9b2..fb09ef7efc8 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/filenodeV2/FileNodeManagerBenchmark.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/filenodeV2/FileNodeManagerBenchmark.java @@ -1,16 +1,22 @@ -package cn.edu.tsinghua.iotdb.engine.filenodeV2; +package org.apache.iotdb.db.engine.filenodeV2; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.postback.utils.RandomNum; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.postback.utils.RandomNum; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.postback.utils.RandomNum; import java.io.IOException; import java.util.concurrent.CountDownLatch; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteFileSizeControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteFileSizeControlTest.java similarity index 79% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteFileSizeControlTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteFileSizeControlTest.java index 9b5f94621b8..652130a8fdb 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteFileSizeControlTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteFileSizeControlTest.java @@ -1,25 +1,32 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.PathUtils; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.BufferWriteProcessor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.PathUtils; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.utils.MemUtils; import org.json.JSONArray; import org.json.JSONObject; import org.junit.After; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteMetaSizeControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java similarity index 79% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteMetaSizeControlTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java index 6518d3751bd..465576e9ad6 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/BufferwriteMetaSizeControlTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java @@ -1,25 +1,32 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.PathUtils; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.BufferWriteProcessor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; -import cn.edu.tsinghua.iotdb.metadata.ColumnSchema; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.PathUtils; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.BufferWriteProcessor; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.metadata.ColumnSchema; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.utils.MemUtils; import org.json.JSONArray; import org.json.JSONObject; import org.junit.After; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/IoTDBMemControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/IoTDBMemControlTest.java similarity index 88% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/IoTDBMemControlTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/IoTDBMemControlTest.java index 9d4446506ec..6a46a018d7d 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/IoTDBMemControlTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/IoTDBMemControlTest.java @@ -1,19 +1,19 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.integration.Constant; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.FloatDataPoint; -import cn.edu.tsinghua.tsfile.write.record.datapoint.IntDataPoint; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; -import cn.edu.tsinghua.tsfile.write.record.datapoint.StringDataPoint; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.integration.Constant; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.FloatDataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.IntDataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.StringDataPoint; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemControllerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/MemControllerTest.java similarity index 91% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemControllerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/MemControllerTest.java index 7314d524106..edf3e70042d 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/MemControllerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/MemControllerTest.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; +import org.apache.iotdb.db.exception.BufferWriteProcessorException; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowFileSizeControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowFileSizeControlTest.java similarity index 71% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowFileSizeControlTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowFileSizeControlTest.java index 04565cd803f..04b6acb5be4 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowFileSizeControlTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowFileSizeControlTest.java @@ -1,22 +1,28 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.engine.overflow.ioV2.OverflowProcessor; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.FileSchemaUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.MemUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowMetaSizeControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowMetaSizeControlTest.java similarity index 69% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowMetaSizeControlTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowMetaSizeControlTest.java index 72b6558db32..06c64663b59 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memcontrol/OverflowMetaSizeControlTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/OverflowMetaSizeControlTest.java @@ -1,22 +1,28 @@ -package cn.edu.tsinghua.iotdb.engine.memcontrol; +package org.apache.iotdb.db.engine.memcontrol; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.MetadataManagerHelper; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.engine.overflow.ioV2.OverflowProcessor; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.FileSchemaUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.MetadataManagerHelper; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.overflow.ioV2.OverflowProcessor; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.FileSchemaUtils; +import org.apache.iotdb.db.utils.MemUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableTestUtils.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemTableTestUtils.java similarity index 74% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableTestUtils.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemTableTestUtils.java index 9e1faa35693..8dc6f9ea296 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemTableTestUtils.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemTableTestUtils.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; public class MemTableTestUtils { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemtableBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemtableBenchmark.java similarity index 91% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemtableBenchmark.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemtableBenchmark.java index 2718b2ab398..f2dbafdfe87 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/MemtableBenchmark.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/MemtableBenchmark.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; /** * Memtable insert benchmark. diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTableTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTableTest.java similarity index 92% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTableTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTableTest.java index 1b8d4b0002b..285c8b8f6f0 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/memtable/PrimitiveMemTableTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memtable/PrimitiveMemTableTest.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.iotdb.engine.memtable; +package org.apache.iotdb.db.engine.memtable; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; import org.junit.Assert; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIOTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIOTest.java similarity index 87% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIOTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIOTest.java index 5ed16c9b5e6..0a0062343ce 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowIOTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowIOTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import static org.junit.Assert.assertEquals; @@ -6,13 +6,11 @@ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; -import cn.edu.tsinghua.tsfile.read.reader.TsFileInput; +import org.apache.iotdb.tsfile.read.reader.TsFileInput; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; - public class OverflowIOTest { private String overflowFilePath = "overflowfile"; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorBenchmark.java similarity index 79% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorBenchmark.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorBenchmark.java index 099fb4bb394..7082ccf3771 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorBenchmark.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorBenchmark.java @@ -1,17 +1,20 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.LongDataPoint; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.LongDataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; import org.apache.commons.io.FileUtils; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.exception.OverflowProcessorException; import java.io.File; import java.io.IOException; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorTest.java similarity index 82% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorTest.java index dea0b9100ba..02103d0bbc8 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowProcessorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessorTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import static org.junit.Assert.assertEquals; @@ -9,19 +9,22 @@ import java.util.Iterator; import java.util.Map; import java.util.concurrent.TimeUnit; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.querycontext.MergeSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.junit.*; -import cn.edu.tsinghua.iotdb.engine.PathUtils; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.Action; -import cn.edu.tsinghua.iotdb.engine.bufferwrite.FileNodeConstants; -import cn.edu.tsinghua.iotdb.engine.querycontext.MergeSeriesDataSource; -import cn.edu.tsinghua.iotdb.engine.querycontext.OverflowSeriesDataSource; -import cn.edu.tsinghua.iotdb.exception.OverflowProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.engine.PathUtils; +import org.apache.iotdb.db.engine.bufferwrite.Action; +import org.apache.iotdb.db.engine.bufferwrite.FileNodeConstants; +import org.apache.iotdb.db.engine.querycontext.MergeSeriesDataSource; +import org.apache.iotdb.db.engine.querycontext.OverflowSeriesDataSource; +import org.apache.iotdb.db.exception.OverflowProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; public class OverflowProcessorTest { @@ -66,7 +69,7 @@ public class OverflowProcessorTest { OverflowSeriesDataSource overflowSeriesDataSource = processor.query(OverflowTestUtils.deviceId1, OverflowTestUtils.measurementId1, null, OverflowTestUtils.dataType1); assertEquals(OverflowTestUtils.dataType1, overflowSeriesDataSource.getDataType()); - assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); + Assert.assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); assertEquals(1, overflowSeriesDataSource.getOverflowInsertFileList().size()); assertEquals(0, overflowSeriesDataSource.getOverflowInsertFileList().get(0).getChunkMetaDataList().size()); @@ -80,7 +83,7 @@ public class OverflowProcessorTest { overflowSeriesDataSource = processor.query(OverflowTestUtils.deviceId1, OverflowTestUtils.measurementId1, null, OverflowTestUtils.dataType1); assertEquals(OverflowTestUtils.dataType1, overflowSeriesDataSource.getDataType()); - assertEquals(false, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); + Assert.assertEquals(false, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); assertEquals(1, overflowSeriesDataSource.getOverflowInsertFileList().size()); Iterator iterator = overflowSeriesDataSource.getReadableMemChunk().getIterator(); for (int i = 1; i <= 3; i++) { @@ -93,7 +96,7 @@ public class OverflowProcessorTest { processor.close(); overflowSeriesDataSource = processor.query(OverflowTestUtils.deviceId1, OverflowTestUtils.measurementId1, null, OverflowTestUtils.dataType1); - assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); + Assert.assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); assertEquals(1, overflowSeriesDataSource.getOverflowInsertFileList().size()); assertEquals(1, overflowSeriesDataSource.getOverflowInsertFileList().get(0).getChunkMetaDataList().size()); @@ -125,7 +128,7 @@ public class OverflowProcessorTest { // test query OverflowSeriesDataSource overflowSeriesDataSource = processor.query(OverflowTestUtils.deviceId1, OverflowTestUtils.measurementId1, null, OverflowTestUtils.dataType2); - assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); + Assert.assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); assertEquals(0, overflowSeriesDataSource.getOverflowInsertFileList().get(0).getChunkMetaDataList().size()); processor.clear(); @@ -163,7 +166,7 @@ public class OverflowProcessorTest { overflowProcessor.switchWorkToMerge(); OverflowSeriesDataSource overflowSeriesDataSource = overflowProcessor.query(OverflowTestUtils.deviceId1, OverflowTestUtils.measurementId1, null, OverflowTestUtils.dataType1); - assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); + Assert.assertEquals(true, overflowSeriesDataSource.getReadableMemChunk().isEmpty()); assertEquals(2, overflowSeriesDataSource.getOverflowInsertFileList().size()); overflowProcessor.switchMergeToWork(); overflowProcessor.close(); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResourceTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResourceTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResourceTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResourceTest.java index a3aa3db8a95..cb5455f2ad0 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowResourceTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResourceTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import static org.junit.Assert.assertEquals; @@ -7,12 +7,12 @@ import java.io.FileOutputStream; import java.io.IOException; import java.util.List; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.EnvironmentUtils; public class OverflowResourceTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupportTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupportTest.java similarity index 90% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupportTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupportTest.java index de3209ff8b6..79f4fd410c3 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowSupportTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowSupportTest.java @@ -1,14 +1,15 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import static org.junit.Assert.assertEquals; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.db.utils.TimeValuePair; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; public class OverflowSupportTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowTestUtils.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowTestUtils.java similarity index 82% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowTestUtils.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowTestUtils.java index 87871ffdeae..4282ad6f588 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/ioV2/OverflowTestUtils.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowTestUtils.java @@ -1,16 +1,15 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.ioV2; +package org.apache.iotdb.db.engine.overflow.ioV2; import static org.junit.Assert.assertEquals; import java.io.IOException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; public class OverflowTestUtils { public static String deviceId1 = "d1"; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadataTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadataTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadataTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadataTest.java index e654b5f96ae..685bb5d3b61 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFFileMetadataTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFFileMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadataTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadataTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadataTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadataTest.java index b5bf493d784..d91f61ed76f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFRowGroupListMetadataTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFRowGroupListMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadataTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadataTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadataTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadataTest.java index 84e1146f3d4..ad839cdb7fc 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OFSeriesListMetadataTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OFSeriesListMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowTestHelper.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowTestHelper.java similarity index 86% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowTestHelper.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowTestHelper.java index dc8c26278fe..0f2d7555040 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowTestHelper.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowTestHelper.java @@ -1,10 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDigest; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDigest; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.util.ArrayList; import java.util.List; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowUtils.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowUtils.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowUtils.java rename to iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowUtils.java index c133cd4d536..57bfaf82d47 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/engine/overflow/metadata/OverflowUtils.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/overflow/metadata/OverflowUtils.java @@ -1,11 +1,8 @@ -package cn.edu.tsinghua.iotdb.engine.overflow.metadata; +package org.apache.iotdb.db.engine.overflow.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadataIndex; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.nio.ByteBuffer; -import java.util.HashMap; import java.util.List; import java.util.Map; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/exception/ExceptionBuilderTest.java b/iotdb/src/test/java/org/apache/iotdb/db/exception/ExceptionBuilderTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/exception/ExceptionBuilderTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/exception/ExceptionBuilderTest.java index 851fb76477f..b28a414f64a 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/exception/ExceptionBuilderTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/exception/ExceptionBuilderTest.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.iotdb.exception; +package org.apache.iotdb.db.exception; -import cn.edu.tsinghua.iotdb.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; +import org.apache.iotdb.db.exception.builder.ExceptionBuilder; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/Constant.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/Constant.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/Constant.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/Constant.java index ad5124088d0..2ab26881dae 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/Constant.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/Constant.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; public class Constant { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBAuthorizationTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationTest.java similarity index 99% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBAuthorizationTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationTest.java index 4f3a71bf2ff..b9b58d4c033 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBAuthorizationTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationTest.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; import org.junit.After; import org.junit.Before; import org.junit.Ignore; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBCompleteTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBCompleteTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBCompleteTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBCompleteTest.java index 0aa039774f2..116781e2988 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBCompleteTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBCompleteTest.java @@ -1,16 +1,20 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import java.sql.*; - -import static cn.edu.tsinghua.iotdb.integration.Constant.TIMESTAMP_STR; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; /** * Notice that, all test begins with "IoTDB" is integration test. @@ -379,7 +383,7 @@ public class IoTDBCompleteTest { result = ""; while (resultSet.next()) { for (int i = 1; i <= count; i++) { - if (now_start > 0L && column[i - 1] == TIMESTAMP_STR) { + if (now_start > 0L && column[i - 1] == Constant.TIMESTAMP_STR) { String timestr = resultSet.getString(i); Long tn = Long.valueOf(timestr); Long now = System.currentTimeMillis(); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBDaemonTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBDaemonTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBDaemonTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBDaemonTest.java index d09525e0ab0..fb5ee44da96 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBDaemonTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBDaemonTest.java @@ -1,16 +1,26 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import java.sql.*; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; +import static org.apache.iotdb.db.integration.Constant.TIMESTAMP_STR; +import static org.apache.iotdb.db.integration.Constant.d0s0; +import static org.apache.iotdb.db.integration.Constant.d0s1; +import static org.apache.iotdb.db.integration.Constant.d0s2; +import static org.apache.iotdb.db.integration.Constant.d0s3; +import static org.apache.iotdb.db.integration.Constant.d0s4; +import static org.apache.iotdb.db.integration.Constant.d1s0; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBEngineTimeGeneratorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorTest.java similarity index 84% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBEngineTimeGeneratorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorTest.java index 533271d1d41..be503562e29 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBEngineTimeGeneratorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorTest.java @@ -1,20 +1,20 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.query.control.OpenedFilePathsManager; -import cn.edu.tsinghua.iotdb.query.timegenerator.EngineTimeGenerator; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.control.OpenedFilePathsManager; +import org.apache.iotdb.db.query.timegenerator.EngineTimeGenerator; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -25,8 +25,9 @@ import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Notice that, all test begins with "IoTDB" is integration test. @@ -92,7 +93,7 @@ public class IoTDBEngineTimeGeneratorTest { public void testOneSeriesWithValueAndTimeFilter() throws IOException, FileNodeManagerException { System.out.println("Test >>> root.vehicle.d0.s0 >= 14 && time > 500"); - Path pd0s0 = new Path(d0s0); + Path pd0s0 = new Path(Constant.d0s0); ValueFilter.ValueGtEq valueGtEq = ValueFilter.gtEq(14); TimeFilter.TimeGt timeGt = TimeFilter.gt(500); @@ -117,7 +118,7 @@ public class IoTDBEngineTimeGeneratorTest { public void testEmptySeriesWithValueFilter() throws IOException, FileNodeManagerException { System.out.println("Test >>> root.vehicle.d1.s0 >= 5"); - Path pd1s0 = new Path(d1s0); + Path pd1s0 = new Path(Constant.d1s0); ValueFilter.ValueGtEq valueGtEq = ValueFilter.gtEq(5); OpenedFilePathsManager.getInstance().setJobIdForCurrentRequestThread(0); @@ -138,8 +139,8 @@ public class IoTDBEngineTimeGeneratorTest { public void testMultiSeriesWithValueFilterAndTimeFilter() throws IOException, FileNodeManagerException { System.out.println("Test >>> root.vehicle.d0.s0 >= 5 && root.vehicle.d0.s2 >= 11.5 || time > 900"); - Path pd0s0 = new Path(d0s0); - Path pd0s2 = new Path(d0s2); + Path pd0s0 = new Path(Constant.d0s0); + Path pd0s2 = new Path(Constant.d0s2); ValueFilter.ValueGtEq valueGtEq5 = ValueFilter.gtEq(5); ValueFilter.ValueGtEq valueGtEq11 = ValueFilter.gtEq(11.5f); @@ -169,7 +170,7 @@ public class IoTDBEngineTimeGeneratorTest { Statement statement = connection.createStatement(); //create storage group and measurement - for (String sql : create_sql) { + for (String sql : Constant.create_sql) { statement.execute(sql); } @@ -181,7 +182,7 @@ public class IoTDBEngineTimeGeneratorTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 31); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[(int) time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[(int) time % 5]); statement.execute(sql); if (satisfyTimeFilter1(time)) { @@ -209,7 +210,7 @@ public class IoTDBEngineTimeGeneratorTest { } sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 31); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[(int) time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[(int) time % 5]); statement.execute(sql); } diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLargeDataTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLargeDataTest.java similarity index 85% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLargeDataTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLargeDataTest.java index d117c4fb99d..72135d58627 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLargeDataTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLargeDataTest.java @@ -1,19 +1,24 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import java.sql.*; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Notice that, all test begins with "IoTDB" is integration test. @@ -89,9 +94,9 @@ public class IoTDBLargeDataTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0) - + "," + resultSet.getString(d0s1) + "," + resultSet.getString(d0s2) + "," + resultSet.getString(d0s3) - + "," + resultSet.getString(d0s4) + "," + resultSet.getString(d0s5); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0) + + "," + resultSet.getString(Constant.d0s1) + "," + resultSet.getString(Constant.d0s2) + "," + resultSet.getString(Constant.d0s3) + + "," + resultSet.getString(Constant.d0s4) + "," + resultSet.getString(Constant.d0s5); cnt++; } @@ -124,7 +129,7 @@ public class IoTDBLargeDataTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0); //System.out.println("===" + ans); cnt++; } @@ -158,7 +163,7 @@ public class IoTDBLargeDataTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0); //System.out.println(ans); cnt++; } @@ -192,8 +197,8 @@ public class IoTDBLargeDataTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - long time = Long.valueOf(resultSet.getString(TIMESTAMP_STR)); - String value = resultSet.getString(d0s1); + long time = Long.valueOf(resultSet.getString(Constant.TIMESTAMP_STR)); + String value = resultSet.getString(Constant.d0s1); if (time > 200900) { assertEquals("7777", value); } @@ -220,7 +225,7 @@ public class IoTDBLargeDataTest { connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX+"127.0.0.1:6667/", "root", "root"); Statement statement = connection.createStatement(); - for (String sql : create_sql) { + for (String sql : Constant.create_sql) { statement.execute(sql); } @@ -244,9 +249,9 @@ public class IoTDBLargeDataTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 22); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, time); statement.execute(sql); @@ -290,7 +295,7 @@ public class IoTDBLargeDataTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time + 2); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); } @@ -305,7 +310,7 @@ public class IoTDBLargeDataTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, "goodman"); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, 9999); statement.execute(sql); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLimitSlimitTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLimitSlimitTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLimitSlimitTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLimitSlimitTest.java index d6db7505bdc..c6e66ca6d03 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBLimitSlimitTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBLimitSlimitTest.java @@ -1,17 +1,22 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBDatabaseMetadata; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.IoTDBDatabaseMetadata; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import java.sql.*; +import java.sql.Connection; +import java.sql.DatabaseMetaData; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.ResultSetMetaData; +import java.sql.SQLException; +import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.TIMESTAMP_STR; import static org.junit.Assert.fail; /** @@ -179,7 +184,7 @@ public class IoTDBLimitSlimitTest { result = ""; while (resultSet.next()) { for (int i = 1; i <= count; i++) { - if (now_start > 0L && column[i - 1] == TIMESTAMP_STR) { + if (now_start > 0L && column[i - 1] == Constant.TIMESTAMP_STR) { String timestr = resultSet.getString(i); Long tn = Long.valueOf(timestr); Long now = System.currentTimeMillis(); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMetadataFetchTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMetadataFetchTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMetadataFetchTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMetadataFetchTest.java index ced609e36d1..83ecbaf503c 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMetadataFetchTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMetadataFetchTest.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Constant; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBMetadataResultSet; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Constant; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.IoTDBMetadataResultSet; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMultiSeriesTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesTest.java similarity index 85% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMultiSeriesTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesTest.java index fab94a42410..b08758f6fc5 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBMultiSeriesTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBMultiSeriesTest.java @@ -1,19 +1,24 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; -import java.sql.*; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; /** * Notice that, all test begins with "IoTDB" is integration test. @@ -89,9 +94,9 @@ public class IoTDBMultiSeriesTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0) - + "," + resultSet.getString(d0s1) + "," + resultSet.getString(d0s2) + "," + resultSet.getString(d0s3) - + "," + resultSet.getString(d0s4) + "," + resultSet.getString(d0s5); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0) + + "," + resultSet.getString(Constant.d0s1) + "," + resultSet.getString(Constant.d0s2) + "," + resultSet.getString(Constant.d0s3) + + "," + resultSet.getString(Constant.d0s4) + "," + resultSet.getString(Constant.d0s5); cnt++; } @@ -124,7 +129,7 @@ public class IoTDBMultiSeriesTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0); //System.out.println("===" + ans); cnt++; } @@ -158,7 +163,7 @@ public class IoTDBMultiSeriesTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - String ans = resultSet.getString(TIMESTAMP_STR) + "," + resultSet.getString(d0s0); + String ans = resultSet.getString(Constant.TIMESTAMP_STR) + "," + resultSet.getString(Constant.d0s0); //System.out.println(ans); cnt++; } @@ -192,8 +197,8 @@ public class IoTDBMultiSeriesTest { ResultSet resultSet = statement.getResultSet(); int cnt = 0; while (resultSet.next()) { - long time = Long.valueOf(resultSet.getString(TIMESTAMP_STR)); - String value = resultSet.getString(d0s1); + long time = Long.valueOf(resultSet.getString(Constant.TIMESTAMP_STR)); + String value = resultSet.getString(Constant.d0s1); if (time > 200900) { assertEquals("7777", value); } @@ -220,7 +225,7 @@ public class IoTDBMultiSeriesTest { connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX+"127.0.0.1:6667/", "root", "root"); Statement statement = connection.createStatement(); - for (String sql : create_sql) { + for (String sql : Constant.create_sql) { statement.execute(sql); } @@ -244,9 +249,9 @@ public class IoTDBMultiSeriesTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 22); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, time); statement.execute(sql); @@ -290,7 +295,7 @@ public class IoTDBMultiSeriesTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time + 2); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); } @@ -305,7 +310,7 @@ public class IoTDBMultiSeriesTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, "goodman"); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, 9999); statement.execute(sql); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSequenceDataQueryTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSequenceDataQueryTest.java similarity index 75% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSequenceDataQueryTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSequenceDataQueryTest.java index 6b6e63118c1..b789c649f8a 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSequenceDataQueryTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSequenceDataQueryTest.java @@ -1,21 +1,21 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.iotdb.query.executor.EngineQueryRouter; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.executor.EngineQueryRouter; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -26,7 +26,6 @@ import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -95,7 +94,7 @@ public class IoTDBSequenceDataQueryTest { Statement statement = connection.createStatement(); //create storage group and measurement - for (String sql : create_sql) { + for (String sql : Constant.create_sql) { statement.execute(sql); } @@ -107,7 +106,7 @@ public class IoTDBSequenceDataQueryTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 31); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[(int) time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[(int) time % 5]); statement.execute(sql); if (time % 17 >= 14) { @@ -131,7 +130,7 @@ public class IoTDBSequenceDataQueryTest { } sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 31); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[(int) time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[(int) time % 5]); statement.execute(sql); } @@ -151,13 +150,13 @@ public class IoTDBSequenceDataQueryTest { EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - queryExpression.addSelectedPath(new Path(d0s0)); - queryExpression.addSelectedPath(new Path(d0s1)); - queryExpression.addSelectedPath(new Path(d0s2)); - queryExpression.addSelectedPath(new Path(d0s3)); - queryExpression.addSelectedPath(new Path(d0s4)); - queryExpression.addSelectedPath(new Path(d1s0)); - queryExpression.addSelectedPath(new Path(d1s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s0)); + queryExpression.addSelectedPath(new Path(Constant.d0s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s2)); + queryExpression.addSelectedPath(new Path(Constant.d0s3)); + queryExpression.addSelectedPath(new Path(Constant.d0s4)); + queryExpression.addSelectedPath(new Path(Constant.d1s0)); + queryExpression.addSelectedPath(new Path(Constant.d1s1)); queryExpression.setExpression(null); QueryDataSet queryDataSet = engineExecutor.query(queryExpression); @@ -177,9 +176,9 @@ public class IoTDBSequenceDataQueryTest { public void readWithTimeFilterTest() throws IOException, FileNodeManagerException { EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - queryExpression.addSelectedPath(new Path(d0s0)); - queryExpression.addSelectedPath(new Path(d1s0)); - queryExpression.addSelectedPath(new Path(d1s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s0)); + queryExpression.addSelectedPath(new Path(Constant.d1s0)); + queryExpression.addSelectedPath(new Path(Constant.d1s1)); GlobalTimeExpression globalTimeExpression = new GlobalTimeExpression(TimeFilter.gtEq(800L)); queryExpression.setExpression(globalTimeExpression); @@ -204,15 +203,15 @@ public class IoTDBSequenceDataQueryTest { // select * from root where root.vehicle.d0.s0 >=14 EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - queryExpression.addSelectedPath(new Path(d0s0)); - queryExpression.addSelectedPath(new Path(d0s1)); - queryExpression.addSelectedPath(new Path(d0s2)); - queryExpression.addSelectedPath(new Path(d0s3)); - queryExpression.addSelectedPath(new Path(d0s4)); - queryExpression.addSelectedPath(new Path(d1s0)); - queryExpression.addSelectedPath(new Path(d1s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s0)); + queryExpression.addSelectedPath(new Path(Constant.d0s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s2)); + queryExpression.addSelectedPath(new Path(Constant.d0s3)); + queryExpression.addSelectedPath(new Path(Constant.d0s4)); + queryExpression.addSelectedPath(new Path(Constant.d1s0)); + queryExpression.addSelectedPath(new Path(Constant.d1s1)); - Path queryPath = new Path(d0s0); + Path queryPath = new Path(Constant.d0s0); SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(queryPath, ValueFilter.gtEq(14)); queryExpression.setExpression(singleSeriesExpression); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSeriesReaderTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSeriesReaderTest.java similarity index 85% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSeriesReaderTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSeriesReaderTest.java index 3d503a7838d..842f4e47e03 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBSeriesReaderTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBSeriesReaderTest.java @@ -1,20 +1,20 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.iotdb.query.executor.EngineQueryRouter; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.query.executor.EngineQueryRouter; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; @@ -25,7 +25,6 @@ import java.sql.DriverManager; import java.sql.SQLException; import java.sql.Statement; -import static cn.edu.tsinghua.iotdb.integration.Constant.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -91,14 +90,14 @@ public class IoTDBSeriesReaderTest { EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - queryExpression.addSelectedPath(new Path(d0s0)); - queryExpression.addSelectedPath(new Path(d0s1)); - queryExpression.addSelectedPath(new Path(d0s2)); - queryExpression.addSelectedPath(new Path(d0s3)); - queryExpression.addSelectedPath(new Path(d0s4)); - queryExpression.addSelectedPath(new Path(d0s5)); - queryExpression.addSelectedPath(new Path(d1s0)); - queryExpression.addSelectedPath(new Path(d1s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s0)); + queryExpression.addSelectedPath(new Path(Constant.d0s1)); + queryExpression.addSelectedPath(new Path(Constant.d0s2)); + queryExpression.addSelectedPath(new Path(Constant.d0s3)); + queryExpression.addSelectedPath(new Path(Constant.d0s4)); + queryExpression.addSelectedPath(new Path(Constant.d0s5)); + queryExpression.addSelectedPath(new Path(Constant.d1s0)); + queryExpression.addSelectedPath(new Path(Constant.d1s1)); queryExpression.setExpression(null); QueryDataSet queryDataSet = engineExecutor.query(queryExpression); @@ -121,7 +120,7 @@ public class IoTDBSeriesReaderTest { EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - Path p = new Path(d0s0); + Path p = new Path(Constant.d0s0); queryExpression.addSelectedPath(p); SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(p, ValueFilter.gtEq(20)); queryExpression.setExpression(singleSeriesExpression); @@ -147,7 +146,7 @@ public class IoTDBSeriesReaderTest { EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - Path path = new Path(d0s0); + Path path = new Path(Constant.d0s0); queryExpression.addSelectedPath(path); SingleSeriesExpression expression = new SingleSeriesExpression(path, TimeFilter.gt(22987L)); queryExpression.setExpression(expression); @@ -171,8 +170,8 @@ public class IoTDBSeriesReaderTest { System.out.println("Test >>> select s1 from root.vehicle.d0 where s0 < 111"); EngineQueryRouter engineExecutor = new EngineQueryRouter(); QueryExpression queryExpression = QueryExpression.create(); - Path path1 = new Path(d0s0); - Path path2 = new Path(d0s1); + Path path1 = new Path(Constant.d0s0); + Path path2 = new Path(Constant.d0s1); queryExpression.addSelectedPath(path1); queryExpression.addSelectedPath(path2); SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(path1, ValueFilter.lt(111)); @@ -199,7 +198,7 @@ public class IoTDBSeriesReaderTest { connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX+"127.0.0.1:6667/", "root", "root"); Statement statement = connection.createStatement(); - for (String sql : create_sql) { + for (String sql : Constant.create_sql) { statement.execute(sql); } @@ -212,9 +211,9 @@ public class IoTDBSeriesReaderTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time % 22); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, time); statement.execute(sql); @@ -270,7 +269,7 @@ public class IoTDBSeriesReaderTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s2) values(%s,%s)", time, time + 2); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, stringValue[time % 5]); + sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, Constant.stringValue[time % 5]); statement.execute(sql); } @@ -285,7 +284,7 @@ public class IoTDBSeriesReaderTest { statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s3) values(%s,'%s')", time, "goodman"); statement.execute(sql); - sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, booleanValue[time % 2]); + sql = String.format("insert into root.vehicle.d0(timestamp,s4) values(%s, %s)", time, Constant.booleanValue[time % 2]); statement.execute(sql); sql = String.format("insert into root.vehicle.d0(timestamp,s5) values(%s, %s)", time, 9999); statement.execute(sql); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBTimeZoneTest.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBTimeZoneTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneTest.java index 6bdba26c216..51eab456c4b 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/integration/IoTDBTimeZoneTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBTimeZoneTest.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.iotdb.integration; +package org.apache.iotdb.db.integration; -import cn.edu.tsinghua.iotdb.jdbc.IoTDBConnection; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.IoTDBConnection; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.service.IoTDB; import org.apache.thrift.TException; import org.junit.After; import org.junit.Assert; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerAdvancedTest.java b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerAdvancedTest.java similarity index 92% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerAdvancedTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerAdvancedTest.java index 484cc590a7a..ecc341176b4 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerAdvancedTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerAdvancedTest.java @@ -1,9 +1,11 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerBasicTest.java b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerBasicTest.java similarity index 89% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerBasicTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerBasicTest.java index 367182588bb..7b8fcc9f597 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerBasicTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerBasicTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -7,14 +7,17 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.read.common.Path; public class MManagerBasicTest { @@ -45,7 +48,7 @@ public class MManagerBasicTest { try { manager.setStorageLevelToMTree("root.laptop"); } catch (PathErrorException | IOException e) { - assertEquals("The seriesPath of root.laptop already exist, it can't be set to the storage group", e.getMessage()); + Assert.assertEquals("The seriesPath of root.laptop already exist, it can't be set to the storage group", e.getMessage()); } try { @@ -125,7 +128,7 @@ public class MManagerBasicTest { try { manager.setStorageLevelToMTree("root.laptop.d2"); } catch (PathErrorException | IOException e) { - assertEquals(String.format("The seriesPath of %s already exist, it can't be set to the storage group", "root.laptop.d2"),e.getMessage()); + Assert.assertEquals(String.format("The seriesPath of %s already exist, it can't be set to the storage group", "root.laptop.d2"),e.getMessage()); } /* * check file level diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerEfficiencyTest.java b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerEfficiencyTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerEfficiencyTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerEfficiencyTest.java index 41d4e5ef3c5..5dcc4ca423d 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerEfficiencyTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerEfficiencyTest.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.tsfile.exception.cache.CacheException; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.tsfile.exception.cache.CacheException; import org.junit.Before; import org.junit.Ignore; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerImproveTest.java b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerImproveTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerImproveTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerImproveTest.java index e7b86b28e55..c001f943ec9 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MManagerImproveTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MManagerImproveTest.java @@ -1,11 +1,14 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MTreeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java similarity index 94% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MTreeTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java index 92665028faf..ad4d41a3495 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/metadata/MTreeTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/metadata/MTreeTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.metadata; +package org.apache.iotdb.db.metadata; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -7,13 +7,14 @@ import static org.junit.Assert.fail; import java.util.ArrayList; import java.util.HashMap; +import org.apache.iotdb.db.exception.PathErrorException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.utils.EnvironmentUtils; public class MTreeTest { @@ -130,7 +131,7 @@ public class MTreeTest { try { root.setStorageGroup("root.laptop"); } catch (PathErrorException e) { - assertEquals("The seriesPath of root.laptop already exist, it can't be set to the storage group", e.getMessage()); + Assert.assertEquals("The seriesPath of root.laptop already exist, it can't be set to the storage group", e.getMessage()); } // check timeseries assertEquals(root.isPathExist("root.laptop.d1.s0"), false); diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/monitor/MonitorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/monitor/MonitorTest.java similarity index 83% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/monitor/MonitorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/monitor/MonitorTest.java index 2f79dcb7915..52f3f71f61e 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/monitor/MonitorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/monitor/MonitorTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.monitor; +package org.apache.iotdb.db.monitor; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; @@ -7,18 +7,21 @@ import static org.junit.Assert.fail; import java.util.HashMap; import java.util.concurrent.atomic.AtomicLong; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.metadata.MManager; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; /** * @author Liliang diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/FileManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/FileManagerTest.java similarity index 99% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/FileManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/postback/sender/FileManagerTest.java index 27d4dd58496..f73a656ef7d 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/FileManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/FileManagerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; import java.io.File; import java.io.IOException; @@ -13,7 +13,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.postback.sender.FileManager; +import org.apache.iotdb.db.postback.sender.FileManager; public class FileManagerTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/IoTDBSingleClientPostBackTest.java b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/IoTDBSingleClientPostBackTest.java similarity index 98% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/IoTDBSingleClientPostBackTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/postback/sender/IoTDBSingleClientPostBackTest.java index 559ef3a601b..f07fa11445b 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/IoTDBSingleClientPostBackTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/IoTDBSingleClientPostBackTest.java @@ -1,6 +1,13 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; -import static org.junit.Assert.*; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.integration.Constant; +import org.apache.iotdb.db.postback.conf.PostBackSenderConfig; +import org.apache.iotdb.db.postback.conf.PostBackSenderDescriptor; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.jdbc.Config; import java.io.File; import java.sql.Connection; @@ -11,14 +18,7 @@ import java.sql.Statement; import java.util.HashSet; import java.util.Set; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderConfig; -import cn.edu.tsinghua.iotdb.postback.conf.PostBackSenderDescriptor; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.integration.Constant; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; +import static org.junit.Assert.fail; /** * The test is to run a complete postback function diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/MultipleClientPostBackTest.java b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/MultipleClientPostBackTest.java similarity index 97% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/MultipleClientPostBackTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/postback/sender/MultipleClientPostBackTest.java index 3245415fc1e..4462046226f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/postback/sender/MultipleClientPostBackTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/postback/sender/MultipleClientPostBackTest.java @@ -1,10 +1,9 @@ -package cn.edu.tsinghua.iotdb.postback.sender; +package org.apache.iotdb.db.postback.sender; -import static org.junit.Assert.*; +import org.apache.iotdb.jdbc.Config; import java.io.BufferedReader; import java.io.File; -import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.sql.Connection; @@ -18,11 +17,7 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; - -import cn.edu.tsinghua.iotdb.jdbc.Config; +import static org.junit.Assert.fail; public class MultipleClientPostBackTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/bench/QueryParseBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/bench/QueryParseBenchmark.java similarity index 84% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/bench/QueryParseBenchmark.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/bench/QueryParseBenchmark.java index 373e6ba13c5..18b43bc8399 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/bench/QueryParseBenchmark.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/bench/QueryParseBenchmark.java @@ -1,11 +1,14 @@ -package cn.edu.tsinghua.iotdb.qp.bench; +package org.apache.iotdb.db.qp.bench; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; /** * SQL Parse benchmark. diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextAuthorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextAuthorTest.java similarity index 81% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextAuthorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextAuthorTest.java index edff2e151a5..df7a55c9ebd 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextAuthorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextAuthorTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.other; +package org.apache.iotdb.db.qp.other; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.fail; @@ -6,18 +6,19 @@ import static org.junit.Assert.fail; import java.util.Arrays; import java.util.Collection; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.sys.AuthorPlan; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.physical.sys.AuthorPlan; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; /** * test ast node parsing on authorization diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextPropertyTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextPropertyTest.java similarity index 84% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextPropertyTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextPropertyTest.java index 0614a69ab9e..166ffa04dad 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/other/TSPlanContextPropertyTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/other/TSPlanContextPropertyTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.other; +package org.apache.iotdb.db.qp.other; import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertEquals; @@ -6,19 +6,20 @@ import static org.junit.Assert.assertEquals; import java.util.Arrays; import java.util.Collection; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.logical.sys.PropertyOperator.PropertyType; -import cn.edu.tsinghua.iotdb.qp.physical.sys.PropertyPlan; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.logical.sys.PropertyOperator.PropertyType; +import org.apache.iotdb.db.qp.physical.sys.PropertyPlan; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.tsfile.read.common.Path; /** * test ast node parsing on authorization diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/LogicalPlanSmallTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java similarity index 82% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/LogicalPlanSmallTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java index 37abcf161f5..5565df3ab58 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/LogicalPlanSmallTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/LogicalPlanSmallTest.java @@ -1,25 +1,30 @@ -package cn.edu.tsinghua.iotdb.qp.plan; +package org.apache.iotdb.db.qp.plan; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.qp.IllegalASTFormatException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOptimizeException; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.logical.RootOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.QueryOperator; -import cn.edu.tsinghua.iotdb.qp.logical.crud.SFWOperator; -import cn.edu.tsinghua.iotdb.qp.strategy.LogicalGenerator; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.ConcatPathOptimizer; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; -import cn.edu.tsinghua.iotdb.sql.ParseGenerator; -import cn.edu.tsinghua.iotdb.sql.parse.ASTNode; -import cn.edu.tsinghua.iotdb.sql.parse.ParseException; -import cn.edu.tsinghua.iotdb.sql.parse.ParseUtils; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.qp.IllegalASTFormatException; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.exception.qp.LogicalOptimizeException; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.db.qp.logical.crud.QueryOperator; +import org.apache.iotdb.db.qp.logical.crud.SFWOperator; +import org.apache.iotdb.db.qp.strategy.LogicalGenerator; +import org.apache.iotdb.db.qp.strategy.optimizer.ConcatPathOptimizer; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.sql.ParseGenerator; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.ParseException; +import org.apache.iotdb.db.sql.parse.ParseUtils; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.qp.logical.RootOperator; +import org.apache.iotdb.db.qp.logical.crud.QueryOperator; +import org.apache.iotdb.db.qp.logical.crud.SFWOperator; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/PhysicalPlanTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java similarity index 86% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/PhysicalPlanTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java index b6ee7fba837..1037db02889 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/PhysicalPlanTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/PhysicalPlanTest.java @@ -1,38 +1,39 @@ -package cn.edu.tsinghua.iotdb.qp.plan; +package org.apache.iotdb.db.qp.plan; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.crud.AggregationPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.FillQueryPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.GroupByPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.QueryPlan; -import cn.edu.tsinghua.iotdb.query.fill.LinearFill; -import cn.edu.tsinghua.iotdb.query.fill.PreviousFill; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.physical.crud.AggregationPlan; +import org.apache.iotdb.db.qp.physical.crud.FillQueryPlan; +import org.apache.iotdb.db.qp.physical.crud.GroupByPlan; +import org.apache.iotdb.db.qp.physical.crud.QueryPlan; +import org.apache.iotdb.db.query.fill.LinearFill; +import org.apache.iotdb.db.query.fill.PreviousFill; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.AuthorPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.MetadataPlan; -import cn.edu.tsinghua.iotdb.qp.physical.sys.PropertyPlan; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.sys.AuthorPlan; +import org.apache.iotdb.db.qp.physical.sys.MetadataPlan; +import org.apache.iotdb.db.qp.physical.sys.PropertyPlan; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.StringContainer; public class PhysicalPlanTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/QPUpdateTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/QPUpdateTest.java similarity index 92% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/QPUpdateTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/plan/QPUpdateTest.java index 43a204974e8..d330f2bb179 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/QPUpdateTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/QPUpdateTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.qp.plan; +package org.apache.iotdb.db.qp.plan; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -11,16 +11,17 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.After; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; import org.junit.Test; public class QPUpdateTest { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/TestConcatOptimizer.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/TestConcatOptimizer.java similarity index 80% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/TestConcatOptimizer.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/plan/TestConcatOptimizer.java index 5fed71e23d6..fdd0815c0a2 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/plan/TestConcatOptimizer.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/plan/TestConcatOptimizer.java @@ -1,17 +1,18 @@ -package cn.edu.tsinghua.iotdb.qp.plan; +package org.apache.iotdb.db.qp.plan; -import cn.edu.tsinghua.iotdb.exception.ArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.QueryProcessor; -import cn.edu.tsinghua.iotdb.exception.qp.QueryProcessorException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.QueryPlan; -import cn.edu.tsinghua.iotdb.qp.utils.MemIntQpExecutor; -import cn.edu.tsinghua.iotdb.qp.strategy.optimizer.ConcatPathOptimizer; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.ArgsErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.QueryProcessor; +import org.apache.iotdb.db.exception.qp.QueryProcessorException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.QueryPlan; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; +import org.apache.iotdb.db.qp.strategy.optimizer.ConcatPathOptimizer; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.common.Path; import org.antlr.runtime.RecognitionException; +import org.apache.iotdb.db.qp.utils.MemIntQpExecutor; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGeneratorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/strategy/LogicalGeneratorTest.java similarity index 90% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGeneratorTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/strategy/LogicalGeneratorTest.java index a0f4e6d87d3..c5285d48ecd 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/strategy/LogicalGeneratorTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/strategy/LogicalGeneratorTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.qp.strategy; +package org.apache.iotdb.db.qp.strategy; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.constant.SQLConstant; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/utils/MemIntQpExecutor.java b/iotdb/src/test/java/org/apache/iotdb/db/qp/utils/MemIntQpExecutor.java similarity index 87% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/utils/MemIntQpExecutor.java rename to iotdb/src/test/java/org/apache/iotdb/db/qp/utils/MemIntQpExecutor.java index c54572f67c1..1d8c0b41f74 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/qp/utils/MemIntQpExecutor.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/qp/utils/MemIntQpExecutor.java @@ -1,17 +1,17 @@ -package cn.edu.tsinghua.iotdb.qp.utils; +package org.apache.iotdb.db.qp.utils; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.qp.constant.SQLConstant; -import cn.edu.tsinghua.iotdb.qp.executor.QueryProcessExecutor; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.qp.constant.SQLConstant; +import org.apache.iotdb.db.qp.executor.QueryProcessExecutor; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/component/SimpleFileWriter.java b/iotdb/src/test/java/org/apache/iotdb/db/query/component/SimpleFileWriter.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/component/SimpleFileWriter.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/component/SimpleFileWriter.java index 8e09da37f2e..d47e42116f0 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/component/SimpleFileWriter.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/component/SimpleFileWriter.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.component; +package org.apache.iotdb.db.query.component; import org.junit.Ignore; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/control/FileReaderManagerTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/control/FileReaderManagerTest.java index befefe3a54f..8304127bd63 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/FileReaderManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/control/FileReaderManagerTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/iotdb/src/test/java/org/apache/iotdb/db/query/control/OpenedFilePathsManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/control/OpenedFilePathsManagerTest.java new file mode 100644 index 00000000000..4ff90174b4b --- /dev/null +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/control/OpenedFilePathsManagerTest.java @@ -0,0 +1,5 @@ +package org.apache.iotdb.db.query.control; + + +public class OpenedFilePathsManagerTest { +} diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/control/QueryTokenManagerTest.java similarity index 65% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/control/QueryTokenManagerTest.java index 5328d6310c6..0a148827caf 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/control/QueryTokenManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/control/QueryTokenManagerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.query.control; +package org.apache.iotdb.db.query.control; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestampTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestampTest.java similarity index 95% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestampTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestampTest.java index c6f4721d03d..ca0a32b1113 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderByTimestampTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderByTimestampTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; import org.junit.Assert; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderTest.java similarity index 88% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderTest.java index eb01f54e10b..6101cafb42b 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/PriorityMergeReaderTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/PriorityMergeReaderTest.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; import org.junit.Assert; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/SeriesMergeSortReaderTest.java b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/SeriesMergeSortReaderTest.java similarity index 90% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/SeriesMergeSortReaderTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/SeriesMergeSortReaderTest.java index 5f2dddd65d8..3f34e4e8bd6 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/query/reader/merge/SeriesMergeSortReaderTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/query/reader/merge/SeriesMergeSortReaderTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.iotdb.query.reader.merge; +package org.apache.iotdb.db.query.reader.merge; -import cn.edu.tsinghua.iotdb.query.reader.IReader; -import cn.edu.tsinghua.iotdb.utils.TimeValuePair; -import cn.edu.tsinghua.iotdb.utils.TsPrimitiveType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.db.query.reader.IReader; +import org.apache.iotdb.db.utils.TimeValuePair; +import org.apache.iotdb.db.utils.TsPrimitiveType; +import org.apache.iotdb.tsfile.read.common.BatchData; import org.junit.Assert; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/script/IoTDBStartServerScriptTest.java b/iotdb/src/test/java/org/apache/iotdb/db/script/IoTDBStartServerScriptTest.java similarity index 98% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/script/IoTDBStartServerScriptTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/script/IoTDBStartServerScriptTest.java index 813791f2742..40a6d986bdb 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/script/IoTDBStartServerScriptTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/script/IoTDBStartServerScriptTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.script; +package org.apache.iotdb.db.script; import static org.junit.Assert.assertEquals; @@ -11,7 +11,6 @@ import java.util.List; import org.junit.After; import org.junit.Before; -import org.junit.Test; public class IoTDBStartServerScriptTest { private final String START_IOTDB_STR = "IoTDB has started."; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/DatetimeUtilsTest.java b/iotdb/src/test/java/org/apache/iotdb/db/sql/DatetimeUtilsTest.java similarity index 91% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/DatetimeUtilsTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/sql/DatetimeUtilsTest.java index 1b0d13b9239..b5041dabeb1 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/DatetimeUtilsTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/sql/DatetimeUtilsTest.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.iotdb.sql; +package org.apache.iotdb.db.sql; -import cn.edu.tsinghua.iotdb.exception.qp.LogicalOperatorException; -import cn.edu.tsinghua.iotdb.qp.constant.DatetimeUtils; +import org.apache.iotdb.db.exception.qp.LogicalOperatorException; +import org.apache.iotdb.db.qp.constant.DatetimeUtils; +import org.apache.iotdb.db.qp.constant.DatetimeUtils; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -47,7 +49,7 @@ public class DatetimeUtilsTest { long res = 1546413207000L; for(String str : timeFormatWithoutMs) { - assertEquals(res, DatetimeUtils.convertDatetimeStrToMillisecond(str, zoneOffset)); + Assert.assertEquals(res, DatetimeUtils.convertDatetimeStrToMillisecond(str, zoneOffset)); } for(String str : timeFormatWithoutMs) { diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/SQLParserTest.java b/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java similarity index 99% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/SQLParserTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java index 40c880ea03f..d2f7d4eeeac 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/sql/SQLParserTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/sql/SQLParserTest.java @@ -1,13 +1,12 @@ -package cn.edu.tsinghua.iotdb.sql; +package org.apache.iotdb.db.sql; -import cn.edu.tsinghua.iotdb.sql.parse.ASTNode; -import cn.edu.tsinghua.iotdb.sql.parse.Node; -import cn.edu.tsinghua.iotdb.sql.parse.ParseException; -import cn.edu.tsinghua.iotdb.sql.parse.ParseUtils; +import org.apache.iotdb.db.sql.parse.ASTNode; +import org.apache.iotdb.db.sql.parse.Node; +import org.apache.iotdb.db.sql.parse.ParseException; +import org.apache.iotdb.db.sql.parse.ParseUtils; import org.antlr.runtime.RecognitionException; import org.junit.Test; -import javax.swing.plaf.synth.SynthOptionPaneUI; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/EnvironmentUtils.java b/iotdb/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java similarity index 65% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/EnvironmentUtils.java rename to iotdb/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java index 93c0c12ac26..f043c502041 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/EnvironmentUtils.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java @@ -1,24 +1,38 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; -import cn.edu.tsinghua.iotdb.auth.AuthException; -import cn.edu.tsinghua.iotdb.auth.authorizer.IAuthorizer; -import cn.edu.tsinghua.iotdb.auth.authorizer.LocalFileAuthorizer; -import cn.edu.tsinghua.iotdb.conf.directories.Directories; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.engine.cache.RowGroupBlockMetaDataCache; -import cn.edu.tsinghua.iotdb.engine.cache.TsFileMetaDataCache; -import cn.edu.tsinghua.iotdb.engine.filenode.FileNodeManager; -import cn.edu.tsinghua.iotdb.engine.memcontrol.BasicMemController; -import cn.edu.tsinghua.iotdb.exception.FileNodeManagerException; -import cn.edu.tsinghua.iotdb.exception.StartupException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.monitor.StatMonitor; -import cn.edu.tsinghua.iotdb.query.control.FileReaderManager; -import cn.edu.tsinghua.iotdb.query.control.QueryTokenManager; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.conf.directories.Directories; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.engine.cache.RowGroupBlockMetaDataCache; +import org.apache.iotdb.db.engine.cache.TsFileMetaDataCache; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.StatMonitor; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.auth.AuthException; +import org.apache.iotdb.db.auth.authorizer.IAuthorizer; +import org.apache.iotdb.db.auth.authorizer.LocalFileAuthorizer; +import org.apache.iotdb.db.engine.cache.RowGroupBlockMetaDataCache; +import org.apache.iotdb.db.engine.cache.TsFileMetaDataCache; +import org.apache.iotdb.db.engine.filenode.FileNodeManager; +import org.apache.iotdb.db.engine.memcontrol.BasicMemController; +import org.apache.iotdb.db.exception.FileNodeManagerException; +import org.apache.iotdb.db.exception.StartupException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.monitor.StatMonitor; +import org.apache.iotdb.db.query.control.FileReaderManager; +import org.apache.iotdb.db.query.control.QueryTokenManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtilTest.java b/iotdb/src/test/java/org/apache/iotdb/db/utils/OpenFileNumUtilTest.java similarity index 99% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtilTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/utils/OpenFileNumUtilTest.java index 28d255fb8b8..0aa599f15bc 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/OpenFileNumUtilTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/utils/OpenFileNumUtilTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import org.junit.After; import org.junit.Before; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListTest.java b/iotdb/src/test/java/org/apache/iotdb/db/utils/PrimitiveArrayListTest.java similarity index 96% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/utils/PrimitiveArrayListTest.java index 88fb6f2d51f..216f50502f1 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/utils/PrimitiveArrayListTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/utils/PrimitiveArrayListTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.utils; +package org.apache.iotdb.db.utils; import org.junit.Assert; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/IoTDBLogFileSizeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java similarity index 88% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/IoTDBLogFileSizeTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java index 9138f18f936..86ef930c3ac 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/IoTDBLogFileSizeTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/IoTDBLogFileSizeTest.java @@ -1,17 +1,22 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; -import cn.edu.tsinghua.iotdb.conf.IoTDBConstant; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.jdbc.Config; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.iotdb.service.IoTDB; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.iotdb.utils.MemUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.conf.IoTDBConstant; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.jdbc.Config; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.db.service.IoTDB; +import org.apache.iotdb.db.utils.MemUtils; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/PerformanceTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java similarity index 85% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/PerformanceTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java index ec3a6ee4c17..e67bace471f 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/PerformanceTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/PerformanceTest.java @@ -1,22 +1,27 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.*; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.writelog.transfer.PhysicalPlanLogTransfer; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.db.exception.*; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/RecoverTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/RecoverTest.java similarity index 87% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/RecoverTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/RecoverTest.java index 5e9502fc91a..2dd60e1b36a 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/RecoverTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/RecoverTest.java @@ -1,21 +1,29 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.ProcessorException; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.writelog.recover.ExclusiveLogRecoverPerformer; -import cn.edu.tsinghua.iotdb.writelog.recover.RecoverPerformer; -import cn.edu.tsinghua.iotdb.writelog.replay.LogReplayer; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.recover.ExclusiveLogRecoverPerformer; +import org.apache.iotdb.db.writelog.recover.RecoverPerformer; +import org.apache.iotdb.db.writelog.replay.LogReplayer; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.ProcessorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.recover.ExclusiveLogRecoverPerformer; +import org.apache.iotdb.db.writelog.recover.RecoverPerformer; +import org.apache.iotdb.db.writelog.replay.LogReplayer; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -26,8 +34,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import static cn.edu.tsinghua.iotdb.writelog.RecoverStage.backup; -import static cn.edu.tsinghua.iotdb.writelog.RecoverStage.replayLog; +import static org.apache.iotdb.db.writelog.RecoverStage.backup; +import static org.apache.iotdb.db.writelog.RecoverStage.replayLog; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -153,7 +161,7 @@ public class RecoverTest { try { // set flag - File flagFile = new File(logNode.getLogDirectory() + File.separator + ExclusiveLogRecoverPerformer.RECOVER_FLAG_NAME + "-" + backup.name()); + File flagFile = new File(logNode.getLogDirectory() + File.separator + ExclusiveLogRecoverPerformer.RECOVER_FLAG_NAME + "-" + RecoverStage.backup.name()); flagFile.createNewFile(); InsertPlan bwInsertPlan = new InsertPlan(1, "logTestDevice", 100, Arrays.asList("s1", "s2", "s3", "s4"), @@ -222,7 +230,7 @@ public class RecoverTest { try { // set flag - File flagFile = new File(logNode.getLogDirectory() + File.separator + ExclusiveLogRecoverPerformer.RECOVER_FLAG_NAME + "-" + replayLog.name()); + File flagFile = new File(logNode.getLogDirectory() + File.separator + ExclusiveLogRecoverPerformer.RECOVER_FLAG_NAME + "-" + RecoverStage.replayLog.name()); flagFile.createNewFile(); InsertPlan bwInsertPlan = new InsertPlan(1, "logTestDevice", 100, Arrays.asList("s1", "s2", "s3", "s4"), diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeManagerTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeManagerTest.java similarity index 75% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeManagerTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeManagerTest.java index e8f4e75c5fd..29298329365 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeManagerTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeManagerTest.java @@ -1,21 +1,28 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.exception.MetadataArgsErrorException; -import cn.edu.tsinghua.iotdb.exception.PathErrorException; -import cn.edu.tsinghua.iotdb.exception.RecoverException; -import cn.edu.tsinghua.iotdb.metadata.MManager; -import cn.edu.tsinghua.iotdb.writelog.manager.MultiFileLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.manager.WriteLogNodeManager; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.manager.WriteLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.MetadataArgsErrorException; +import org.apache.iotdb.db.exception.PathErrorException; +import org.apache.iotdb.db.exception.RecoverException; +import org.apache.iotdb.db.metadata.MManager; +import org.apache.iotdb.db.writelog.manager.MultiFileLogNodeManager; +import org.apache.iotdb.db.writelog.manager.WriteLogNodeManager; +import org.apache.iotdb.db.writelog.node.WriteLogNode; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeTest.java similarity index 92% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeTest.java index e3bfa4e69a7..6166080a8b4 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/WriteLogNodeTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/WriteLogNodeTest.java @@ -1,15 +1,18 @@ -package cn.edu.tsinghua.iotdb.writelog; +package org.apache.iotdb.db.writelog; -import cn.edu.tsinghua.iotdb.conf.IoTDBConfig; -import cn.edu.tsinghua.iotdb.conf.IoTDBDescriptor; -import cn.edu.tsinghua.iotdb.writelog.transfer.PhysicalPlanLogTransfer; -import cn.edu.tsinghua.iotdb.writelog.node.ExclusiveWriteLogNode; -import cn.edu.tsinghua.iotdb.writelog.node.WriteLogNode; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.utils.EnvironmentUtils; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.conf.IoTDBConfig; +import org.apache.iotdb.db.conf.IoTDBDescriptor; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.utils.EnvironmentUtils; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.writelog.node.ExclusiveWriteLogNode; +import org.apache.iotdb.db.writelog.node.WriteLogNode; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriterReaderTest.java b/iotdb/src/test/java/org/apache/iotdb/db/writelog/io/LogWriterReaderTest.java similarity index 76% rename from iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriterReaderTest.java rename to iotdb/src/test/java/org/apache/iotdb/db/writelog/io/LogWriterReaderTest.java index 653a440c42a..023328fef8e 100644 --- a/iotdb/src/test/java/cn/edu/tsinghua/iotdb/writelog/io/LogWriterReaderTest.java +++ b/iotdb/src/test/java/org/apache/iotdb/db/writelog/io/LogWriterReaderTest.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.iotdb.writelog.io; +package org.apache.iotdb.db.writelog.io; -import cn.edu.tsinghua.iotdb.exception.WALOverSizedException; -import cn.edu.tsinghua.iotdb.qp.physical.PhysicalPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.DeletePlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.InsertPlan; -import cn.edu.tsinghua.iotdb.qp.physical.crud.UpdatePlan; -import cn.edu.tsinghua.iotdb.writelog.transfer.PhysicalPlanLogTransfer; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.WALOverSizedException; +import org.apache.iotdb.db.qp.physical.PhysicalPlan; +import org.apache.iotdb.db.qp.physical.crud.DeletePlan; +import org.apache.iotdb.db.qp.physical.crud.InsertPlan; +import org.apache.iotdb.db.qp.physical.crud.UpdatePlan; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.db.exception.WALOverSizedException; +import org.apache.iotdb.db.writelog.transfer.PhysicalPlanLogTransfer; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; diff --git a/iotdb/src/test/resources/start-postBackTest.sh b/iotdb/src/test/resources/start-postBackTest.sh index 747ecb58aec..2acac542bfb 100644 --- a/iotdb/src/test/resources/start-postBackTest.sh +++ b/iotdb/src/test/resources/start-postBackTest.sh @@ -29,7 +29,7 @@ for f in ${IOTDB_HOME}/lib/*.jar; do CLASSPATH=${CLASSPATH}":"$f done -MAIN_CLASS=cn.edu.tsinghua.iotdb.postback.utils.CreateDataSender1 +MAIN_CLASS=org.apache.iotdb.db.postback.utils.CreateDataSender1 "$JAVA" -DIOTDB_HOME=${IOTDB_HOME} -DTSFILE_HOME=${IOTDB_HOME} -DIOTDB_CONF=${IOTDB_CONF} -Dlogback.configurationFile=${IOTDB_CONF}/logback.xml $IOTDB_DERBY_OPTS $IOTDB_JMX_OPTS -Dname=postBackTest -cp "$CLASSPATH" "$MAIN_CLASS" diff --git a/jdbc/README.md b/jdbc/README.md index 0f1d6f41498..88db5291b9e 100644 --- a/jdbc/README.md +++ b/jdbc/README.md @@ -20,7 +20,7 @@ In root directory: ``` - cn.edu.tsinghua + org.apache.iotdb iotdb-jdbc 0.8.0-SNAPSHOT @@ -28,7 +28,7 @@ In root directory: ``` ## Example -(for more detailes, please see example/src/main/java/cn/edu/tsinghua/jdbcDemo/SendDataToIotdb.java) +(for more detailes, please see example/src/main/java/org/apache/iotdb/jdbc/jdbcDemo/SendDataToIotdb.java) ```Java import java.sql.Connection; import java.sql.DriverManager; @@ -38,7 +38,7 @@ import java.sql.Statement; public class Example { public static void main(String[] args) throws ClassNotFoundException, SQLException { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); Connection connection = null; Statement statement = null; try { diff --git a/jdbc/example/readme.md b/jdbc/example/readme.md index 085b89c5f74..5e8dc2be997 100644 --- a/jdbc/example/readme.md +++ b/jdbc/example/readme.md @@ -13,7 +13,7 @@ The example is to show how to send data from localhost to IoTDB through Kafka. 0.8.2.0 - cn.edu.tsinghua + org.apache.iotdb iotdb-jdbc 0.7.0 diff --git a/jdbc/example/src/main/java/cn/edu/tsinghua/jdbcDemo/SendDataToIotdb.java b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/jdbcDemo/SendDataToIotdb.java similarity index 96% rename from jdbc/example/src/main/java/cn/edu/tsinghua/jdbcDemo/SendDataToIotdb.java rename to jdbc/example/src/main/java/org/apache/iotdb/jdbc/jdbcDemo/SendDataToIotdb.java index 7937ccae345..59b9794dcdd 100644 --- a/jdbc/example/src/main/java/cn/edu/tsinghua/jdbcDemo/SendDataToIotdb.java +++ b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/jdbcDemo/SendDataToIotdb.java @@ -1,7 +1,7 @@ /** * The class is to show how to write and read date from IoTDB through JDBC */ -package cn.edu.tsinghua.jdbcDemo; +package org.apache.iotdb.jdbc.jdbcDemo; import java.sql.Connection; import java.sql.DriverManager; @@ -18,7 +18,7 @@ public class SendDataToIotdb { public void connectToIotdb() throws Exception { // 1. load JDBC driver of IoTDB - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); // 2. DriverManager connect to IoTDB connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX+"127.0.0.1:6667/", "root", "root"); diff --git a/jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaConsumer.java b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaConsumer.java similarity index 97% rename from jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaConsumer.java rename to jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaConsumer.java index 76a0e0c9727..d4f09e40f74 100644 --- a/jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaConsumer.java +++ b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaConsumer.java @@ -2,7 +2,7 @@ * The class is to show how to get data from kafka through multi-threads. * The data is sent by class KafkaProducer. */ -package cn.edu.tsinghua.kafka_iotdbDemo; +package org.apache.iotdb.jdbc.kafka_iotdbDemo; import java.util.HashMap; import java.util.List; @@ -18,7 +18,7 @@ import kafka.javaapi.consumer.ConsumerConnector; import kafka.message.MessageAndMetadata; import kafka.serializer.StringDecoder; import kafka.utils.VerifiableProperties; -import cn.edu.tsinghua.jdbcDemo.*; +import org.apache.iotdb.jdbc.jdbcDemo.*; public class KafkaConsumer { diff --git a/jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaProducer.java b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaProducer.java similarity index 96% rename from jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaProducer.java rename to jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaProducer.java index 19a609f060e..c17baeebb52 100644 --- a/jdbc/example/src/main/java/cn/edu/tsinghua/kafka_iotdbDemo/KafkaProducer.java +++ b/jdbc/example/src/main/java/org/apache/iotdb/jdbc/kafka_iotdbDemo/KafkaProducer.java @@ -1,7 +1,7 @@ /** * The class is to show how to send data to kafka */ -package cn.edu.tsinghua.kafka_iotdbDemo; +package org.apache.iotdb.jdbc.kafka_iotdbDemo; import java.util.Properties; diff --git a/jdbc/pom.xml b/jdbc/pom.xml index 4717d249ad6..01242e0143e 100644 --- a/jdbc/pom.xml +++ b/jdbc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml @@ -20,12 +20,12 @@ - cn.edu.tsinghua + org.apache.iotdb tsfile 0.8.0-SNAPSHOT - cn.edu.tsinghua + org.apache.iotdb service-rpc 0.8.0-SNAPSHOT diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Config.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java similarity index 87% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Config.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java index f218994d585..421aec793bf 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Config.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/Config.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; public class Config { /** @@ -29,6 +29,6 @@ public class Config { public static int fetchSize = 10000; public static int connectionTimeoutInMs = 0; - public static String JDBC_DRIVER_NAME = "cn.edu.tsinghua.iotdb.jdbc.IoTDBDriver"; + public static String JDBC_DRIVER_NAME = "org.apache.iotdb.jdbc.IoTDBDriver"; } diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Constant.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java similarity index 95% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Constant.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java index 6b68bf9fe3e..f68f3ee3852 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Constant.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/Constant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; public class Constant { diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnection.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java similarity index 92% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnection.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java index 9f41162554d..9a6deaa3af5 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnection.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java @@ -1,43 +1,18 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; +import org.apache.iotdb.service.rpc.thrift.*; import org.apache.thrift.TException; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.transport.TSocket; import org.apache.thrift.transport.TTransportException; -import cn.edu.tsinghua.service.rpc.thrift.ServerProperties; -import cn.edu.tsinghua.service.rpc.thrift.TSCloseSessionReq; -import cn.edu.tsinghua.service.rpc.thrift.TSGetTimeZoneResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TSOpenSessionReq; -import cn.edu.tsinghua.service.rpc.thrift.TSOpenSessionResp; -import cn.edu.tsinghua.service.rpc.thrift.TSProtocolVersion; -import cn.edu.tsinghua.service.rpc.thrift.TSSetTimeZoneReq; -import cn.edu.tsinghua.service.rpc.thrift.TSSetTimeZoneResp; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; - import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.net.SocketException; -import java.sql.Blob; -import java.sql.CallableStatement; -import java.sql.Clob; -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.NClob; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLClientInfoException; -import java.sql.SQLException; -import java.sql.SQLWarning; -import java.sql.SQLXML; -import java.sql.Savepoint; -import java.sql.Statement; -import java.sql.Struct; +import java.sql.*; import java.time.ZoneId; -import java.sql.Array; import java.util.LinkedList; import java.util.List; import java.util.Map; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionParams.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnectionParams.java similarity index 97% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionParams.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnectionParams.java index cbfaa088fdb..e444764ea47 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionParams.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnectionParams.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; public class IoTDBConnectionParams { private String host = Config.IOTDB_URL_PREFIX; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadata.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java similarity index 98% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadata.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java index 9514f11d2af..b8142d4e494 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadata.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadata.java @@ -1,17 +1,13 @@ -package cn.edu.tsinghua.iotdb.jdbc; - -import java.sql.Connection; -import java.sql.DatabaseMetaData; -import java.sql.ResultSet; -import java.sql.RowIdLifetime; -import java.sql.SQLException; -import java.util.*; +package org.apache.iotdb.jdbc; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataReq; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp; +import org.apache.iotdb.service.rpc.thrift.TSIService; import org.apache.thrift.TException; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataReq; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; +import java.sql.*; +import java.util.List; +import java.util.Set; public class IoTDBDatabaseMetadata implements DatabaseMetaData { private IoTDBConnection connection; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDriver.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java similarity index 98% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDriver.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java index e46591e8489..c7af2cabcb9 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDriver.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBDriver.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import org.apache.thrift.transport.TTransportException; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadata.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadata.java similarity index 99% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadata.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadata.java index 449fa8f9a0e..d7a4ca15986 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadata.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadata.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import java.sql.ResultSetMetaData; import java.sql.SQLException; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultSet.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultSet.java similarity index 99% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultSet.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultSet.java index 620e1eb2708..7d713b2b0a0 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultSet.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBMetadataResultSet.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import java.math.BigDecimal; import java.sql.Date; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatement.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPrepareStatement.java similarity index 94% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatement.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPrepareStatement.java index 5db2e6cfaee..a7c2f315445 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatement.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBPrepareStatement.java @@ -1,36 +1,19 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; + +import org.apache.iotdb.service.rpc.thrift.TSIService.Iface; +import org.apache.iotdb.service.rpc.thrift.TS_SessionHandle; import java.io.InputStream; import java.io.Reader; import java.math.BigDecimal; import java.net.URL; -import java.sql.Array; -import java.sql.Blob; -import java.sql.Clob; +import java.sql.*; import java.sql.Date; -import java.sql.NClob; -import java.sql.ParameterMetaData; -import java.sql.PreparedStatement; -import java.sql.Ref; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.RowId; -import java.sql.SQLException; -import java.sql.SQLXML; -import java.sql.Time; -import java.sql.Timestamp; import java.time.Instant; import java.time.ZoneId; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; -import java.util.Calendar; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.service.rpc.thrift.TSIService.Iface; +import java.util.*; public class IoTDBPrepareStatement extends IoTDBStatement implements PreparedStatement { private final String sql; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSet.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBQueryResultSet.java similarity index 96% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSet.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBQueryResultSet.java index 67373489258..4bfd229cbca 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSet.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBQueryResultSet.java @@ -1,17 +1,8 @@ -package cn.edu.tsinghua.iotdb.jdbc; - -import cn.edu.tsinghua.service.rpc.thrift.TSCloseOperationReq; -import cn.edu.tsinghua.service.rpc.thrift.TSCloseOperationResp; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchResultsReq; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchResultsResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TSOperationHandle; -import cn.edu.tsinghua.service.rpc.thrift.TSQueryDataSet; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; +package org.apache.iotdb.jdbc; +import org.apache.iotdb.service.rpc.thrift.*; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.RowRecord; import org.apache.thrift.TException; import java.io.InputStream; @@ -19,23 +10,9 @@ import java.io.Reader; import java.math.BigDecimal; import java.math.MathContext; import java.net.URL; -import java.sql.Array; -import java.sql.Blob; -import java.sql.Clob; +import java.sql.*; import java.sql.Date; -import java.sql.NClob; -import java.sql.Ref; -import java.sql.ResultSet; -import java.sql.ResultSetMetaData; -import java.sql.RowId; -import java.sql.SQLException; -import java.sql.SQLWarning; -import java.sql.SQLXML; -import java.sql.Statement; -import java.sql.Time; -import java.sql.Timestamp; import java.util.*; -import java.util.Map.Entry; public class IoTDBQueryResultSet implements ResultSet { diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadata.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.java similarity index 99% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadata.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.java index e7f7d1c9e4c..068c710c852 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadata.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBResultMetadata.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import java.sql.ResultSetMetaData; import java.sql.SQLException; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBSQLException.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBSQLException.java similarity index 91% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBSQLException.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBSQLException.java index 598a546e4ad..0f2a2cfb07a 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBSQLException.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBSQLException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import java.sql.SQLException; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatement.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java similarity index 94% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatement.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java index 7896f994a11..12dace6b98e 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatement.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java @@ -1,21 +1,21 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import org.apache.thrift.TException; -import cn.edu.tsinghua.service.rpc.thrift.TSCancelOperationReq; -import cn.edu.tsinghua.service.rpc.thrift.TSCancelOperationResp; -import cn.edu.tsinghua.service.rpc.thrift.TSCloseOperationReq; -import cn.edu.tsinghua.service.rpc.thrift.TSCloseOperationResp; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteBatchStatementReq; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteBatchStatementResp; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteStatementReq; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteStatementResp; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataReq; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TSOperationHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.service.rpc.thrift.TSCancelOperationReq; +import org.apache.iotdb.service.rpc.thrift.TSCancelOperationResp; +import org.apache.iotdb.service.rpc.thrift.TSCloseOperationReq; +import org.apache.iotdb.service.rpc.thrift.TSCloseOperationResp; +import org.apache.iotdb.service.rpc.thrift.TSExecuteBatchStatementReq; +import org.apache.iotdb.service.rpc.thrift.TSExecuteBatchStatementResp; +import org.apache.iotdb.service.rpc.thrift.TSExecuteStatementReq; +import org.apache.iotdb.service.rpc.thrift.TSExecuteStatementResp; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataReq; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp; +import org.apache.iotdb.service.rpc.thrift.TSIService; +import org.apache.iotdb.service.rpc.thrift.TSOperationHandle; +import org.apache.iotdb.service.rpc.thrift.TS_SessionHandle; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; import java.sql.*; import java.time.ZoneId; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBURLException.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBURLException.java similarity index 85% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBURLException.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBURLException.java index 2660bdc1bdf..489e02c8716 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBURLException.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBURLException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import java.sql.SQLException; diff --git a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Utils.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java similarity index 81% rename from jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Utils.java rename to jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java index 28d0e2a0d59..09419a179c4 100644 --- a/jdbc/src/main/java/cn/edu/tsinghua/iotdb/jdbc/Utils.java +++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/Utils.java @@ -1,19 +1,18 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; -import cn.edu.tsinghua.service.rpc.thrift.TSDataValue; -import cn.edu.tsinghua.service.rpc.thrift.TSQueryDataSet; -import cn.edu.tsinghua.service.rpc.thrift.TSRowRecord; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.service.rpc.thrift.TSDataValue; +import org.apache.iotdb.service.rpc.thrift.TSQueryDataSet; +import org.apache.iotdb.service.rpc.thrift.TSRowRecord; +import org.apache.iotdb.service.rpc.thrift.TS_Status; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.utils.Binary; import java.util.ArrayList; -import java.util.LinkedHashMap; import java.util.List; import java.util.Properties; import java.util.regex.Matcher; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/BatchTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/BatchTest.java similarity index 91% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/BatchTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/BatchTest.java index 46348111fdc..d4b4c4f5c61 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/BatchTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/BatchTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.assertEquals; import static org.junit.Assert.fail; @@ -19,12 +19,12 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteBatchStatementReq; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteBatchStatementResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.service.rpc.thrift.TSExecuteBatchStatementReq; +import org.apache.iotdb.service.rpc.thrift.TSExecuteBatchStatementResp; +import org.apache.iotdb.service.rpc.thrift.TSIService; +import org.apache.iotdb.service.rpc.thrift.TS_SessionHandle; +import org.apache.iotdb.service.rpc.thrift.TS_Status; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; public class BatchTest { diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBConnectionTest.java similarity index 82% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBConnectionTest.java index d41e0f2d7d0..e43b653d9ab 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBConnectionTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBConnectionTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.*; @@ -8,13 +8,13 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.service.rpc.thrift.ServerProperties; -import cn.edu.tsinghua.service.rpc.thrift.TSGetTimeZoneResp; -import cn.edu.tsinghua.service.rpc.thrift.TSIService; -import cn.edu.tsinghua.service.rpc.thrift.TSSetTimeZoneReq; -import cn.edu.tsinghua.service.rpc.thrift.TSSetTimeZoneResp; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.service.rpc.thrift.ServerProperties; +import org.apache.iotdb.service.rpc.thrift.TSGetTimeZoneResp; +import org.apache.iotdb.service.rpc.thrift.TSIService; +import org.apache.iotdb.service.rpc.thrift.TSSetTimeZoneReq; +import org.apache.iotdb.service.rpc.thrift.TSSetTimeZoneResp; +import org.apache.iotdb.service.rpc.thrift.TS_Status; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; import static org.mockito.Matchers.any; import static org.mockito.Mockito.when; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadataTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadataTest.java similarity index 99% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadataTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadataTest.java index d0c21c034ab..1216253b243 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBDatabaseMetadataTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBDatabaseMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.*; @@ -8,7 +8,7 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.service.rpc.thrift.*; +import org.apache.iotdb.service.rpc.thrift.*; import java.sql.*; import java.util.ArrayList; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java similarity index 98% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java index 46b394691fd..2d73248a14f 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBMetadataResultMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.assertEquals; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatementTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBPrepareStatementTest.java similarity index 95% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatementTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBPrepareStatementTest.java index 9d61a23bcf4..7654159ba69 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBPrepareStatementTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBPrepareStatementTest.java @@ -1,30 +1,22 @@ -package cn.edu.tsinghua.iotdb.jdbc; - -import static org.junit.Assert.*; +package org.apache.iotdb.jdbc; +import org.apache.iotdb.service.rpc.thrift.*; +import org.apache.iotdb.service.rpc.thrift.TSIService.Iface; import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteStatementReq; -import cn.edu.tsinghua.service.rpc.thrift.TSExecuteStatementResp; -import cn.edu.tsinghua.service.rpc.thrift.TSGetOperationStatusResp; -import cn.edu.tsinghua.service.rpc.thrift.TSOperationHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; -import cn.edu.tsinghua.service.rpc.thrift.TSIService.Iface; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - import java.sql.SQLException; import java.sql.Timestamp; import java.time.ZoneId; +import static org.junit.Assert.assertEquals; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + public class IoTDBPrepareStatementTest { private ZoneId zoneId = ZoneId.systemDefault(); @Mock diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSetTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBQueryResultSetTest.java similarity index 98% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSetTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBQueryResultSetTest.java index b1b50d2a2a1..1b243a44273 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBQueryResultSetTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBQueryResultSetTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; -import cn.edu.tsinghua.service.rpc.thrift.*; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.service.rpc.thrift.*; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadataTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBResultMetadataTest.java similarity index 99% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadataTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBResultMetadataTest.java index b0d13a42d32..24ce2254c9c 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBResultMetadataTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBResultMetadataTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.*; diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatementTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBStatementTest.java similarity index 94% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatementTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBStatementTest.java index e2cb9572c32..69e29955d29 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/IoTDBStatementTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/IoTDBStatementTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.*; import static org.mockito.Mockito.when; @@ -21,12 +21,12 @@ import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataReq; -import cn.edu.tsinghua.service.rpc.thrift.TSFetchMetadataResp; -import cn.edu.tsinghua.service.rpc.thrift.TS_SessionHandle; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; -import cn.edu.tsinghua.service.rpc.thrift.TSIService.Iface; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataReq; +import org.apache.iotdb.service.rpc.thrift.TSFetchMetadataResp; +import org.apache.iotdb.service.rpc.thrift.TS_SessionHandle; +import org.apache.iotdb.service.rpc.thrift.TS_Status; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.service.rpc.thrift.TSIService.Iface; public class IoTDBStatementTest { @Mock diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/UtilsTest.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/UtilsTest.java similarity index 90% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/UtilsTest.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/UtilsTest.java index 723fe8d9c91..2229135d5a8 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/UtilsTest.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/UtilsTest.java @@ -1,10 +1,9 @@ -package cn.edu.tsinghua.iotdb.jdbc; +package org.apache.iotdb.jdbc; import static org.junit.Assert.*; import java.nio.ByteBuffer; import java.util.ArrayList; -import java.util.LinkedHashMap; import java.util.List; import java.util.Properties; @@ -12,15 +11,15 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.service.rpc.thrift.TSDataValue; -import cn.edu.tsinghua.service.rpc.thrift.TSQueryDataSet; -import cn.edu.tsinghua.service.rpc.thrift.TSRowRecord; -import cn.edu.tsinghua.service.rpc.thrift.TS_Status; -import cn.edu.tsinghua.service.rpc.thrift.TS_StatusCode; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; +import org.apache.iotdb.service.rpc.thrift.TSDataValue; +import org.apache.iotdb.service.rpc.thrift.TSQueryDataSet; +import org.apache.iotdb.service.rpc.thrift.TSRowRecord; +import org.apache.iotdb.service.rpc.thrift.TS_Status; +import org.apache.iotdb.service.rpc.thrift.TS_StatusCode; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; public class UtilsTest { diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/MetadataDemo.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/MetadataDemo.java similarity index 89% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/MetadataDemo.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/demo/MetadataDemo.java index f3f954e163c..4e23139d815 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/MetadataDemo.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/MetadataDemo.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc.demo; +package org.apache.iotdb.jdbc.demo; import java.sql.Connection; import java.sql.DatabaseMetaData; @@ -10,7 +10,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.sql.Timestamp; -import cn.edu.tsinghua.iotdb.jdbc.Config; +import org.apache.iotdb.jdbc.Config; public class MetadataDemo { diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/PrepareStatementDemo.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/PrepareStatementDemo.java similarity index 95% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/PrepareStatementDemo.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/demo/PrepareStatementDemo.java index cb656abe98e..21eeacf5b3c 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/PrepareStatementDemo.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/PrepareStatementDemo.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc.demo; +package org.apache.iotdb.jdbc.demo; import java.sql.Connection; import java.sql.DriverManager; @@ -11,7 +11,7 @@ import java.sql.Timestamp; public class PrepareStatementDemo { public static void main(String[] args) throws ClassNotFoundException, SQLException { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); Connection connection = null; try { connection = DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root"); diff --git a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/StatementDemo.java b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/StatementDemo.java similarity index 94% rename from jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/StatementDemo.java rename to jdbc/src/test/java/org/apache/iotdb/jdbc/demo/StatementDemo.java index 6dfa648a40b..0c4c8fb2b9d 100644 --- a/jdbc/src/test/java/cn/edu/tsinghua/iotdb/jdbc/demo/StatementDemo.java +++ b/jdbc/src/test/java/org/apache/iotdb/jdbc/demo/StatementDemo.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.iotdb.jdbc.demo; +package org.apache.iotdb.jdbc.demo; import java.sql.Connection; import java.sql.DriverManager; @@ -10,7 +10,7 @@ import java.sql.Statement; public class StatementDemo { public static void main(String[] args) throws ClassNotFoundException, SQLException { - Class.forName("cn.edu.tsinghua.iotdb.jdbc.TsfileDriver"); + Class.forName("org.apache.iotdb.jdbc.TsfileDriver"); Connection connection = null; try { connection = DriverManager.getConnection("jdbc:iotdb://127.0.0.1:6667/", "root", "root"); diff --git a/pom.xml b/pom.xml index 5ad1661d5a8..2d8a3e1842f 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 21 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT pom diff --git a/service-rpc/pom.xml b/service-rpc/pom.xml index 666c03df94d..57c55ffd57c 100644 --- a/service-rpc/pom.xml +++ b/service-rpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml diff --git a/service-rpc/src/main/thrift/rpc.thrift b/service-rpc/src/main/thrift/rpc.thrift index 553120e0dca..2d3e73caba7 100644 --- a/service-rpc/src/main/thrift/rpc.thrift +++ b/service-rpc/src/main/thrift/rpc.thrift @@ -1,4 +1,4 @@ -namespace java cn.edu.tsinghua.service.rpc.thrift +namespace java org.apache.iotdb.service.rpc.thrift // The return status code contained in each response. diff --git a/spark/README.md b/spark/README.md index 73cedab90ce..8ed84603f0b 100644 --- a/spark/README.md +++ b/spark/README.md @@ -123,7 +123,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". * **Example 1** ```scala - import cn.edu.tsinghua.tsfile._ + import org.apache.iotdb.tsfile._ //read data in TsFile and create a table val df = spark.read.tsfile("/test.tsfile") @@ -139,7 +139,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". ```scala val df = spark.read - .format("cn.edu.tsinghua.tsfile") + .format("org.apache.iotdb.tsfile") .load("/test.tsfile ") df.filter("time < 10").show() ``` @@ -148,7 +148,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". ```scala //create a table in SparkSQL and build relation with a TsFile - spark.sql("create temporary view tsfile_table using cn.edu.tsinghua.tsfile options(path = \"test.ts\")") + spark.sql("create temporary view tsfile_table using org.apache.iotdb.tsfile options(path = \"test.ts\")") spark.sql("select * from tsfile_table where s1 > 1.2").show() ``` @@ -156,7 +156,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". * **Example 4(using options to read)** ```scala - import cn.edu.tsinghua.tsfile._ + import org.apache.iotdb.tsfile._ val df = spark.read.option("delta_object_name", "root.device.turbine").tsfile("/test.tsfile") @@ -169,7 +169,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". * **Example 5(write)** ```scala - import cn.edu.tsinghua.tsfile._ + import org.apache.iotdb.tsfile._ val df = spark.read.tsfile("/test.tsfile").write.tsfile("/out") ``` @@ -177,7 +177,7 @@ The path of 'test.tsfile' used in the following examples is "data/test.tsfile". * **Example 6(using options to write)** ```scala - import cn.edu.tsinghua.tsfile._ + import org.apache.iotdb.tsfile._ val df = spark.read.option("delta_object_name", "root.device.turbine").tsfile("/test.tsfile") diff --git a/spark/pom.xml b/spark/pom.xml index f8b2ba86aa1..13c0a9ccade 100644 --- a/spark/pom.xml +++ b/spark/pom.xml @@ -3,13 +3,13 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml - cn.edu.tsinghua + org.apache.iotdb tsfile-spark-connector jar @@ -21,7 +21,7 @@ 20170516 - cn.edu.tsinghua + org.apache.iotdb tsfile ${project.version} diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/IFilterOptimizer.java b/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/IFilterOptimizer.java deleted file mode 100755 index 342b2521cf6..00000000000 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/IFilterOptimizer.java +++ /dev/null @@ -1,14 +0,0 @@ -package cn.edu.tsinghua.tsfile.qp.optimizer; - -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.exception.DNFOptimizeException; -import cn.edu.tsinghua.tsfile.qp.exception.MergeFilterException; -import cn.edu.tsinghua.tsfile.qp.exception.RemoveNotException; - -/** - * provide a filter operator, optimize it. - * - */ -public interface IFilterOptimizer { - FilterOperator optimize(FilterOperator filter) throws RemoveNotException, DNFOptimizeException, MergeFilterException; -} diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/CreateTSFile.java b/spark/src/main/java/org/apache/iotdb/tsfile/io/CreateTSFile.java similarity index 91% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/io/CreateTSFile.java rename to spark/src/main/java/org/apache/iotdb/tsfile/io/CreateTSFile.java index 4d251e381d9..f308128cff7 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/CreateTSFile.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/io/CreateTSFile.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.tsfile.io; +package org.apache.iotdb.tsfile.io; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.common.utils.TsRandomAccessFileWriter; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.common.utils.TsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; import org.json.JSONArray; import org.json.JSONObject; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSInputStream.java b/spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSInputStream.java similarity index 95% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSInputStream.java rename to spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSInputStream.java index 91e1ad1d6b9..63779bf54ec 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSInputStream.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSInputStream.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.io; +package org.apache.iotdb.tsfile.io; import java.io.IOException; import java.util.Arrays; @@ -9,7 +9,7 @@ import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; /** * This class is used to wrap the {@link}FSDataInputStream and implement the diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSOutputStream.java b/spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSOutputStream.java similarity index 93% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSOutputStream.java rename to spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSOutputStream.java index 47f6423058b..8e4a82fb5c5 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/HDFSOutputStream.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/io/HDFSOutputStream.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.io; +package org.apache.iotdb.tsfile.io; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileWriter; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileWriter; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileOutputFormat.java b/spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileOutputFormat.java similarity index 81% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileOutputFormat.java rename to spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileOutputFormat.java index 28dbbe67a9c..98d47df15a2 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileOutputFormat.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileOutputFormat.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.io; +package org.apache.iotdb.tsfile.io; -import cn.edu.tsinghua.tsfile.write.exception.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.exception.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.mapreduce.RecordWriter; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileRecordWriter.java b/spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileRecordWriter.java similarity index 77% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileRecordWriter.java rename to spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileRecordWriter.java index e50d484e1d5..e577b1dc88a 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/io/TsFileRecordWriter.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/io/TsFileRecordWriter.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.io; +package org.apache.iotdb.tsfile.io; -import cn.edu.tsinghua.tsfile.timeseries.basis.TsFile; -import cn.edu.tsinghua.tsfile.write.exception.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.timeseries.basis.TsFile; +import org.apache.iotdb.tsfile.write.exception.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.NullWritable; import org.apache.hadoop.mapreduce.RecordWriter; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/Executor.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/Executor.java similarity index 74% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/Executor.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/Executor.java index 750368cb83a..d93f4860973 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/Executor.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/Executor.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.qp; +package org.apache.iotdb.tsfile.qp; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; -import cn.edu.tsinghua.tsfile.read.query.QueryConfig; -import cn.edu.tsinghua.tsfile.read.query.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.query.QueryEngine; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.read.query.QueryConfig; +import org.apache.iotdb.tsfile.read.query.QueryDataSet; +import org.apache.iotdb.tsfile.read.query.QueryEngine; import java.io.IOException; import java.util.ArrayList; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/QueryProcessor.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/QueryProcessor.java similarity index 85% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/QueryProcessor.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/QueryProcessor.java index 687ec00a89f..6d217abe44e 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/QueryProcessor.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/QueryProcessor.java @@ -1,16 +1,16 @@ -package cn.edu.tsinghua.tsfile.qp; +package org.apache.iotdb.tsfile.qp; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant; -import cn.edu.tsinghua.tsfile.qp.common.SingleQuery; -import cn.edu.tsinghua.tsfile.qp.common.TSQueryPlan; -import cn.edu.tsinghua.tsfile.qp.exception.QueryOperatorException; -import cn.edu.tsinghua.tsfile.qp.exception.QueryProcessorException; -import cn.edu.tsinghua.tsfile.qp.optimizer.DNFFilterOptimizer; -import cn.edu.tsinghua.tsfile.qp.optimizer.MergeSingleFilterOptimizer; -import cn.edu.tsinghua.tsfile.qp.optimizer.PhysicalOptimizer; -import cn.edu.tsinghua.tsfile.qp.optimizer.RemoveNotOptimizer; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.common.SQLConstant; +import org.apache.iotdb.tsfile.qp.common.SingleQuery; +import org.apache.iotdb.tsfile.qp.common.TSQueryPlan; +import org.apache.iotdb.tsfile.qp.exception.QueryOperatorException; +import org.apache.iotdb.tsfile.qp.exception.QueryProcessorException; +import org.apache.iotdb.tsfile.qp.optimizer.DNFFilterOptimizer; +import org.apache.iotdb.tsfile.qp.optimizer.MergeSingleFilterOptimizer; +import org.apache.iotdb.tsfile.qp.optimizer.PhysicalOptimizer; +import org.apache.iotdb.tsfile.qp.optimizer.RemoveNotOptimizer; import java.io.IOException; import java.util.ArrayList; import java.util.List; @@ -101,7 +101,7 @@ public class QueryProcessor { "The same key filter has been specified more than once: " + singlePath); } else { switch (child.getSinglePath()) { - case SQLConstant.RESERVED_TIME: + case RESERVED_TIME: if (timeFilter != null) { throw new QueryOperatorException( "time filter has been specified more than once"); diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/BasicOperator.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/BasicOperator.java similarity index 91% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/BasicOperator.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/BasicOperator.java index ff57e506e65..d728f9e42ed 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/BasicOperator.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/BasicOperator.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; -import cn.edu.tsinghua.tsfile.qp.exception.BasicOperatorException; +import org.apache.iotdb.tsfile.qp.exception.BasicOperatorException; /** * basic operators include < > >= <= !=. diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/FilterOperator.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/FilterOperator.java similarity index 97% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/FilterOperator.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/FilterOperator.java index 7f4d345f72b..5f52e579859 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/FilterOperator.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/FilterOperator.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.utils.StringContainer; import java.util.ArrayList; import java.util.List; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/Operator.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/Operator.java similarity index 92% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/Operator.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/Operator.java index 3715a75cca1..4775d55dc68 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/Operator.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/Operator.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; /** * This class is a superclass of all operator. diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SQLConstant.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SQLConstant.java similarity index 99% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SQLConstant.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SQLConstant.java index f643684b2db..08ff2de3bba 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SQLConstant.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SQLConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; import java.util.HashMap; import java.util.Map; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SingleQuery.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SingleQuery.java similarity index 96% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SingleQuery.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SingleQuery.java index 9c48e6d6a1a..8aaba1d4a98 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/SingleQuery.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/SingleQuery.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; import java.util.List; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/TSQueryPlan.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/TSQueryPlan.java similarity index 96% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/TSQueryPlan.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/common/TSQueryPlan.java index 156aa73ec7d..36cd2a89019 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/common/TSQueryPlan.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/common/TSQueryPlan.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.common; +package org.apache.iotdb.tsfile.qp.common; import java.util.ArrayList; import java.util.List; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/BasicOperatorException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/BasicOperatorException.java similarity index 86% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/BasicOperatorException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/BasicOperatorException.java index be0a075c67d..7e54f5d984c 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/BasicOperatorException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/BasicOperatorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; /** diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/DNFOptimizeException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/DNFOptimizeException.java similarity index 85% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/DNFOptimizeException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/DNFOptimizeException.java index ce983fd0aa0..b3e252cd2da 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/DNFOptimizeException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/DNFOptimizeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; /** diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/LogicalOptimizeException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/LogicalOptimizeException.java similarity index 87% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/LogicalOptimizeException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/LogicalOptimizeException.java index 95fa1f83199..4e1faa99cc0 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/LogicalOptimizeException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/LogicalOptimizeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; /** * This exception is threw whiling meeting error in logical optimizer process diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/MergeFilterException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/MergeFilterException.java similarity index 82% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/MergeFilterException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/MergeFilterException.java index 369dd945465..d0b4627b851 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/MergeFilterException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/MergeFilterException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; public class MergeFilterException extends LogicalOptimizeException { diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryOperatorException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryOperatorException.java similarity index 82% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryOperatorException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryOperatorException.java index 5d37de220e4..707d64adc8d 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryOperatorException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryOperatorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; public class QueryOperatorException extends LogicalOptimizeException { diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryProcessorException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryProcessorException.java similarity index 90% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryProcessorException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryProcessorException.java index 3952e1dacc4..0490b720be4 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/QueryProcessorException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/QueryProcessorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; /** * This exception is threw whiling meeting error in query processor diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/RemoveNotException.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/RemoveNotException.java similarity index 85% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/RemoveNotException.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/RemoveNotException.java index 1390f2d2df4..0b13ce1b760 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/exception/RemoveNotException.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/exception/RemoveNotException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.qp.exception; +package org.apache.iotdb.tsfile.qp.exception; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/DNFFilterOptimizer.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/DNFFilterOptimizer.java similarity index 94% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/DNFFilterOptimizer.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/DNFFilterOptimizer.java index d8b5febc300..1e101f8ede2 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/DNFFilterOptimizer.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/DNFFilterOptimizer.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.tsfile.qp.optimizer; +package org.apache.iotdb.tsfile.qp.optimizer; -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.exception.DNFOptimizeException; +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.exception.DNFOptimizeException; import java.util.ArrayList; import java.util.List; -import static cn.edu.tsinghua.tsfile.qp.common.SQLConstant.KW_AND; -import static cn.edu.tsinghua.tsfile.qp.common.SQLConstant.KW_OR; +import static org.apache.iotdb.tsfile.qp.common.SQLConstant.KW_AND; +import static org.apache.iotdb.tsfile.qp.common.SQLConstant.KW_OR; public class DNFFilterOptimizer implements IFilterOptimizer { diff --git a/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/IFilterOptimizer.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/IFilterOptimizer.java new file mode 100755 index 00000000000..72598d26c79 --- /dev/null +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/IFilterOptimizer.java @@ -0,0 +1,14 @@ +package org.apache.iotdb.tsfile.qp.optimizer; + +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.exception.DNFOptimizeException; +import org.apache.iotdb.tsfile.qp.exception.MergeFilterException; +import org.apache.iotdb.tsfile.qp.exception.RemoveNotException; + +/** + * provide a filter operator, optimize it. + * + */ +public interface IFilterOptimizer { + FilterOperator optimize(FilterOperator filter) throws RemoveNotException, DNFOptimizeException, MergeFilterException; +} diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java similarity index 95% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java index f9a4769cb0a..1a677690634 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/MergeSingleFilterOptimizer.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.qp.optimizer; +package org.apache.iotdb.tsfile.qp.optimizer; -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.exception.MergeFilterException; -import cn.edu.tsinghua.tsfile.qp.common.BasicOperator; +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.exception.MergeFilterException; +import org.apache.iotdb.tsfile.qp.common.BasicOperator; import java.util.ArrayList; import java.util.Collections; import java.util.List; diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/PhysicalOptimizer.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/PhysicalOptimizer.java similarity index 92% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/PhysicalOptimizer.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/PhysicalOptimizer.java index 1739238a8fc..4d2613f3ddd 100644 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/PhysicalOptimizer.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/PhysicalOptimizer.java @@ -1,14 +1,14 @@ -package cn.edu.tsinghua.tsfile.qp.optimizer; +package org.apache.iotdb.tsfile.qp.optimizer; -import cn.edu.tsinghua.tsfile.common.utils.Pair; -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader; -import cn.edu.tsinghua.tsfile.read.management.SeriesSchema; -import cn.edu.tsinghua.tsfile.read.query.QueryEngine; -import cn.edu.tsinghua.tsfile.qp.common.BasicOperator; -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant; -import cn.edu.tsinghua.tsfile.qp.common.SingleQuery; -import cn.edu.tsinghua.tsfile.qp.common.TSQueryPlan; +import org.apache.iotdb.tsfile.common.utils.Pair; +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader; +import org.apache.iotdb.tsfile.read.management.SeriesSchema; +import org.apache.iotdb.tsfile.read.query.QueryEngine; +import org.apache.iotdb.tsfile.qp.common.BasicOperator; +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.common.SQLConstant; +import org.apache.iotdb.tsfile.qp.common.SingleQuery; +import org.apache.iotdb.tsfile.qp.common.TSQueryPlan; import java.io.IOException; import java.util.*; @@ -186,14 +186,14 @@ public class PhysicalOptimizer { return null; } switch (columnFilterOperator.getTokenIntType()) { - case SQLConstant.KW_AND: + case KW_AND: ret.right.retainAll(temp.right); //example: "where device = d1 and device = d2" should not query data if(ret.right.isEmpty()) { flag = false; } break; - case SQLConstant.KW_OR: + case KW_OR: ret.right.addAll(temp.right); break; default: diff --git a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/RemoveNotOptimizer.java b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/RemoveNotOptimizer.java similarity index 84% rename from spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/RemoveNotOptimizer.java rename to spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/RemoveNotOptimizer.java index 190fc13a32c..51b19ee2474 100755 --- a/spark/src/main/java/cn/edu/tsinghua/tsfile/qp/optimizer/RemoveNotOptimizer.java +++ b/spark/src/main/java/org/apache/iotdb/tsfile/qp/optimizer/RemoveNotOptimizer.java @@ -1,17 +1,17 @@ -package cn.edu.tsinghua.tsfile.qp.optimizer; +package org.apache.iotdb.tsfile.qp.optimizer; -import cn.edu.tsinghua.tsfile.qp.common.FilterOperator; -import cn.edu.tsinghua.tsfile.qp.exception.RemoveNotException; +import org.apache.iotdb.tsfile.qp.common.FilterOperator; +import org.apache.iotdb.tsfile.qp.exception.RemoveNotException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.qp.common.BasicOperator; -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant; -import cn.edu.tsinghua.tsfile.qp.exception.BasicOperatorException; +import org.apache.iotdb.tsfile.qp.common.BasicOperator; +import org.apache.iotdb.tsfile.qp.common.SQLConstant; +import org.apache.iotdb.tsfile.qp.exception.BasicOperatorException; import java.util.List; -import static cn.edu.tsinghua.tsfile.qp.common.SQLConstant.KW_AND; -import static cn.edu.tsinghua.tsfile.qp.common.SQLConstant.KW_NOT; -import static cn.edu.tsinghua.tsfile.qp.common.SQLConstant.KW_OR; +import static org.apache.iotdb.tsfile.qp.common.SQLConstant.KW_AND; +import static org.apache.iotdb.tsfile.qp.common.SQLConstant.KW_NOT; +import static org.apache.iotdb.tsfile.qp.common.SQLConstant.KW_OR; public class RemoveNotOptimizer implements IFilterOptimizer { diff --git a/spark/src/main/scala/cn/edu/tsinghua/tsfile/Converter.scala b/spark/src/main/scala/org/apache/iotdb/tsfile/Converter.scala similarity index 94% rename from spark/src/main/scala/cn/edu/tsinghua/tsfile/Converter.scala rename to spark/src/main/scala/org/apache/iotdb/tsfile/Converter.scala index 6f4d1b8ef0f..e1f3c919f03 100755 --- a/spark/src/main/scala/cn/edu/tsinghua/tsfile/Converter.scala +++ b/spark/src/main/scala/org/apache/iotdb/tsfile/Converter.scala @@ -1,23 +1,23 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile import java.util -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor -import cn.edu.tsinghua.tsfile.common.utils.ITsRandomAccessFileReader -import cn.edu.tsinghua.tsfile.file.metadata.enums.{TSDataType, TSEncoding} -import cn.edu.tsinghua.tsfile.timeseries.read.management.SeriesSchema -import cn.edu.tsinghua.tsfile.timeseries.read.query.{QueryConfig, QueryEngine} +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor +import org.apache.iotdb.tsfile.common.utils.ITsRandomAccessFileReader +import org.apache.iotdb.tsfile.file.metadata.enums.{TSDataType, TSEncoding} +import org.apache.iotdb.tsfile.timeseries.read.management.SeriesSchema +import org.apache.iotdb.tsfile.timeseries.read.query.{QueryConfig, QueryEngine} import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.FileStatus import org.apache.spark.sql.sources._ import org.apache.spark.sql.types._ -import cn.edu.tsinghua.tsfile.io.HDFSInputStream -import cn.edu.tsinghua.tsfile.qp.QueryProcessor -import cn.edu.tsinghua.tsfile.qp.common.{BasicOperator, FilterOperator, SQLConstant, TSQueryPlan} -import cn.edu.tsinghua.tsfile.timeseries.read.support.Field -import cn.edu.tsinghua.tsfile.timeseries.write.desc.MeasurementDescriptor -import cn.edu.tsinghua.tsfile.timeseries.write.record.{DataPoint, TSRecord} -import cn.edu.tsinghua.tsfile.timeseries.write.schema.{FileSchema, SchemaBuilder} +import org.apache.iotdb.tsfile.io.HDFSInputStream +import org.apache.iotdb.tsfile.qp.QueryProcessor +import org.apache.iotdb.tsfile.qp.common.{BasicOperator, FilterOperator, SQLConstant, TSQueryPlan} +import org.apache.iotdb.tsfile.timeseries.read.support.Field +import org.apache.iotdb.tsfile.timeseries.write.desc.MeasurementDescriptor +import org.apache.iotdb.tsfile.timeseries.write.record.{DataPoint, TSRecord} +import org.apache.iotdb.tsfile.timeseries.write.schema.{FileSchema, SchemaBuilder} import org.apache.spark.sql.Row import scala.collection.JavaConversions._ diff --git a/spark/src/main/scala/cn/edu/tsinghua/tsfile/DefaultSource.scala b/spark/src/main/scala/org/apache/iotdb/tsfile/DefaultSource.scala similarity index 94% rename from spark/src/main/scala/cn/edu/tsinghua/tsfile/DefaultSource.scala rename to spark/src/main/scala/org/apache/iotdb/tsfile/DefaultSource.scala index 190d1100720..7c41c0311a0 100755 --- a/spark/src/main/scala/cn/edu/tsinghua/tsfile/DefaultSource.scala +++ b/spark/src/main/scala/org/apache/iotdb/tsfile/DefaultSource.scala @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile import java.io._ import java.net.URI import java.util -import cn.edu.tsinghua.tsfile.common.constant.QueryConstant -import cn.edu.tsinghua.tsfile.DefaultSource.SerializableConfiguration -import cn.edu.tsinghua.tsfile.timeseries.read.query.dataset.QueryDataSet +import org.apache.iotdb.tsfile.common.constant.QueryConstant +import org.apache.iotdb.tsfile.DefaultSource.SerializableConfiguration +import org.apache.iotdb.tsfile.timeseries.read.query.dataset.QueryDataSet import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.{FileStatus, Path} import org.apache.hadoop.mapreduce.Job @@ -20,10 +20,10 @@ import org.apache.spark.sql.sources.{DataSourceRegister, Filter} import org.apache.spark.sql.types.{StructField, StructType} import org.slf4j.LoggerFactory import java.io.{ObjectInputStream, ObjectOutputStream} -import cn.edu.tsinghua.tsfile.timeseries.read.support.{Field, RowRecord} -import cn.edu.tsinghua.tsfile.io.HDFSInputStream -import cn.edu.tsinghua.tsfile.qp.Executor -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant +import org.apache.iotdb.tsfile.timeseries.read.support.{Field, RowRecord} +import org.apache.iotdb.tsfile.io.HDFSInputStream +import org.apache.iotdb.tsfile.qp.Executor +import org.apache.iotdb.tsfile.qp.common.SQLConstant import scala.collection.JavaConversions._ import scala.collection.mutable @@ -49,7 +49,7 @@ private[tsfile] class DefaultSource extends FileFormat with DataSourceRegister { val conf = spark.sparkContext.hadoopConfiguration //check if the path is given - options.getOrElse(DefaultSource.path, throw new TSFileDataSourceException(s"${DefaultSource.path} must be specified for cn.edu.thu.tsfile DataSource")) + options.getOrElse(DefaultSource.path, throw new TSFileDataSourceException(s"${DefaultSource.path} must be specified for org.apache.iotdb.tsfile DataSource")) //get union series in TsFile val tsfileSchema = Converter.getUnionSeries(files, conf) diff --git a/spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileOutputWriter.scala b/spark/src/main/scala/org/apache/iotdb/tsfile/TsFileOutputWriter.scala similarity index 88% rename from spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileOutputWriter.scala rename to spark/src/main/scala/org/apache/iotdb/tsfile/TsFileOutputWriter.scala index 6b9e86a3b66..1d592ebde63 100644 --- a/spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileOutputWriter.scala +++ b/spark/src/main/scala/org/apache/iotdb/tsfile/TsFileOutputWriter.scala @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile -import cn.edu.tsinghua.tsfile.timeseries.write.record.TSRecord -import cn.edu.tsinghua.tsfile.io.TsFileOutputFormat +import org.apache.iotdb.tsfile.timeseries.write.record.TSRecord +import org.apache.iotdb.tsfile.io.TsFileOutputFormat import org.apache.hadoop.io.NullWritable import org.apache.hadoop.mapreduce.{RecordWriter, TaskAttemptContext} import org.apache.spark.sql.Row diff --git a/spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileWriterFactory.scala b/spark/src/main/scala/org/apache/iotdb/tsfile/TsFileWriterFactory.scala similarity index 95% rename from spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileWriterFactory.scala rename to spark/src/main/scala/org/apache/iotdb/tsfile/TsFileWriterFactory.scala index dbcda002b9d..fd6df8af434 100644 --- a/spark/src/main/scala/cn/edu/tsinghua/tsfile/TsFileWriterFactory.scala +++ b/spark/src/main/scala/org/apache/iotdb/tsfile/TsFileWriterFactory.scala @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile import org.apache.hadoop.mapreduce.TaskAttemptContext import org.apache.spark.sql.execution.datasources.{OutputWriter, OutputWriterFactory} diff --git a/spark/src/main/scala/cn/edu/tsinghua/tsfile/package.scala b/spark/src/main/scala/org/apache/iotdb/tsfile/package.scala similarity index 68% rename from spark/src/main/scala/cn/edu/tsinghua/tsfile/package.scala rename to spark/src/main/scala/org/apache/iotdb/tsfile/package.scala index 928758f80a9..f6f03ff9bcf 100755 --- a/spark/src/main/scala/cn/edu/tsinghua/tsfile/package.scala +++ b/spark/src/main/scala/org/apache/iotdb/tsfile/package.scala @@ -1,4 +1,4 @@ -package cn.edu.tsinghua +package org.apache.iotdb import org.apache.spark.sql.{DataFrame, DataFrameReader, DataFrameWriter} @@ -8,13 +8,13 @@ package object tsfile { * add a method 'tsfile' to DataFrameReader to read tsfile */ implicit class TsFileDataFrameReader(reader: DataFrameReader) { - def tsfile: String => DataFrame = reader.format("cn.edu.tsinghua.tsfile").load + def tsfile: String => DataFrame = reader.format("org.apache.iotdb.tsfile").load } /** * add a method 'tsfile' to DataFrameWriter to write tsfile */ implicit class TsFileDataFrameWriter[T](writer: DataFrameWriter[T]) { - def tsfile: String => Unit = writer.format("cn.edu.tsinghua.tsfile").save + def tsfile: String => Unit = writer.format("org.apache.iotdb.tsfile").save } } diff --git a/spark/src/test/scala/cn/edu/tsinghua/tsfile/ConverterTest.scala b/spark/src/test/scala/cn/edu/tsinghua/tsfile/ConverterTest.scala index 78bed0509d9..529864c31d9 100644 --- a/spark/src/test/scala/cn/edu/tsinghua/tsfile/ConverterTest.scala +++ b/spark/src/test/scala/cn/edu/tsinghua/tsfile/ConverterTest.scala @@ -1,20 +1,20 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile import java.io.File import java.util -import cn.edu.tsinghua.tsfile.common.utils.Binary -import cn.edu.tsinghua.tsfile.file.metadata.enums.{TSDataType, TSEncoding} -import cn.edu.tsinghua.tsfile.io.CreateTSFile -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant -import cn.edu.tsinghua.tsfile.timeseries.read.TsRandomAccessLocalFileReader -import cn.edu.tsinghua.tsfile.timeseries.read.management.SeriesSchema -import cn.edu.tsinghua.tsfile.timeseries.read.query.QueryConfig +import org.apache.iotdb.tsfile.common.utils.Binary +import org.apache.iotdb.tsfile.file.metadata.enums.{TSDataType, TSEncoding} +import org.apache.iotdb.tsfile.io.CreateTSFile +import org.apache.iotdb.tsfile.qp.common.SQLConstant +import org.apache.iotdb.tsfile.timeseries.read.TsRandomAccessLocalFileReader +import org.apache.iotdb.tsfile.timeseries.read.management.SeriesSchema +import org.apache.iotdb.tsfile.timeseries.read.query.QueryConfig import org.apache.spark.sql.sources.{Filter, GreaterThan, LessThan, Or} import org.apache.spark.sql.types._ import org.junit.Assert import org.scalatest.{BeforeAndAfterAll, FunSuite} -import cn.edu.tsinghua.tsfile.timeseries.read.support.Field +import org.apache.iotdb.tsfile.timeseries.read.support.Field import scala.collection.mutable.{ArrayBuffer, ListBuffer} diff --git a/spark/src/test/scala/cn/edu/tsinghua/tsfile/TSFileSuit.scala b/spark/src/test/scala/cn/edu/tsinghua/tsfile/TSFileSuit.scala index 8b803d300b9..52d93690322 100644 --- a/spark/src/test/scala/cn/edu/tsinghua/tsfile/TSFileSuit.scala +++ b/spark/src/test/scala/cn/edu/tsinghua/tsfile/TSFileSuit.scala @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile +package org.apache.iotdb.tsfile import java.io.File @@ -6,8 +6,8 @@ import org.apache.spark.sql.SparkSession import org.apache.spark.sql.types._ import org.junit.Assert import org.scalatest.{BeforeAndAfterAll, FunSuite} -import cn.edu.tsinghua.tsfile.io.CreateTSFile -import cn.edu.tsinghua.tsfile.qp.common.SQLConstant +import org.apache.iotdb.tsfile.io.CreateTSFile +import org.apache.iotdb.tsfile.qp.common.SQLConstant import scala.collection.mutable @@ -167,7 +167,7 @@ class TSFileSuit extends FunSuite with BeforeAndAfterAll { } test("testQuerySchema") { - val df = spark.read.format("cn.edu.tsinghua.tsfile").load(tsfile1) + val df = spark.read.format("org.apache.iotdb.tsfile").load(tsfile1) val expected = StructType(Seq( StructField(SQLConstant.RESERVED_TIME, LongType, nullable = true), diff --git a/tsfile/example/readme.md b/tsfile/example/readme.md index 7b48f4d27b5..aa1ea70c7f4 100644 --- a/tsfile/example/readme.md +++ b/tsfile/example/readme.md @@ -8,7 +8,7 @@ The example is to show how to write and read a TsFile File. ``` - cn.edu.tsinghua + org.apache.iotdb tsfile 0.7.0 diff --git a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileRead.java b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileRead.java index a16dc85e66b..1c2f4615bb9 100644 --- a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileRead.java +++ b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileRead.java @@ -1,16 +1,16 @@ -package cn.edu.tsinghua.tsfile; +package org.apache.iotdb.tsfile; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.ReadOnlyTsFile; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.ReadOnlyTsFile; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; import java.io.IOException; import java.util.ArrayList; diff --git a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileSequenceRead.java b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileSequenceRead.java index 9972d879daa..272ade6f30d 100644 --- a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileSequenceRead.java +++ b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileSequenceRead.java @@ -1,21 +1,21 @@ -package cn.edu.tsinghua.tsfile; +package org.apache.iotdb.tsfile; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.encoding.decoder.Decoder; -import cn.edu.tsinghua.tsfile.file.MetaMarker; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadataIndex; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.page.PageReader; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.encoding.decoder.Decoder; +import org.apache.iotdb.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.ChunkGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.page.PageReader; import java.io.File; import java.io.IOException; diff --git a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileWrite.java b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileWrite.java index 46469633589..2dbd343ec8a 100644 --- a/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileWrite.java +++ b/tsfile/example/src/main/java/cn/edu/tsinghua/tsfile/TsFileWrite.java @@ -3,17 +3,17 @@ * The class use the second interface: * public void addMeasurement(MeasurementSchema MeasurementSchema) throws WriteProcessException */ -package cn.edu.tsinghua.tsfile; +package org.apache.iotdb.tsfile; import java.io.File; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.TsFileWriter; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.*; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.TsFileWriter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.*; /** * An example of writing data to TsFile diff --git a/tsfile/pom.xml b/tsfile/pom.xml index c0143336a23..11c12039748 100644 --- a/tsfile/pom.xml +++ b/tsfile/pom.xml @@ -3,7 +3,7 @@ 4.0.0 - cn.edu.tsinghua + org.apache.iotdb root 0.8.0-SNAPSHOT ../pom.xml diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/Cache.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/Cache.java deleted file mode 100644 index f7f54d53005..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/Cache.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.edu.tsinghua.tsfile.common.cache; - -import cn.edu.tsinghua.tsfile.exception.cache.CacheException; - -import java.io.IOException; - - -public interface Cache { - T get(K key) throws CacheException, IOException; - - void clear(); -} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/IDataReader.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/IDataReader.java deleted file mode 100644 index f7a1567e6ed..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/IDataReader.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.edu.tsinghua.tsfile.read; - -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.common.Chunk; - -import java.io.IOException; - -public interface IDataReader { - - public Chunk readMemChunk(ChunkMetaData metaData) throws IOException; -} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFile.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFile.java deleted file mode 100644 index cf3ccf7a14e..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFile.java +++ /dev/null @@ -1,35 +0,0 @@ -package cn.edu.tsinghua.tsfile.read; - -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerier; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.executor.TsFileExecutor; - -import java.io.IOException; - - -public class ReadOnlyTsFile { - - private TsFileSequenceReader fileReader; - private MetadataQuerier metadataQuerier; - private ChunkLoader chunkLoader; - private TsFileExecutor tsFileExecutor; - - public ReadOnlyTsFile(TsFileSequenceReader fileReader) throws IOException { - this.fileReader = fileReader; - this.metadataQuerier = new MetadataQuerierByFileImpl(fileReader); - this.chunkLoader = new ChunkLoaderImpl(fileReader); - tsFileExecutor = new TsFileExecutor(metadataQuerier, chunkLoader); - } - - public QueryDataSet query(QueryExpression queryExpression) throws IOException { - return tsFileExecutor.execute(queryExpression); - } - - public void close() throws IOException { - fileReader.close(); - } -} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterFactory.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterFactory.java deleted file mode 100644 index 3b47b3e45a4..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterFactory.java +++ /dev/null @@ -1,21 +0,0 @@ -package cn.edu.tsinghua.tsfile.read.filter.factory; - -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.operator.AndFilter; -import cn.edu.tsinghua.tsfile.read.filter.operator.NotFilter; -import cn.edu.tsinghua.tsfile.read.filter.operator.OrFilter; - -public class FilterFactory { - public static AndFilter and(Filter left, Filter right){ - return new AndFilter(left, right); - } - - public static OrFilter or(Filter left, Filter right){ - return new OrFilter(left, right); - } - - public static NotFilter not(Filter filter) { - return new NotFilter(filter); - } - -} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutor.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutor.java deleted file mode 100644 index bde798b46f0..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutor.java +++ /dev/null @@ -1,12 +0,0 @@ -package cn.edu.tsinghua.tsfile.read.query.executor; - -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; - -import java.io.IOException; - - -public interface QueryExecutor { - - QueryDataSet execute(QueryExpression queryExpression) throws IOException; -} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/IDataWriter.java b/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/IDataWriter.java deleted file mode 100644 index ea2c06eb3f6..00000000000 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/IDataWriter.java +++ /dev/null @@ -1,4 +0,0 @@ -package cn.edu.tsinghua.tsfile.write.writer; - -public interface IDataWriter { -} diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/Cache.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/Cache.java new file mode 100644 index 00000000000..11febd6c131 --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/Cache.java @@ -0,0 +1,13 @@ +package org.apache.iotdb.tsfile.common.cache; + +import org.apache.iotdb.tsfile.exception.cache.CacheException; +import org.apache.iotdb.tsfile.exception.cache.CacheException; + +import java.io.IOException; + + +public interface Cache { + T get(K key) throws CacheException, IOException; + + void clear(); +} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/LRUCache.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/LRUCache.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java index bc3249450c7..dffdf561e1f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/cache/LRUCache.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/cache/LRUCache.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.cache; +package org.apache.iotdb.tsfile.common.cache; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileConfig.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileConfig.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java index 9513b8ed980..d8d592e1e52 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileConfig.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.conf; +package org.apache.iotdb.tsfile.common.conf; /** * TSFileConfig is a configure class. Every variables is public and has default diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileDescriptor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileDescriptor.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileDescriptor.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileDescriptor.java index 4bec9cc7cff..7a85c10bcab 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/conf/TSFileDescriptor.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileDescriptor.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.common.conf; +package org.apache.iotdb.tsfile.common.conf; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.utils.Loader; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; +import org.apache.iotdb.tsfile.utils.Loader; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/JsonFormatConstant.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/JsonFormatConstant.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/JsonFormatConstant.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/JsonFormatConstant.java index 02d5c2512a1..c63151384a5 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/JsonFormatConstant.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/JsonFormatConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.constant; +package org.apache.iotdb.tsfile.common.constant; /*** * this class define several constant string variables used in tsfile schema's diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/QueryConstant.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/QueryConstant.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/QueryConstant.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/QueryConstant.java index 3f7138caaee..95266bbd5a0 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/QueryConstant.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/QueryConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.constant; +package org.apache.iotdb.tsfile.common.constant; public class QueryConstant { // The start offset for the partition diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/StatisticConstant.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/StatisticConstant.java similarity index 91% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/StatisticConstant.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/StatisticConstant.java index 87600b35ffe..9067044c427 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/StatisticConstant.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/StatisticConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.constant; +package org.apache.iotdb.tsfile.common.constant; public class StatisticConstant { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/SystemConstant.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/SystemConstant.java similarity index 85% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/SystemConstant.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/SystemConstant.java index 44bde215d6e..aa04bf87ecc 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/common/constant/SystemConstant.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/constant/SystemConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.common.constant; +package org.apache.iotdb.tsfile.common.constant; public class SystemConstant { public static final String TSFILE_HOME = "TSFILE_HOME"; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/Compressor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/compress/Compressor.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/Compressor.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/compress/Compressor.java index 0e2cc4b1b6d..61f1c1be503 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/Compressor.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/compress/Compressor.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.compress; +package org.apache.iotdb.tsfile.compress; -import cn.edu.tsinghua.tsfile.exception.compress.CompressionTypeNotSupportedException; +import org.apache.iotdb.tsfile.exception.compress.CompressionTypeNotSupportedException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xerial.snappy.Snappy; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/UnCompressor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/compress/UnCompressor.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/UnCompressor.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/compress/UnCompressor.java index 6b473ec5e60..60ad4f5f26f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/compress/UnCompressor.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/compress/UnCompressor.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.compress; +package org.apache.iotdb.tsfile.compress; -import cn.edu.tsinghua.tsfile.exception.compress.CompressionTypeNotSupportedException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.exception.compress.CompressionTypeNotSupportedException; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.xerial.snappy.Snappy; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPacker.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPacker.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPacker.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPacker.java index 02ada119473..0319c2af949 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPacker.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPacker.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.bitpacking; +package org.apache.iotdb.tsfile.encoding.bitpacking; /** * This class is used to encode(decode) Integer in Java with specified bit-width. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPacker.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPacker.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPacker.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPacker.java index a2bcfeff294..9f23f032192 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPacker.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPacker.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.bitpacking; +package org.apache.iotdb.tsfile.encoding.bitpacking; /** * This class is used to encode(decode) Long in Java with specified bit-width. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EncodingConfig.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EncodingConfig.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EncodingConfig.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EncodingConfig.java index a4115303f54..4704e47a27c 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EncodingConfig.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EncodingConfig.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.common; +package org.apache.iotdb.tsfile.encoding.common; /** * This class defines several constants using in encoding algorithm. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EndianType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EndianType.java similarity index 74% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EndianType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EndianType.java index 1ba2dcf8cac..531bc5bf784 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/common/EndianType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/common/EndianType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.common; +package org.apache.iotdb.tsfile.encoding.common; /** * In current verison, we only support LITTLE_ENDIAN mode. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoder.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoder.java index fc98516944c..4b2fbe047c6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoder.java @@ -1,11 +1,12 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.Pair; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/Decoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/Decoder.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/Decoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/Decoder.java index 9caa5d8ae7b..e3234c30244 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/Decoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/Decoder.java @@ -1,11 +1,10 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; - -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +package org.apache.iotdb.tsfile.encoding.decoder; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.Binary; import java.io.IOException; import java.math.BigDecimal; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DeltaBinaryDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DeltaBinaryDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java index 8d990fa1e3d..9a3931f84f1 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DeltaBinaryDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DeltaBinaryDecoder.java @@ -1,9 +1,11 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.encoding.encoder.DeltaBinaryEncoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DoublePrecisionDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DoublePrecisionDecoder.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DoublePrecisionDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DoublePrecisionDecoder.java index 7f2e6c822b3..b45a298c0e0 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/DoublePrecisionDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/DoublePrecisionDecoder.java @@ -1,13 +1,14 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import java.io.IOException; import java.nio.ByteBuffer; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; /** * Decoder for value value using gorilla diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java index eed10c8bf8a..e8278c5bcef 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java @@ -1,12 +1,15 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.encoder.FloatEncoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.FloatEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.encoding.encoder.FloatEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoder.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoder.java index dc0e2e7b7e7..a4e1c990ad0 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoder.java @@ -1,13 +1,14 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import java.io.IOException; import java.nio.ByteBuffer; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; public abstract class GorillaDecoder extends Decoder { private static final Logger LOGGER = LoggerFactory.getLogger(GorillaDecoder.class); diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoder.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoder.java index 15361562146..032fe158f36 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoder.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.bitpacking.IntPacker; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.bitpacking.IntPacker; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.bitpacking.IntPacker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoder.java similarity index 85% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoder.java index 20d5a600b92..9353d47e6f6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoder.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.bitpacking.LongPacker; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.bitpacking.LongPacker; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.bitpacking.LongPacker; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/PlainDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/PlainDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java index 3e05b526a1f..7046f96dd15 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/PlainDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java @@ -1,10 +1,11 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/RleDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/RleDecoder.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/RleDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/RleDecoder.java index b2a16bd929b..78d893e4b85 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/RleDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/RleDecoder.java @@ -1,13 +1,15 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileDecodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.encoding.TSFileDecodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.io.IOException; import java.math.BigDecimal; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/SinglePrecisionDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/SinglePrecisionDecoder.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/SinglePrecisionDecoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/SinglePrecisionDecoder.java index 6ffaab6fa6c..b8c6226c550 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/decoder/SinglePrecisionDecoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/SinglePrecisionDecoder.java @@ -1,13 +1,14 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import java.io.IOException; import java.nio.ByteBuffer; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; /** * Decoder for value value using gorilla diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/BitmapEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/BitmapEncoder.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/BitmapEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/BitmapEncoder.java index eea57758dcf..ac699568d85 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/BitmapEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/BitmapEncoder.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DeltaBinaryEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DeltaBinaryEncoder.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DeltaBinaryEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DeltaBinaryEncoder.java index 55fca51e46d..ac173098278 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DeltaBinaryEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DeltaBinaryEncoder.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DoublePrecisionEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DoublePrecisionEncoder.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DoublePrecisionEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DoublePrecisionEncoder.java index 27438e853a6..2299f184c6a 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/DoublePrecisionEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/DoublePrecisionEncoder.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/Encoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/Encoder.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/Encoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/Encoder.java index 14bb8b58fe2..fd98329737d 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/Encoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/Encoder.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileEncodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.encoding.TSFileEncodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/FloatEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FloatEncoder.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/FloatEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FloatEncoder.java index 060cfaceb03..27c5de79c27 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/FloatEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FloatEncoder.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileEncodingException; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.encoding.TSFileEncodingException; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/GorillaEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/GorillaEncoder.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/GorillaEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/GorillaEncoder.java index cf1789bfb4f..34d5c2e9a2f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/GorillaEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/GorillaEncoder.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.io.ByteArrayOutputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/IntRleEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/IntRleEncoder.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/IntRleEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/IntRleEncoder.java index e0656ccd275..92edeaa0cbf 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/IntRleEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/IntRleEncoder.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.bitpacking.IntPacker; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.bitpacking.IntPacker; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.bitpacking.IntPacker; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/LongRleEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/LongRleEncoder.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/LongRleEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/LongRleEncoder.java index 95ebed2e172..ff9ddcaddc3 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/LongRleEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/LongRleEncoder.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.bitpacking.LongPacker; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.bitpacking.LongPacker; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.bitpacking.LongPacker; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/PlainEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/PlainEncoder.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/PlainEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/PlainEncoder.java index de35eeee36f..5e94d067945 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/PlainEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/PlainEncoder.java @@ -1,11 +1,14 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileEncodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.exception.encoding.TSFileEncodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/RleEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/RleEncoder.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/RleEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/RleEncoder.java index b77b6305b74..d0eaa40b10a 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/RleEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/RleEncoder.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.encoding.TSFileEncodingException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.encoding.TSFileEncodingException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/SinglePrecisionEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SinglePrecisionEncoder.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/SinglePrecisionEncoder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SinglePrecisionEncoder.java index d507780b5b5..c355d55585f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/SinglePrecisionEncoder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/SinglePrecisionEncoder.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -39,7 +40,7 @@ public class SinglePrecisionEncoder extends GorillaEncoder{ // case: write '10' and effective bits without first leadingZeroNum '0' and last tailingZeroNum '0' writeBit(true, out); writeBit(false, out); - writeBits(tmp, out, TSFileConfig.FLOAT_LENGTH - 1 - leadingZeroNum, tailingZeroNum); + writeBits(tmp, out, TSFileConfig.FLOAT_LENGTH - 1 - leadingZeroNum, tailingZeroNum); } else{ // case: write '11', leading zero num of value, effective bits len and effective bit value writeBit(true, out); diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/TSEncodingBuilder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/TSEncodingBuilder.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/TSEncodingBuilder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/TSEncodingBuilder.java index 3e804c1af71..d8ed41fb1a0 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/encoding/encoder/TSEncodingBuilder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/TSEncodingBuilder.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.tsfile.encoding.encoder; +package org.apache.iotdb.tsfile.encoding.encoder; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/TSFileRuntimeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/TSFileRuntimeException.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/TSFileRuntimeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/TSFileRuntimeException.java index 70607bf4b70..ac2311a062e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/TSFileRuntimeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/TSFileRuntimeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception; +package org.apache.iotdb.tsfile.exception; /** * This Exception is the parent class for all runtime exceptions.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/cache/CacheException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/cache/CacheException.java similarity index 91% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/cache/CacheException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/cache/CacheException.java index 5eb1618c251..abf534253de 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/cache/CacheException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/cache/CacheException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.cache; +package org.apache.iotdb.tsfile.exception.cache; public class CacheException extends Exception { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/compress/CompressionTypeNotSupportedException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/compress/CompressionTypeNotSupportedException.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/compress/CompressionTypeNotSupportedException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/compress/CompressionTypeNotSupportedException.java index 5eb34229eb8..4244af90404 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/compress/CompressionTypeNotSupportedException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/compress/CompressionTypeNotSupportedException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.compress; +package org.apache.iotdb.tsfile.exception.compress; /** * This exception will be thrown when the codec is not supported by tsfile, meaning there is no diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileDecodingException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileDecodingException.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileDecodingException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileDecodingException.java index 503543d7e0e..55c233f537d 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileDecodingException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileDecodingException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.exception.encoding; +package org.apache.iotdb.tsfile.exception.encoding; -import cn.edu.tsinghua.tsfile.exception.TSFileRuntimeException; +import org.apache.iotdb.tsfile.exception.TSFileRuntimeException; /** * This Exception is used while decoding failed.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileEncodingException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileEncodingException.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileEncodingException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileEncodingException.java index 58ce9ea08ae..0ead16e5ab6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/encoding/TSFileEncodingException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/encoding/TSFileEncodingException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.exception.encoding; +package org.apache.iotdb.tsfile.exception.encoding; -import cn.edu.tsinghua.tsfile.exception.TSFileRuntimeException; +import org.apache.iotdb.tsfile.exception.TSFileRuntimeException; /** * This Exception is used while encoding failed.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterDataTypeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterDataTypeException.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterDataTypeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterDataTypeException.java index 9f931e0b945..515053f2bf3 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterDataTypeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterDataTypeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.filter; +package org.apache.iotdb.tsfile.exception.filter; /** * This Exception is used while filter data type is not consistent with the series type.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterInvokeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterInvokeException.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterInvokeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterInvokeException.java index 308a9eb504b..ed1f3d42bdf 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/FilterInvokeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/FilterInvokeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.filter; +package org.apache.iotdb.tsfile.exception.filter; /** * This Exception is used while invoke UnarySeriesFilter's accept method.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/QueryFilterOptimizationException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/QueryFilterOptimizationException.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/QueryFilterOptimizationException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/QueryFilterOptimizationException.java index 219798a6319..f83af1abb53 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/QueryFilterOptimizationException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/QueryFilterOptimizationException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.filter; +package org.apache.iotdb.tsfile.exception.filter; public class QueryFilterOptimizationException extends Exception{ diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/UnSupportFilterDataTypeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/UnSupportFilterDataTypeException.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/UnSupportFilterDataTypeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/UnSupportFilterDataTypeException.java index eb9779ee578..d4d16f23006 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/filter/UnSupportFilterDataTypeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/filter/UnSupportFilterDataTypeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.filter; +package org.apache.iotdb.tsfile.exception.filter; /** * Some wrong filter parameters invoke. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/metadata/MetadataArgsErrorException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/metadata/MetadataArgsErrorException.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/metadata/MetadataArgsErrorException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/metadata/MetadataArgsErrorException.java index 8e84fc82a6a..a096ff7aa02 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/metadata/MetadataArgsErrorException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/metadata/MetadataArgsErrorException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.metadata; +package org.apache.iotdb.tsfile.exception.metadata; /** * If query metadata constructs schema but passes illegal parameters to diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/InvalidJsonSchemaException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/InvalidJsonSchemaException.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/InvalidJsonSchemaException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/InvalidJsonSchemaException.java index bf0849a4a09..6134f1ca0f3 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/InvalidJsonSchemaException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/InvalidJsonSchemaException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; /** * This exception is throw if the file schema in json format is invalid, like missing necessary fields. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/NoMeasurementException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/NoMeasurementException.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/NoMeasurementException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/NoMeasurementException.java index 31a2abaa4de..2c6c13dcd94 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/NoMeasurementException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/NoMeasurementException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; /** * This exception means it can not find the measurement while writing a TSRecord diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/PageException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/PageException.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/PageException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/PageException.java index d4ac53cd0ec..3eaf4810880 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/PageException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/PageException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; /** * Exception occurs when writing a page diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnSupportedDataTypeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnSupportedDataTypeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java index 6da0fb96067..3d4d322e918 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnSupportedDataTypeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnSupportedDataTypeException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; public class UnSupportedDataTypeException extends RuntimeException { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnknownColumnTypeException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnknownColumnTypeException.java similarity index 80% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnknownColumnTypeException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnknownColumnTypeException.java index 09293b7554e..19725c25501 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/UnknownColumnTypeException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/UnknownColumnTypeException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; -import cn.edu.tsinghua.tsfile.exception.TSFileRuntimeException; +import org.apache.iotdb.tsfile.exception.TSFileRuntimeException; /** * This Exception is used while getting an unknown column type.
diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/WriteProcessException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/WriteProcessException.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/WriteProcessException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/WriteProcessException.java index 821ee03d074..d69071c7836 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/exception/write/WriteProcessException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/exception/write/WriteProcessException.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.exception.write; +package org.apache.iotdb.tsfile.exception.write; /** * This exception is threw while meeting error in writing procession. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/MetaMarker.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/MetaMarker.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/MetaMarker.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/MetaMarker.java index 14f8ca7307f..68aad32a784 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/MetaMarker.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/MetaMarker.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file; +package org.apache.iotdb.tsfile.file; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/footer/ChunkGroupFooter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/footer/ChunkGroupFooter.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/footer/ChunkGroupFooter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/footer/ChunkGroupFooter.java index abfc1d833a4..585644e26cd 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/footer/ChunkGroupFooter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/footer/ChunkGroupFooter.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.file.footer; +package org.apache.iotdb.tsfile.file.footer; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.MetaMarker; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/ChunkHeader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/ChunkHeader.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/ChunkHeader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/ChunkHeader.java index f2ff7e854ce..a7e83bc59b3 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/ChunkHeader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/ChunkHeader.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.tsfile.file.header; +package org.apache.iotdb.tsfile.file.header; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.MetaMarker; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/PageHeader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/PageHeader.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/PageHeader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/PageHeader.java index 8b0116ab521..cd12636e357 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/PageHeader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/PageHeader.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.file.header; +package org.apache.iotdb.tsfile.file.header; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.NoStatistics; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.file.metadata.statistics.NoStatistics; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/package-info.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/package-info.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/package-info.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/package-info.java index 56714084d68..652c2f17e1e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/header/package-info.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/header/package-info.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.header; +package org.apache.iotdb.tsfile.file.header; /** ChunkGroupFooter and ChunkHeader are used for parsing file. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaData.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaData.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaData.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaData.java index 6421efd1394..0ac41a25445 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaData.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaData.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaData.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaData.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaData.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaData.java index 90f5a704b9d..d7dcab24f2f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaData.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaData.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadata.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java similarity index 98% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadata.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java index 4a23124a696..46c8708e600 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadata.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadata.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndex.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndex.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndex.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndex.java index e70707492bc..c71c1b5edde 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndex.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndex.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDigest.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDigest.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDigest.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDigest.java index cbc92cbc67f..6b5ee0a7d22 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsDigest.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsDigest.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaData.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaData.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaData.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaData.java index e34e0e38179..e5f165b5395 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaData.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaData.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/CompressionType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/CompressionType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java index 852e96c08bf..c1edaa4dbb2 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/CompressionType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata.enums; +package org.apache.iotdb.tsfile.file.metadata.enums; -import cn.edu.tsinghua.tsfile.exception.compress.CompressionTypeNotSupportedException; +import org.apache.iotdb.tsfile.exception.compress.CompressionTypeNotSupportedException; public enum CompressionType { UNCOMPRESSED, diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSDataType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSDataType.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSDataType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSDataType.java index 2f3bb6d7792..aa8186d1f97 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSDataType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSDataType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.enums; +package org.apache.iotdb.tsfile.file.metadata.enums; public enum TSDataType { BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSEncoding.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java similarity index 91% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSEncoding.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java index e7d29f2191b..0ae83a2a3ad 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSEncoding.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.enums; +package org.apache.iotdb.tsfile.file.metadata.enums; public enum TSEncoding { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSFreqType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSFreqType.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSFreqType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSFreqType.java index b076c0f8579..512b77d9bbd 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/enums/TSFreqType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSFreqType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.enums; +package org.apache.iotdb.tsfile.file.metadata.enums; public enum TSFreqType { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BinaryStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BinaryStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java index 859aa2ccab4..09602217f0b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BinaryStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BinaryStatistics.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatistics.java index 4444d00f053..311a0f656fb 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatistics.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatistics.java index 061dc3cc940..4757fae61a8 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatistics.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatistics.java index 5fec0a0f41f..5080700b513 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatistics.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatistics.java index 195616571ba..f8cf8dff8d5 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatistics.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatistics.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatistics.java index 9ccb03ffcfd..a876a81ebaa 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatistics.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/NoStatistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/NoStatistics.java similarity index 93% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/NoStatistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/NoStatistics.java index fd1741d91ba..4126215f35f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/NoStatistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/NoStatistics.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/Statistics.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/Statistics.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java index ac41ba50df2..9adb42b4fcc 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/Statistics.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/Statistics.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.exception.write.UnknownColumnTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.write.UnknownColumnTypeException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsClassException.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsClassException.java similarity index 73% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsClassException.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsClassException.java index a304f8367e0..f16b824b776 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsClassException.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsClassException.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.exception.TSFileRuntimeException; +import org.apache.iotdb.tsfile.exception.TSFileRuntimeException; public class StatisticsClassException extends TSFileRuntimeException { private static final long serialVersionUID = -5445795844780183770L; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsDeserializer.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsDeserializer.java similarity index 55% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsDeserializer.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsDeserializer.java index 276f55e07c6..7aaf47982df 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StatisticsDeserializer.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/statistics/StatisticsDeserializer.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import java.io.InputStream; diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/IDataReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/IDataReader.java new file mode 100644 index 00000000000..37a7d0540f5 --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/IDataReader.java @@ -0,0 +1,13 @@ +package org.apache.iotdb.tsfile.read; + +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Chunk; + +import java.io.IOException; + +public interface IDataReader { + + public Chunk readMemChunk(ChunkMetaData metaData) throws IOException; +} diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFile.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFile.java new file mode 100644 index 00000000000..b6f63dee2b1 --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFile.java @@ -0,0 +1,42 @@ +package org.apache.iotdb.tsfile.read; + +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.executor.TsFileExecutor; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.query.executor.TsFileExecutor; + +import java.io.IOException; + + +public class ReadOnlyTsFile { + + private TsFileSequenceReader fileReader; + private MetadataQuerier metadataQuerier; + private ChunkLoader chunkLoader; + private TsFileExecutor tsFileExecutor; + + public ReadOnlyTsFile(TsFileSequenceReader fileReader) throws IOException { + this.fileReader = fileReader; + this.metadataQuerier = new MetadataQuerierByFileImpl(fileReader); + this.chunkLoader = new ChunkLoaderImpl(fileReader); + tsFileExecutor = new TsFileExecutor(metadataQuerier, chunkLoader); + } + + public QueryDataSet query(QueryExpression queryExpression) throws IOException { + return tsFileExecutor.execute(queryExpression); + } + + public void close() throws IOException { + fileReader.close(); + } +} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/TsFileSequenceReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/TsFileSequenceReader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java index 068dea299db..6feb9316721 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/TsFileSequenceReader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/TsFileSequenceReader.java @@ -1,20 +1,34 @@ -package cn.edu.tsinghua.tsfile.read; +package org.apache.iotdb.tsfile.read; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.read.reader.DefaultTsFileInput; -import cn.edu.tsinghua.tsfile.read.reader.TsFileInput; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.compress.UnCompressor; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadataIndex; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.read.reader.DefaultTsFileInput; +import org.apache.iotdb.tsfile.read.reader.TsFileInput; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.compress.UnCompressor; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.compress.UnCompressor; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.reader.DefaultTsFileInput; +import org.apache.iotdb.tsfile.read.reader.TsFileInput; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/UnClosedTsFileReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/UnClosedTsFileReader.java similarity index 68% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/UnClosedTsFileReader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/UnClosedTsFileReader.java index 5e8da5073e7..78ac7e0a54f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/UnClosedTsFileReader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/UnClosedTsFileReader.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.tsfile.read; +package org.apache.iotdb.tsfile.read; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadataIndex; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; import sun.reflect.generics.reflectiveObjects.NotImplementedException; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/BatchData.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/BatchData.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/BatchData.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/BatchData.java index 4777a35a8f9..7daa0145205 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/BatchData.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/BatchData.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.util.ArrayList; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Chunk.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Chunk.java similarity index 72% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Chunk.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Chunk.java index 06f85327375..6a73c852ba7 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Chunk.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Chunk.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Field.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Field.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Field.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Field.java index 9776533fbdd..510f351b6d7 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Field.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Field.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; /** *

Field is component of one {@code RowRecord} which stores a value in diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Path.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Path.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Path.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Path.java index 0ef3b28a5c2..966913e2fab 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/Path.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/Path.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; -import cn.edu.tsinghua.tsfile.common.constant.SystemConstant; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.common.constant.SystemConstant; +import org.apache.iotdb.tsfile.utils.StringContainer; /** * This class define an Object named Path to represent a series in IoTDB. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/RowRecord.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/RowRecord.java similarity index 95% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/RowRecord.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/RowRecord.java index 8b703495b45..638f43793bd 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/common/RowRecord.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/common/RowRecord.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; import java.util.ArrayList; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoader.java similarity index 55% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoader.java index 95f2687c585..05c7929ddcc 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoader.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderImpl.java similarity index 77% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderImpl.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderImpl.java index bfa87bf661f..8869cf2f1af 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderImpl.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderImpl.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerier.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerier.java similarity index 61% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerier.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerier.java index f9b1a27a318..26468f3030b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerier.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerier.java @@ -1,8 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImpl.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java index 3f7acbf7c97..a89471a2cbf 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImpl.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImpl.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.file.metadata.*; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.*; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.file.metadata.*; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/ExpressionType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/ExpressionType.java similarity index 57% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/ExpressionType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/ExpressionType.java index d4b9b36ffda..2a6f93320e2 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/ExpressionType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/ExpressionType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.expression; +package org.apache.iotdb.tsfile.read.expression; public enum ExpressionType { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IBinaryExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IBinaryExpression.java similarity index 75% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IBinaryExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IBinaryExpression.java index 4296b6afea3..0b05568836b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IBinaryExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IBinaryExpression.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.expression; +package org.apache.iotdb.tsfile.read.expression; /** * @author Jinrui Zhang diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IExpression.java similarity index 57% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IExpression.java index f85d36c48c4..bb3af3e6792 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IExpression.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.expression; +package org.apache.iotdb.tsfile.read.expression; public interface IExpression { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IUnaryExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IUnaryExpression.java similarity index 53% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IUnaryExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IUnaryExpression.java index e3d5ecd6bda..097e4838fa3 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/IUnaryExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/IUnaryExpression.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.read.expression; +package org.apache.iotdb.tsfile.read.expression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; public interface IUnaryExpression extends IExpression { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/QueryExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/QueryExpression.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/QueryExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/QueryExpression.java index f93e07b92b4..493c2b3d222 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/QueryExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/QueryExpression.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.read.expression; +package org.apache.iotdb.tsfile.read.expression; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; import java.util.ArrayList; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/BinaryExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/BinaryExpression.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/BinaryExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/BinaryExpression.java index d0b296753cc..7d41e707bec 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/BinaryExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/BinaryExpression.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.expression.impl; +package org.apache.iotdb.tsfile.read.expression.impl; -import cn.edu.tsinghua.tsfile.read.expression.IBinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; public abstract class BinaryExpression implements IBinaryExpression { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/GlobalTimeExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/GlobalTimeExpression.java similarity index 69% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/GlobalTimeExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/GlobalTimeExpression.java index 50499fa32ae..53c5905a009 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/GlobalTimeExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/GlobalTimeExpression.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.expression.impl; +package org.apache.iotdb.tsfile.read.expression.impl; -import cn.edu.tsinghua.tsfile.read.expression.ExpressionType; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; public class GlobalTimeExpression implements IUnaryExpression { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/SingleSeriesExpression.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/SingleSeriesExpression.java similarity index 71% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/SingleSeriesExpression.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/SingleSeriesExpression.java index b2efd1d6389..bd309e70f9b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/impl/SingleSeriesExpression.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/impl/SingleSeriesExpression.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.read.expression.impl; +package org.apache.iotdb.tsfile.read.expression.impl; -import cn.edu.tsinghua.tsfile.read.expression.ExpressionType; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.common.Path; public class SingleSeriesExpression implements IUnaryExpression { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionOptimizer.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionOptimizer.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionOptimizer.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionOptimizer.java index 7021d10117e..39819c97885 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionOptimizer.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionOptimizer.java @@ -1,15 +1,18 @@ -package cn.edu.tsinghua.tsfile.read.expression.util; +package org.apache.iotdb.tsfile.read.expression.util; -import cn.edu.tsinghua.tsfile.read.expression.*; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.exception.filter.QueryFilterOptimizationException; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.*; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionPrinter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionPrinter.java similarity index 82% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionPrinter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionPrinter.java index 00c67712bcd..ca9c5a42d5e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/expression/util/ExpressionPrinter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/expression/util/ExpressionPrinter.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.expression.util; +package org.apache.iotdb.tsfile.read.expression.util; -import cn.edu.tsinghua.tsfile.read.expression.IBinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.IUnaryExpression; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.IUnaryExpression; public class ExpressionPrinter { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/DigestForFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/DigestForFilter.java similarity index 86% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/DigestForFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/DigestForFilter.java index 3e95acb1926..0505aad30a2 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/DigestForFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/DigestForFilter.java @@ -1,9 +1,11 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.exception.filter.UnSupportFilterDataTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.filter.UnSupportFilterDataTypeException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.filter.UnSupportFilterDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/TimeFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/TimeFilter.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/TimeFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/TimeFilter.java index 5d6ac9a810c..6e4828a1428 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/TimeFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/TimeFilter.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; -import cn.edu.tsinghua.tsfile.read.filter.operator.*; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.operator.*; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.operator.*; public class TimeFilter { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/ValueFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/ValueFilter.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/ValueFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/ValueFilter.java index 434f034f797..0922f51c179 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/ValueFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/ValueFilter.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; -import cn.edu.tsinghua.tsfile.read.filter.operator.*; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.operator.*; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.operator.*; public class ValueFilter { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/BinaryFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/BinaryFilter.java similarity index 92% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/BinaryFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/BinaryFilter.java index d7720c9c53d..8ca1fc461b5 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/BinaryFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/BinaryFilter.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.filter.basic; +package org.apache.iotdb.tsfile.read.filter.basic; import java.io.Serializable; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/Filter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/Filter.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/Filter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/Filter.java index 0deb58d1c96..55695276fb5 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/Filter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/Filter.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.filter.basic; +package org.apache.iotdb.tsfile.read.filter.basic; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; /** * Filter is a top level filter abstraction. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/UnaryFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/UnaryFilter.java similarity index 79% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/UnaryFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/UnaryFilter.java index b58b4f0f2f6..7de6bc43498 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/basic/UnaryFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/basic/UnaryFilter.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.filter.basic; +package org.apache.iotdb.tsfile.read.filter.basic; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; import java.io.Serializable; diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterFactory.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterFactory.java new file mode 100644 index 00000000000..52c620c329a --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterFactory.java @@ -0,0 +1,23 @@ +package org.apache.iotdb.tsfile.read.filter.factory; + +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.operator.AndFilter; +import org.apache.iotdb.tsfile.read.filter.operator.NotFilter; +import org.apache.iotdb.tsfile.read.filter.operator.OrFilter; +import org.apache.iotdb.tsfile.read.filter.operator.AndFilter; +import org.apache.iotdb.tsfile.read.filter.operator.NotFilter; + +public class FilterFactory { + public static AndFilter and(Filter left, Filter right){ + return new AndFilter(left, right); + } + + public static OrFilter or(Filter left, Filter right){ + return new OrFilter(left, right); + } + + public static NotFilter not(Filter filter) { + return new NotFilter(filter); + } + +} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterType.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterType.java index 7bc81175495..01d035f93d8 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/factory/FilterType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/factory/FilterType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.filter.factory; +package org.apache.iotdb.tsfile.read.filter.factory; public enum FilterType { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/AndFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/AndFilter.java similarity index 79% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/AndFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/AndFilter.java index 1dda9cca610..3338443e6cc 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/AndFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/AndFilter.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.BinaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.BinaryFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; /** * Both the left and right operators of AndExpression must satisfy the condition. diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Eq.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Eq.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Eq.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Eq.java index 45096762b34..6045b0f54d8 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Eq.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Eq.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * Equals diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Gt.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Gt.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Gt.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Gt.java index c976e92aa14..2c5995e4439 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Gt.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Gt.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * Greater than diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/GtEq.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/GtEq.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/GtEq.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/GtEq.java index 8d367c32955..47f33323a33 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/GtEq.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/GtEq.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * Greater than or Equals diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Lt.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Lt.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Lt.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Lt.java index 75da2d9b348..6b8df9415dd 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/Lt.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/Lt.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * less than diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/LtEq.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/LtEq.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/LtEq.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/LtEq.java index 3f83b0becfa..61e0ac7a9c5 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/LtEq.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/LtEq.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * Less than or Equals diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotEq.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotEq.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotEq.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotEq.java index 2e82b39af0a..2818e7c0090 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotEq.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotEq.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; /** * NotFilter Equals diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotFilter.java similarity index 74% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotFilter.java index 1c34e49e4af..6a2271cf17b 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/NotFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/NotFilter.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.basic.UnaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterType; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.basic.UnaryFilter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterType; import java.io.Serializable; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/OrFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/OrFilter.java similarity index 80% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/OrFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/OrFilter.java index 8ed2fdeadf8..2b7edc1bbc8 100755 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/filter/operator/OrFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/filter/operator/OrFilter.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter.operator; +package org.apache.iotdb.tsfile.read.filter.operator; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.BinaryFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.BinaryFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; import java.io.Serializable; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithTimeGenerator.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithTimeGenerator.java similarity index 72% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithTimeGenerator.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithTimeGenerator.java index b70e7ee18aa..0e7b9013e5e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithTimeGenerator.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithTimeGenerator.java @@ -1,13 +1,20 @@ -package cn.edu.tsinghua.tsfile.read.query.dataset; +package org.apache.iotdb.tsfile.read.query.dataset; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.TimeGenerator; -import cn.edu.tsinghua.tsfile.read.reader.series.SeriesReaderByTimestamp; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator; +import org.apache.iotdb.tsfile.read.reader.series.SeriesReaderByTimestamp; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator; +import org.apache.iotdb.tsfile.read.reader.series.SeriesReaderByTimestamp; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java index 3e0c9982c66..18cc3ce2cb6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/DataSetWithoutTimeGenerator.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.tsfile.read.query.dataset; +package org.apache.iotdb.tsfile.read.query.dataset; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; import java.io.IOException; import java.util.*; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/QueryDataSet.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/QueryDataSet.java similarity index 64% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/QueryDataSet.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/QueryDataSet.java index e805bda303c..38f348eb4df 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/dataset/QueryDataSet.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/dataset/QueryDataSet.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.tsfile.read.query.dataset; +package org.apache.iotdb.tsfile.read.query.dataset; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/ExecutorWithTimeGenerator.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/ExecutorWithTimeGenerator.java similarity index 64% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/ExecutorWithTimeGenerator.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/ExecutorWithTimeGenerator.java index 48e6c27549f..a10f6d5df3c 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/ExecutorWithTimeGenerator.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/ExecutorWithTimeGenerator.java @@ -1,18 +1,29 @@ -package cn.edu.tsinghua.tsfile.read.query.executor; +package org.apache.iotdb.tsfile.read.query.executor; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerier; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.DataSetWithTimeGenerator; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.TimeGenerator; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.TimeGeneratorImpl; -import cn.edu.tsinghua.tsfile.read.reader.series.SeriesReaderByTimestamp; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.DataSetWithTimeGenerator; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGenerator; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGeneratorImpl; +import org.apache.iotdb.tsfile.read.reader.series.SeriesReaderByTimestamp; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.query.timegenerator.TimeGeneratorImpl; +import org.apache.iotdb.tsfile.read.reader.series.SeriesReaderByTimestamp; import java.io.IOException; import java.util.ArrayList; diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutor.java new file mode 100644 index 00000000000..cca0e861a02 --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutor.java @@ -0,0 +1,13 @@ +package org.apache.iotdb.tsfile.read.query.executor; + +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; + +import java.io.IOException; + + +public interface QueryExecutor { + + QueryDataSet execute(QueryExpression queryExpression) throws IOException; +} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/TsFileExecutor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/TsFileExecutor.java similarity index 61% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/TsFileExecutor.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/TsFileExecutor.java index bdf57f5eb1c..6692dfd8c1f 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/executor/TsFileExecutor.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/executor/TsFileExecutor.java @@ -1,20 +1,35 @@ -package cn.edu.tsinghua.tsfile.read.query.executor; +package org.apache.iotdb.tsfile.read.query.executor; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.exception.filter.QueryFilterOptimizationException; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.util.ExpressionOptimizer; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerier; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.DataSetWithoutTimeGenerator; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.util.ExpressionOptimizer; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.DataSetWithoutTimeGenerator; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.util.ExpressionOptimizer; +import org.apache.iotdb.tsfile.read.query.dataset.DataSetWithoutTimeGenerator; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; import java.io.IOException; import java.util.ArrayList; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGenerator.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGenerator.java similarity index 77% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGenerator.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGenerator.java index c4e1f3e447f..ce89dccfc48 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGenerator.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGenerator.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorImpl.java similarity index 60% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorImpl.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorImpl.java index 010525a9ef1..88c29e6833e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorImpl.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorImpl.java @@ -1,20 +1,34 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.expression.ExpressionType; -import cn.edu.tsinghua.tsfile.read.expression.IBinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerier; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.AndNode; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.LeafNode; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.Node; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.OrNode; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.AndNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.LeafNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.OrNode; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerier; +import org.apache.iotdb.tsfile.read.expression.ExpressionType; +import org.apache.iotdb.tsfile.read.expression.IBinaryExpression; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.AndNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.OrNode; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; import java.io.IOException; import java.util.ArrayList; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/AndNode.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/AndNode.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/AndNode.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/AndNode.java index b8161dd454c..9606c24bdcd 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/AndNode.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/AndNode.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator.node; +package org.apache.iotdb.tsfile.read.query.timegenerator.node; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/LeafNode.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/LeafNode.java similarity index 79% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/LeafNode.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/LeafNode.java index 7d4678c8c3f..b85001afd29 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/LeafNode.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/LeafNode.java @@ -1,7 +1,9 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator.node; +package org.apache.iotdb.tsfile.read.query.timegenerator.node; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/Node.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/Node.java similarity index 72% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/Node.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/Node.java index 392e6db3aa4..107aa898f5e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/Node.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/Node.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator.node; +package org.apache.iotdb.tsfile.read.query.timegenerator.node; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/NodeType.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/NodeType.java similarity index 54% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/NodeType.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/NodeType.java index 91e57320e32..c6f7b8fa999 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/NodeType.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/NodeType.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator.node; +package org.apache.iotdb.tsfile.read.query.timegenerator.node; /** * @author Jinrui Zhang diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/OrNode.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/OrNode.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/OrNode.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/OrNode.java index 6a8c96d5903..6a63ee06d89 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/node/OrNode.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/query/timegenerator/node/OrNode.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator.node; +package org.apache.iotdb.tsfile.read.query.timegenerator.node; import java.io.IOException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/DefaultTsFileInput.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/DefaultTsFileInput.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/DefaultTsFileInput.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/DefaultTsFileInput.java index cf0e4ea03de..51b5c06c6df 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/DefaultTsFileInput.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/DefaultTsFileInput.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.reader; +package org.apache.iotdb.tsfile.read.reader; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/TsFileInput.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/TsFileInput.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/TsFileInput.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/TsFileInput.java index 2e8048b9430..b5e0a8124d4 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/TsFileInput.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/TsFileInput.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.read.reader; +package org.apache.iotdb.tsfile.read.reader; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java similarity index 74% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java index ae30a9ba79e..1793791872d 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java @@ -1,16 +1,23 @@ -package cn.edu.tsinghua.tsfile.read.reader.chunk; +package org.apache.iotdb.tsfile.read.reader.chunk; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.compress.UnCompressor; -import cn.edu.tsinghua.tsfile.encoding.decoder.Decoder; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.page.PageReader; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.compress.UnCompressor; +import org.apache.iotdb.tsfile.encoding.decoder.Decoder; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.page.PageReader; +import org.apache.iotdb.tsfile.compress.UnCompressor; +import org.apache.iotdb.tsfile.encoding.decoder.Decoder; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.reader.page.PageReader; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java similarity index 74% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java index 7daa7890429..10cfa47d765 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderByTimestamp.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.reader.chunk; +package org.apache.iotdb.tsfile.read.reader.chunk; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; public class ChunkReaderByTimestamp extends ChunkReader { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithFilter.java similarity index 69% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithFilter.java index 6fcfc61f499..105c7d1279b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithFilter.java @@ -1,9 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.reader.chunk; +package org.apache.iotdb.tsfile.read.reader.chunk; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; public class ChunkReaderWithFilter extends ChunkReader { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java similarity index 58% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java index 5cb85123b28..d7d383cc0ba 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReaderWithoutFilter.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.reader.chunk; +package org.apache.iotdb.tsfile.read.reader.chunk; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.file.header.PageHeader; public class ChunkReaderWithoutFilter extends ChunkReader { diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/page/PageReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/PageReader.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/page/PageReader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/PageReader.java index 1284d8f8613..c553e415c48 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/page/PageReader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/page/PageReader.java @@ -1,12 +1,15 @@ -package cn.edu.tsinghua.tsfile.read.reader.page; +package org.apache.iotdb.tsfile.read.reader.page; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.decoder.Decoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.decoder.Decoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.encoding.decoder.Decoder; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import java.io.IOException; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReader.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReader.java index 35c88ac7775..b612320d4a4 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReader.java @@ -1,9 +1,11 @@ -package cn.edu.tsinghua.tsfile.read.reader.series; +package org.apache.iotdb.tsfile.read.reader.series; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithFilter.java similarity index 68% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithFilter.java index 21fa8a5458e..326c1f785af 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithFilter.java @@ -1,12 +1,14 @@ -package cn.edu.tsinghua.tsfile.read.reader.series; +package org.apache.iotdb.tsfile.read.reader.series; -import cn.edu.tsinghua.tsfile.common.constant.StatisticConstant; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.filter.DigestForFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReaderWithFilter; +import org.apache.iotdb.tsfile.common.constant.StatisticConstant; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.filter.DigestForFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderWithFilter; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java similarity index 62% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java index 1198b36451a..e3dea5d2abb 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/FileSeriesReaderWithoutFilter.java @@ -1,9 +1,12 @@ -package cn.edu.tsinghua.tsfile.read.reader.series; +package org.apache.iotdb.tsfile.read.reader.series; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReaderWithoutFilter; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderWithoutFilter; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderWithoutFilter; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/SeriesReaderByTimestamp.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/SeriesReaderByTimestamp.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/SeriesReaderByTimestamp.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/SeriesReaderByTimestamp.java index f47dd3b8cf8..4982f712f5d 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/read/reader/series/SeriesReaderByTimestamp.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/series/SeriesReaderByTimestamp.java @@ -1,12 +1,15 @@ -package cn.edu.tsinghua.tsfile.read.reader.series; +package org.apache.iotdb.tsfile.read.reader.series; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReader; -import cn.edu.tsinghua.tsfile.read.reader.chunk.ChunkReaderByTimestamp; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReader; +import org.apache.iotdb.tsfile.read.reader.chunk.ChunkReaderByTimestamp; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Binary.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Binary.java similarity index 94% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Binary.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Binary.java index 9880998589a..e762c00970b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Binary.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Binary.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import java.io.Serializable; import java.nio.charset.Charset; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/BytesUtils.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/BytesUtils.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java index 353c12fb6b0..dc549f5a099 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/BytesUtils.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java @@ -1,6 +1,7 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Loader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Loader.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Loader.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Loader.java index d8863432bdf..fa3557dae83 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Loader.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Loader.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.io.IOException; import java.net.URL; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Pair.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Pair.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Pair.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Pair.java index e652ab79a82..edde85496e4 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/Pair.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/Pair.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; /** * Pair is a template class to represent a couple of values. It also override the Object basic diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/PublicBAOS.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/PublicBAOS.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/PublicBAOS.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/PublicBAOS.java index 57aca156c92..6269970633b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/PublicBAOS.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/PublicBAOS.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteForEncodingUtils.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteForEncodingUtils.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteForEncodingUtils.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteForEncodingUtils.java index cbf4fc76bd7..6947095d270 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteForEncodingUtils.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteForEncodingUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.io.IOException; import java.io.InputStream; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteIOUtils.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteIOUtils.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteIOUtils.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteIOUtils.java index 64d7cb29658..4bd8d83a595 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/ReadWriteIOUtils.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/ReadWriteIOUtils.java @@ -1,9 +1,13 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSFreqType; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSFreqType; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.TSFreqType; import java.io.*; import java.nio.ByteBuffer; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/StringContainer.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java similarity index 99% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/StringContainer.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java index 84a3bf47155..e25601a8935 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/utils/StringContainer.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.util.ArrayList; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/TsFileWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java similarity index 85% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/TsFileWriter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java index d12415d6e89..3905814e225 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/TsFileWriter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/TsFileWriter.java @@ -1,18 +1,31 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.exception.write.NoMeasurementException; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.JsonConverter; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkGroupWriter; -import cn.edu.tsinghua.tsfile.write.chunk.ChunkGroupWriterImpl; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.exception.write.NoMeasurementException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.JsonConverter; +import org.apache.iotdb.tsfile.write.chunk.IChunkGroupWriter; +import org.apache.iotdb.tsfile.write.chunk.ChunkGroupWriterImpl; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.write.NoMeasurementException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.chunk.ChunkGroupWriterImpl; +import org.apache.iotdb.tsfile.write.chunk.IChunkGroupWriter; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.JsonConverter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkBuffer.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkBuffer.java similarity index 88% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkBuffer.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkBuffer.java index 74694981a7a..1b48a732117 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkBuffer.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkBuffer.java @@ -1,13 +1,20 @@ -package cn.edu.tsinghua.tsfile.write.chunk; +package org.apache.iotdb.tsfile.write.chunk; -import cn.edu.tsinghua.tsfile.compress.Compressor; -import cn.edu.tsinghua.tsfile.exception.write.PageException; -import cn.edu.tsinghua.tsfile.file.header.PageHeader; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; -import cn.edu.tsinghua.tsfile.utils.PublicBAOS; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.compress.Compressor; +import org.apache.iotdb.tsfile.exception.write.PageException; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.utils.PublicBAOS; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.compress.Compressor; +import org.apache.iotdb.tsfile.exception.write.PageException; +import org.apache.iotdb.tsfile.file.header.PageHeader; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkGroupWriterImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkGroupWriterImpl.java similarity index 78% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkGroupWriterImpl.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkGroupWriterImpl.java index 257359739ea..121069fa79a 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkGroupWriterImpl.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkGroupWriterImpl.java @@ -1,19 +1,25 @@ -package cn.edu.tsinghua.tsfile.write.chunk; +package org.apache.iotdb.tsfile.write.chunk; import java.io.IOException; import java.util.HashMap; import java.util.List; import java.util.Map; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.exception.write.NoMeasurementException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.exception.write.NoMeasurementException; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.exception.write.NoMeasurementException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; /** * a implementation of IChunkGroupWriter diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkWriterImpl.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkWriterImpl.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java index 18ae990e1e1..5451e60133e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/ChunkWriterImpl.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/ChunkWriterImpl.java @@ -1,20 +1,26 @@ -package cn.edu.tsinghua.tsfile.write.chunk; +package org.apache.iotdb.tsfile.write.chunk; import java.io.IOException; import java.math.BigDecimal; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.write.page.PageWriter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.write.page.PageWriter; +import org.apache.iotdb.tsfile.exception.write.PageException; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.exception.write.PageException; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.exception.write.PageException; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; /** * diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkGroupWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkGroupWriter.java similarity index 74% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkGroupWriter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkGroupWriter.java index 82484812d69..b5c08b62e7e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkGroupWriter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkGroupWriter.java @@ -1,10 +1,15 @@ -package cn.edu.tsinghua.tsfile.write.chunk; +package org.apache.iotdb.tsfile.write.chunk; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import java.io.IOException; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkWriter.java similarity index 91% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkWriter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkWriter.java index f39abb63901..04841498a68 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/chunk/IChunkWriter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/chunk/IChunkWriter.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.tsfile.write.chunk; +package org.apache.iotdb.tsfile.write.chunk; + +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; import java.io.IOException; import java.math.BigDecimal; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; - /** * IChunkWriter provides a list of writing methods for different value types. * diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/page/PageWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/page/PageWriter.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/page/PageWriter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/page/PageWriter.java index b89b3c0be34..1addd372ce1 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/page/PageWriter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/page/PageWriter.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.tsfile.write.page; +package org.apache.iotdb.tsfile.write.page; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.PublicBAOS; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.PublicBAOS; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; import java.io.IOException; import java.math.BigDecimal; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/TSRecord.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/TSRecord.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/TSRecord.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/TSRecord.java index 8f6e42dbe6a..5fa239352a6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/TSRecord.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/TSRecord.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record; +package org.apache.iotdb.tsfile.write.record; -import cn.edu.tsinghua.tsfile.utils.StringContainer; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; import java.util.ArrayList; import java.util.List; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/BooleanDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/BooleanDataPoint.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/BooleanDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/BooleanDataPoint.java index 43a951c963b..26c32047cfb 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/BooleanDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/BooleanDataPoint.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DataPoint.java similarity index 91% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DataPoint.java index 754c7940c49..466b33af3a9 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DataPoint.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.StringContainer; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; import java.io.IOException; import java.math.BigDecimal; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DoubleDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DoubleDataPoint.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DoubleDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DoubleDataPoint.java index e6668864501..b2b18df9412 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/DoubleDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/DoubleDataPoint.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/FloatDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/FloatDataPoint.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/FloatDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/FloatDataPoint.java index 39597c8f407..3200cfeea40 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/FloatDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/FloatDataPoint.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/IntDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/IntDataPoint.java similarity index 77% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/IntDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/IntDataPoint.java index fa05f90b3d3..c40cb22367e 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/IntDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/IntDataPoint.java @@ -1,7 +1,9 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/LongDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/LongDataPoint.java similarity index 81% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/LongDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/LongDataPoint.java index 6dd19633a1f..f3eb822fb54 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/LongDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/LongDataPoint.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/StringDataPoint.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/StringDataPoint.java similarity index 82% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/StringDataPoint.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/StringDataPoint.java index d335eac3b8a..dd60deabec4 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/record/datapoint/StringDataPoint.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/record/datapoint/StringDataPoint.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.write.record.datapoint; +package org.apache.iotdb.tsfile.write.record.datapoint; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.chunk.IChunkWriter; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.write.chunk.IChunkWriter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/FileSchema.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/FileSchema.java similarity index 90% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/FileSchema.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/FileSchema.java index d6abd1b390a..fdd4f9844c6 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/FileSchema.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/FileSchema.java @@ -1,7 +1,9 @@ -package cn.edu.tsinghua.tsfile.write.schema; +package org.apache.iotdb.tsfile.write.schema; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/JsonConverter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/JsonConverter.java similarity index 89% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/JsonConverter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/JsonConverter.java index 6360f5d10b8..072948fa84b 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/JsonConverter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/JsonConverter.java @@ -1,12 +1,18 @@ -package cn.edu.tsinghua.tsfile.write.schema; +package org.apache.iotdb.tsfile.write.schema; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.encoding.encoder.TSEncodingBuilder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.iotdb.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/MeasurementSchema.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java similarity index 87% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/MeasurementSchema.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java index 1f6012e1ddb..54218d7b206 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/MeasurementSchema.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java @@ -1,16 +1,24 @@ -package cn.edu.tsinghua.tsfile.write.schema; +package org.apache.iotdb.tsfile.write.schema; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.exception.write.UnSupportedDataTypeException; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.compress.Compressor; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.TSEncodingBuilder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.compress.Compressor; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.compress.Compressor; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.TSEncodingBuilder; +import org.apache.iotdb.tsfile.exception.write.UnSupportedDataTypeException; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/SchemaBuilder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/SchemaBuilder.java similarity index 83% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/SchemaBuilder.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/SchemaBuilder.java index 4b5de85bb60..88cd31a082d 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/schema/SchemaBuilder.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/SchemaBuilder.java @@ -1,8 +1,11 @@ -package cn.edu.tsinghua.tsfile.write.schema; +package org.apache.iotdb.tsfile.write.schema; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.util.Map; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/DefaultTsFileOutput.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java similarity index 96% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/DefaultTsFileOutput.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java index 39dfa9581ea..96145d0d428 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/DefaultTsFileOutput.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/DefaultTsFileOutput.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.write.writer; +package org.apache.iotdb.tsfile.write.writer; import sun.reflect.generics.reflectiveObjects.NotImplementedException; diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/IDataWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/IDataWriter.java new file mode 100644 index 00000000000..1ed6d4d6d35 --- /dev/null +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/IDataWriter.java @@ -0,0 +1,4 @@ +package org.apache.iotdb.tsfile.write.writer; + +public interface IDataWriter { +} diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileIOWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java similarity index 84% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileIOWriter.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java index eed9affebec..30b78ba9d98 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileIOWriter.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java @@ -1,25 +1,35 @@ -package cn.edu.tsinghua.tsfile.write.writer; +package org.apache.iotdb.tsfile.write.writer; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.constant.StatisticConstant; -import cn.edu.tsinghua.tsfile.file.MetaMarker; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkGroupMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadata; -import cn.edu.tsinghua.tsfile.file.metadata.TsDeviceMetadataIndex; -import cn.edu.tsinghua.tsfile.file.metadata.TsDigest; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.utils.PublicBAOS; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.constant.StatisticConstant; +import org.apache.iotdb.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.ChunkGroupMetaData; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadata; +import org.apache.iotdb.tsfile.file.metadata.TsDeviceMetadataIndex; +import org.apache.iotdb.tsfile.file.metadata.TsDigest; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.utils.PublicBAOS; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.constant.StatisticConstant; +import org.apache.iotdb.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.*; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileOutput.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileOutput.java similarity index 97% rename from tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileOutput.java rename to tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileOutput.java index 97408907aa8..29886a1a0da 100644 --- a/tsfile/src/main/java/cn/edu/tsinghua/tsfile/write/writer/TsFileOutput.java +++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileOutput.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.write.writer; +package org.apache.iotdb.tsfile.write.writer; import java.io.IOException; import java.io.OutputStream; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/common/LRUCacheTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/common/LRUCacheTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/common/LRUCacheTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/common/LRUCacheTest.java index 9d7ea0fb57c..29b9b797ecb 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/common/LRUCacheTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/common/LRUCacheTest.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.common; +package org.apache.iotdb.tsfile.common; -import cn.edu.tsinghua.tsfile.common.cache.LRUCache; +import org.apache.iotdb.tsfile.common.cache.LRUCache; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/CompressTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/compress/CompressTest.java similarity index 84% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/CompressTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/compress/CompressTest.java index 823dc42cf40..e19ad49f086 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/CompressTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/compress/CompressTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.compress; +package org.apache.iotdb.tsfile.compress; -import cn.edu.tsinghua.tsfile.utils.PublicBAOS; -import cn.edu.tsinghua.tsfile.compress.UnCompressor.SnappyUnCompressor; +import org.apache.iotdb.tsfile.utils.PublicBAOS; +import org.apache.iotdb.tsfile.compress.UnCompressor.SnappyUnCompressor; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -35,7 +35,7 @@ public class CompressTest { PublicBAOS out = new PublicBAOS(); out.write(inputString.getBytes("UTF-8")); Compressor.SnappyCompressor compressor = new Compressor.SnappyCompressor(); - SnappyUnCompressor unCompressor = new SnappyUnCompressor(); + UnCompressor.SnappyUnCompressor unCompressor = new UnCompressor.SnappyUnCompressor(); byte[] compressed = compressor.compress(out.getBuf()); byte[] uncompressed = unCompressor.uncompress(compressed); String result = new String(uncompressed, "UTF-8"); @@ -46,7 +46,7 @@ public class CompressTest { PublicBAOS out = new PublicBAOS(); out.write(inputString.getBytes("UTF-8")); Compressor.SnappyCompressor compressor = new Compressor.SnappyCompressor(); - SnappyUnCompressor unCompressor = new SnappyUnCompressor(); + UnCompressor.SnappyUnCompressor unCompressor = new UnCompressor.SnappyUnCompressor(); byte[] compressed = new byte[compressor.getMaxBytesForCompression(out.size())]; int size = compressor.compress(out.getBuf(),0, out.size(), compressed); byte[] bytes = Arrays.copyOfRange(compressed, 0, size); diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/SnappyTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/compress/SnappyTest.java similarity index 95% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/SnappyTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/compress/SnappyTest.java index 9bf74eb5fb4..11cdcc4cdaa 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/compress/SnappyTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/compress/SnappyTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.compress; +package org.apache.iotdb.tsfile.compress; -import cn.edu.tsinghua.tsfile.utils.ReadWriteIOUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteIOUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/constant/TimeseriesTestConstant.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/constant/TimeseriesTestConstant.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/constant/TimeseriesTestConstant.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/constant/TimeseriesTestConstant.java index 7fa111fc0c4..aed63d23405 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/constant/TimeseriesTestConstant.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/constant/TimeseriesTestConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.constant; +package org.apache.iotdb.tsfile.constant; import java.util.Random; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPackerTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPackerTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPackerTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPackerTest.java index aa8f0c5251c..c728ecffbbd 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/IntPackerTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/IntPackerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.bitpacking; +package org.apache.iotdb.tsfile.encoding.bitpacking; import static org.junit.Assert.assertEquals; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPackerTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPackerTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPackerTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPackerTest.java index a6a6bbc3ae9..588f11d6989 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/bitpacking/LongPackerTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/bitpacking/LongPackerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.bitpacking; +package org.apache.iotdb.tsfile.encoding.bitpacking; import static org.junit.Assert.*; @@ -10,7 +10,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Random; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoderTest.java similarity index 83% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoderTest.java index f81c3e235a8..8b55e61ed2e 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/BitmapDecoderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/BitmapDecoderTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import static org.junit.Assert.*; @@ -7,9 +7,12 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.encoder.BitmapEncoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.BitmapEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.BitmapEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoderTest.java similarity index 92% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoderTest.java index 71eb5abf2da..bd9b25262d9 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/FloatDecoderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoderTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import static org.junit.Assert.*; @@ -7,10 +7,14 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.FloatEncoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.FloatEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.FloatEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoderTest.java similarity index 93% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoderTest.java index 1669edba745..e23b6113ba6 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/GorillaDecoderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/GorillaDecoderTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import static org.junit.Assert.*; @@ -8,15 +8,18 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; +import org.apache.iotdb.tsfile.encoding.encoder.DoublePrecisionEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.SinglePrecisionEncoder; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import cn.edu.tsinghua.tsfile.encoding.encoder.DoublePrecisionEncoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.SinglePrecisionEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.DoublePrecisionEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.encoding.encoder.SinglePrecisionEncoder; public class GorillaDecoderTest { private static final Logger LOGGER = LoggerFactory.getLogger(GorillaDecoderTest.class); diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoderTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoderTest.java index f0d7a395b47..e7f8546162a 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/IntRleDecoderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/IntRleDecoderTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import static org.junit.Assert.*; @@ -9,10 +9,13 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.encoder.IntRleEncoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.RleEncoder; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.IntRleEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.RleEncoder; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.IntRleEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.RleEncoder; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoderTest.java similarity index 88% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoderTest.java index dbe2cd645e8..40df3c30a9f 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/LongRleDecoderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/LongRleDecoderTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder; +package org.apache.iotdb.tsfile.encoding.decoder; import static org.junit.Assert.*; @@ -9,14 +9,17 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.encoder.RleEncoder; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.RleEncoder; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.encoder.LongRleEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.RleEncoder; import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.encoding.encoder.LongRleEncoder; +import org.apache.iotdb.tsfile.encoding.encoder.LongRleEncoder; public class LongRleDecoderTest { private List rleList; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java similarity index 88% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java index b4b93a6256d..983da72ccfe 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderIntegerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder.delta; +package org.apache.iotdb.tsfile.encoding.decoder.delta; import static org.junit.Assert.assertEquals; @@ -7,8 +7,10 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.Random; -import cn.edu.tsinghua.tsfile.encoding.decoder.DeltaBinaryDecoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java similarity index 88% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java index da4a9efe2c1..96b038fa182 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/encoding/decoder/delta/DeltaBinaryEncoderLongTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.encoding.decoder.delta; +package org.apache.iotdb.tsfile.encoding.decoder.delta; import static org.junit.Assert.assertEquals; @@ -7,8 +7,10 @@ import java.io.IOException; import java.nio.ByteBuffer; import java.util.Random; -import cn.edu.tsinghua.tsfile.encoding.decoder.DeltaBinaryDecoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; +import org.apache.iotdb.tsfile.encoding.decoder.DeltaBinaryDecoder; +import org.apache.iotdb.tsfile.encoding.encoder.DeltaBinaryEncoder; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaDataTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaDataTest.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaDataTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaDataTest.java index 18026963511..2c82c136844 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkGroupMetaDataTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkGroupMetaDataTest.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; import java.io.*; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; import org.junit.After; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaDataTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaDataTest.java similarity index 83% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaDataTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaDataTest.java index 487b2d01e6c..e8bd982f53f 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/ChunkMetaDataTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/ChunkMetaDataTest.java @@ -1,8 +1,9 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; -import cn.edu.tsinghua.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TimeSeriesMetadataTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TimeSeriesMetadataTest.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TimeSeriesMetadataTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TimeSeriesMetadataTest.java index 426482cbd28..a7c41b5cb28 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TimeSeriesMetadataTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TimeSeriesMetadataTest.java @@ -1,12 +1,13 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndexTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndexTest.java similarity index 92% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndexTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndexTest.java index 2a52074e163..c15438e8565 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataIndexTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataIndexTest.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.utils.Utils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataTest.java similarity index 86% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataTest.java index 053ea5cb4f6..3fba4ea0cb1 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsDeviceMetadataTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsDeviceMetadataTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; -import cn.edu.tsinghua.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.file.metadata.utils.Utils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaDataTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaDataTest.java similarity index 84% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaDataTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaDataTest.java index a31d10093f0..11db354f4a2 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/TsFileMetaDataTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/TsFileMetaDataTest.java @@ -1,7 +1,9 @@ -package cn.edu.tsinghua.tsfile.file.metadata; +package org.apache.iotdb.tsfile.file.metadata; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; -import cn.edu.tsinghua.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.file.metadata.utils.Utils; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.file.metadata.utils.Utils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatisticsTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatisticsTest.java index d23c223fc37..1efed9eb496 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/BooleanStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/BooleanStatisticsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatisticsTest.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatisticsTest.java index 1ae02958e47..f676ce25e35 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/DoubleStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/DoubleStatisticsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import static org.junit.Assert.assertEquals; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatisticsTest.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatisticsTest.java index 0ad8814af90..88715878689 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/FloatStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/FloatStatisticsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import static org.junit.Assert.assertEquals; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatisticsTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatisticsTest.java index 1d09e4951ea..aff79409084 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/IntegerStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/IntegerStatisticsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import static org.junit.Assert.assertEquals; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatisticsTest.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatisticsTest.java index 5eee5e2f258..19ffe93a26d 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/LongStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/LongStatisticsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; import static org.junit.Assert.*; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StringStatisticsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/StringStatisticsTest.java similarity index 94% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StringStatisticsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/StringStatisticsTest.java index 4b3df1375c4..8d762370944 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/statistics/StringStatisticsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/statistics/StringStatisticsTest.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.file.metadata.statistics; +package org.apache.iotdb.tsfile.file.metadata.statistics; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Binary; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/TestHelper.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/TestHelper.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/TestHelper.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/TestHelper.java index 3f95a6d7229..017f7cf50ce 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/TestHelper.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/TestHelper.java @@ -1,10 +1,13 @@ -package cn.edu.tsinghua.tsfile.file.metadata.utils; +package org.apache.iotdb.tsfile.file.metadata.utils; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.file.metadata.*; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.file.metadata.*; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.*; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; import java.nio.ByteBuffer; import java.util.ArrayList; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/Utils.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java similarity index 95% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/Utils.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java index e2f57923252..25f564d79f0 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/file/metadata/utils/Utils.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/file/metadata/utils/Utils.java @@ -1,7 +1,8 @@ -package cn.edu.tsinghua.tsfile.file.metadata.utils; +package org.apache.iotdb.tsfile.file.metadata.utils; -import cn.edu.tsinghua.tsfile.file.metadata.*; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.*; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.file.metadata.*; import java.nio.ByteBuffer; import java.util.List; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFileTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFileTest.java similarity index 76% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFileTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFileTest.java index b23410d7cea..5cd74ba9771 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadOnlyTsFileTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadOnlyTsFileTest.java @@ -1,21 +1,21 @@ -package cn.edu.tsinghua.tsfile.read; +package org.apache.iotdb.tsfile.read; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java similarity index 91% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java index 3c797a70c7b..a662269c6dc 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/ReadTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/ReadTest.java @@ -1,19 +1,19 @@ -package cn.edu.tsinghua.tsfile.read; +package org.apache.iotdb.tsfile.read; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.utils.FileGenerator; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.utils.FileGenerator; import org.junit.*; import java.io.IOException; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/TimePlainEncodeReadTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/TimePlainEncodeReadTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java index e3e9672cad8..9b06de67f8e 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/TimePlainEncodeReadTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/TimePlainEncodeReadTest.java @@ -1,20 +1,20 @@ -package cn.edu.tsinghua.tsfile.read; +package org.apache.iotdb.tsfile.read; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.Field; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.utils.FileGenerator; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Field; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.utils.FileGenerator; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/common/PathTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/common/PathTest.java similarity index 95% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/common/PathTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/common/PathTest.java index ce88b7307c2..81337e3fb38 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/common/PathTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/common/PathTest.java @@ -1,6 +1,6 @@ -package cn.edu.tsinghua.tsfile.read.common; +package org.apache.iotdb.tsfile.read.common; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.Path; import org.junit.Test; import static org.junit.Assert.*; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderTest.java similarity index 72% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderTest.java index be965900cd4..131cd25fe38 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/ChunkLoaderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/ChunkLoaderTest.java @@ -1,13 +1,14 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.common.Chunk; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.common.Chunk; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImplTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImplTest.java similarity index 76% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImplTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImplTest.java index 62a0fa04505..c8f95007601 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/controller/MetadataQuerierByFileImplTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/controller/MetadataQuerierByFileImplTest.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.tsfile.read.controller; +package org.apache.iotdb.tsfile.read.controller; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/DigestFilterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/DigestFilterTest.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/DigestFilterTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/DigestFilterTest.java index 639e14361ac..bfc45f7a691 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/DigestFilterTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/DigestFilterTest.java @@ -1,9 +1,9 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.utils.BytesUtils; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.utils.BytesUtils; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/IExpressionOptimizerTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/IExpressionOptimizerTest.java similarity index 93% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/IExpressionOptimizerTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/IExpressionOptimizerTest.java index cb7bfc5a4a3..4c6d4e30eea 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/IExpressionOptimizerTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/IExpressionOptimizerTest.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.exception.filter.QueryFilterOptimizationException; -import cn.edu.tsinghua.tsfile.read.expression.util.ExpressionOptimizer; -import cn.edu.tsinghua.tsfile.read.expression.util.ExpressionPrinter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.exception.filter.QueryFilterOptimizationException; +import org.apache.iotdb.tsfile.read.expression.util.ExpressionOptimizer; +import org.apache.iotdb.tsfile.read.expression.util.ExpressionPrinter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.common.Path; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/MinTimeMaxTimeFilterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/MinTimeMaxTimeFilterTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/MinTimeMaxTimeFilterTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/MinTimeMaxTimeFilterTest.java index d98bb4d8426..a034f5daee2 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/MinTimeMaxTimeFilterTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/MinTimeMaxTimeFilterTest.java @@ -1,7 +1,7 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/OperatorTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/OperatorTest.java similarity index 96% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/OperatorTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/OperatorTest.java index 59177034970..701eabaaa81 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/filter/OperatorTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/filter/OperatorTest.java @@ -1,8 +1,8 @@ -package cn.edu.tsinghua.tsfile.read.filter; +package org.apache.iotdb.tsfile.read.filter; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutorTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java similarity index 79% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutorTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java index 7b8be6af409..b0e24c681ba 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/executor/QueryExecutorTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/executor/QueryExecutorTest.java @@ -1,25 +1,25 @@ -package cn.edu.tsinghua.tsfile.read.query.executor; +package org.apache.iotdb.tsfile.read.query.executor; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.GlobalTimeExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.GlobalTimeExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/NodeTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/NodeTest.java similarity index 86% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/NodeTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/NodeTest.java index d2e87782f7f..97e521da744 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/NodeTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/NodeTest.java @@ -1,13 +1,13 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.AndNode; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.LeafNode; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.Node; -import cn.edu.tsinghua.tsfile.read.query.timegenerator.node.OrNode; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.AndNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.LeafNode; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.Node; +import org.apache.iotdb.tsfile.read.query.timegenerator.node.OrNode; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/ReaderByTimestampTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/ReaderByTimestampTest.java similarity index 78% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/ReaderByTimestampTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/ReaderByTimestampTest.java index c101075ec92..70f601619d2 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/ReaderByTimestampTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/ReaderByTimestampTest.java @@ -1,16 +1,16 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.SeriesReaderByTimestamp; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.SeriesReaderByTimestamp; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorTest.java similarity index 66% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorTest.java index 1dc03943727..8ba636f32bd 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TimeGeneratorTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TimeGeneratorTest.java @@ -1,21 +1,21 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.expression.IExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.BinaryExpression; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoader; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.expression.IExpression; +import org.apache.iotdb.tsfile.read.expression.impl.BinaryExpression; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.controller.ChunkLoader; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java index 9476573027c..5228f38db87 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/query/timegenerator/TsFileGeneratorForSeriesReaderByTimestamp.java @@ -1,17 +1,17 @@ -package cn.edu.tsinghua.tsfile.read.query.timegenerator; +package org.apache.iotdb.tsfile.read.query.timegenerator; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.FileUtils; -import cn.edu.tsinghua.tsfile.utils.FileUtils.Unit; -import cn.edu.tsinghua.tsfile.utils.RecordUtils; -import cn.edu.tsinghua.tsfile.write.TsFileWriter; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.FileUtils; +import org.apache.iotdb.tsfile.utils.FileUtils.Unit; +import org.apache.iotdb.tsfile.utils.RecordUtils; +import org.apache.iotdb.tsfile.write.TsFileWriter; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Ignore; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/PageReaderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/PageReaderTest.java similarity index 93% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/PageReaderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/PageReaderTest.java index e3c1707c675..1485b77fa11 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/PageReaderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/PageReaderTest.java @@ -1,14 +1,14 @@ -package cn.edu.tsinghua.tsfile.read.reader; +package org.apache.iotdb.tsfile.read.reader; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.decoder.*; -import cn.edu.tsinghua.tsfile.encoding.encoder.*; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.page.PageReader; -import cn.edu.tsinghua.tsfile.write.page.PageWriter; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.decoder.*; +import org.apache.iotdb.tsfile.encoding.encoder.*; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.page.PageReader; +import org.apache.iotdb.tsfile.write.page.PageWriter; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/ReaderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/ReaderTest.java similarity index 74% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/ReaderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/ReaderTest.java index f7dfd96b77c..f639cda99ba 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/read/reader/ReaderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/read/reader/ReaderTest.java @@ -1,22 +1,22 @@ -package cn.edu.tsinghua.tsfile.read.reader; +package org.apache.iotdb.tsfile.read.reader; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.read.filter.TimeFilter; -import cn.edu.tsinghua.tsfile.read.filter.ValueFilter; -import cn.edu.tsinghua.tsfile.read.filter.basic.Filter; -import cn.edu.tsinghua.tsfile.read.expression.impl.SingleSeriesExpression; -import cn.edu.tsinghua.tsfile.read.filter.factory.FilterFactory; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.file.metadata.ChunkMetaData; -import cn.edu.tsinghua.tsfile.read.controller.MetadataQuerierByFileImpl; -import cn.edu.tsinghua.tsfile.read.controller.ChunkLoaderImpl; -import cn.edu.tsinghua.tsfile.read.common.BatchData; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReader; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithFilter; -import cn.edu.tsinghua.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.utils.TsFileGeneratorForTest; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.read.filter.TimeFilter; +import org.apache.iotdb.tsfile.read.filter.ValueFilter; +import org.apache.iotdb.tsfile.read.filter.basic.Filter; +import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression; +import org.apache.iotdb.tsfile.read.filter.factory.FilterFactory; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.file.metadata.ChunkMetaData; +import org.apache.iotdb.tsfile.read.controller.MetadataQuerierByFileImpl; +import org.apache.iotdb.tsfile.read.controller.ChunkLoaderImpl; +import org.apache.iotdb.tsfile.read.common.BatchData; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReader; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithFilter; +import org.apache.iotdb.tsfile.read.reader.series.FileSeriesReaderWithoutFilter; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.utils.TsFileGeneratorForTest; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/BytesUtilsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java similarity index 99% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/BytesUtilsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java index 16e184c55e6..454276478e4 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/BytesUtilsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/BytesUtilsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/CommonTestConstant.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/CommonTestConstant.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/CommonTestConstant.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/CommonTestConstant.java index 073773a5ef9..6f56fdeb567 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/CommonTestConstant.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/CommonTestConstant.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.util.Random; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileGenerator.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileGenerator.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileGenerator.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileGenerator.java index 33d9395b718..c8d1a39bc0e 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileGenerator.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileGenerator.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.FileUtils.Unit; -import cn.edu.tsinghua.tsfile.write.TsFileWriter; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.FileUtils.Unit; +import org.apache.iotdb.tsfile.write.TsFileWriter; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; @@ -217,8 +217,8 @@ public class FileGenerator { in.close(); endTime = System.currentTimeMillis(); LOG.info("write total:{},use time:{}s", lineCount, (endTime - startTime) / 1000); - LOG.info("src file size:{}GB", FileUtils.getLocalFileByte(inputDataFile, Unit.GB)); - LOG.info("src file size:{}MB", FileUtils.getLocalFileByte(outputDataFile, Unit.MB)); + LOG.info("src file size:{}GB", FileUtils.getLocalFileByte(inputDataFile, FileUtils.Unit.GB)); + LOG.info("src file size:{}MB", FileUtils.getLocalFileByte(outputDataFile, FileUtils.Unit.MB)); } static private Scanner getDataFile(String path) { diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtils.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtils.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtils.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtils.java index 8f850ca95c6..968aa1baa32 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtils.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtils.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import java.io.File; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtilsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtilsTest.java similarity index 54% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtilsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtilsTest.java index 1e85409b434..acd265490dd 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/FileUtilsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/FileUtilsTest.java @@ -1,10 +1,12 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import static org.junit.Assert.assertEquals; +import org.apache.iotdb.tsfile.constant.TimeseriesTestConstant; +import org.junit.Assert; import org.junit.Test; -import cn.edu.tsinghua.tsfile.constant.TimeseriesTestConstant; -import cn.edu.tsinghua.tsfile.utils.FileUtils.Unit; +import org.apache.iotdb.tsfile.constant.TimeseriesTestConstant; +import org.apache.iotdb.tsfile.utils.FileUtils.Unit; /** * @author kangrong @@ -16,23 +18,23 @@ public class FileUtilsTest { long kb = 3 * 1024; long mb = kb * 1024; long gb = mb * 1024; - assertEquals(3.0 * 1024, FileUtils.transformUnit(kb, Unit.B), + Assert.assertEquals(3.0 * 1024, FileUtils.transformUnit(kb, FileUtils.Unit.B), TimeseriesTestConstant.double_min_delta); - assertEquals(3, FileUtils.transformUnit(kb, Unit.KB), + assertEquals(3, FileUtils.transformUnit(kb, FileUtils.Unit.KB), TimeseriesTestConstant.double_min_delta); - assertEquals(3, FileUtils.transformUnit(mb, Unit.MB), + assertEquals(3, FileUtils.transformUnit(mb, FileUtils.Unit.MB), TimeseriesTestConstant.double_min_delta); - assertEquals(3, FileUtils.transformUnit(gb, Unit.GB), + assertEquals(3, FileUtils.transformUnit(gb, FileUtils.Unit.GB), TimeseriesTestConstant.double_min_delta); } @Test public void testConvertToByte() { - assertEquals(3l, (long) FileUtils.transformUnitToByte(3, Unit.B)); - assertEquals(3l * 1024, (long) FileUtils.transformUnitToByte(3, Unit.KB)); - assertEquals(3l * 1024 * 1024, (long) FileUtils.transformUnitToByte(3, Unit.MB)); - assertEquals(3l * 1024 * 1024 * 1024, (long) FileUtils.transformUnitToByte(3, Unit.GB)); + assertEquals(3l, (long) FileUtils.transformUnitToByte(3, FileUtils.Unit.B)); + assertEquals(3l * 1024, (long) FileUtils.transformUnitToByte(3, FileUtils.Unit.KB)); + assertEquals(3l * 1024 * 1024, (long) FileUtils.transformUnitToByte(3, FileUtils.Unit.MB)); + assertEquals(3l * 1024 * 1024 * 1024, (long) FileUtils.transformUnitToByte(3, FileUtils.Unit.GB)); } } diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/PairTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/PairTest.java similarity index 95% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/PairTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/PairTest.java index 2d20f04e207..727474630e0 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/PairTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/PairTest.java @@ -1,11 +1,11 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import static org.junit.Assert.*; import java.util.HashMap; import java.util.Map; -import cn.edu.tsinghua.tsfile.utils.Pair; +import org.apache.iotdb.tsfile.utils.Pair; import org.junit.Test; public class PairTest { diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteStreamUtilsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteStreamUtilsTest.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteStreamUtilsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteStreamUtilsTest.java index 168b79d780a..7692eea730e 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteStreamUtilsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteStreamUtilsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import static org.junit.Assert.*; @@ -9,7 +9,7 @@ import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteToBytesUtilsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteToBytesUtilsTest.java similarity index 97% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteToBytesUtilsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteToBytesUtilsTest.java index 3cda61f2ab7..4a74d5e3dd2 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/ReadWriteToBytesUtilsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/ReadWriteToBytesUtilsTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtils.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtils.java similarity index 91% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtils.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtils.java index dd3a84944d6..e57b6c0b1de 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtils.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtils.java @@ -1,10 +1,10 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.record.datapoint.*; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.record.datapoint.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtilsTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtilsTest.java similarity index 92% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtilsTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtilsTest.java index fac79846bce..6826e1d2103 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/RecordUtilsTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/RecordUtilsTest.java @@ -1,14 +1,14 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.datapoint.DataPoint; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.datapoint.DataPoint; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Before; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/StringContainerTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/StringContainerTest.java similarity index 99% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/StringContainerTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/StringContainerTest.java index 417768c01c5..16ee4b694bc 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/StringContainerTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/StringContainerTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; import static org.junit.Assert.*; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/TsFileGeneratorForTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/TsFileGeneratorForTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/TsFileGeneratorForTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/utils/TsFileGeneratorForTest.java index f33c0dee7b7..0a1c0f475fb 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/utils/TsFileGeneratorForTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/utils/TsFileGeneratorForTest.java @@ -1,18 +1,18 @@ -package cn.edu.tsinghua.tsfile.utils; +package org.apache.iotdb.tsfile.utils; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.encoding.encoder.Encoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.FileUtils.Unit; -import cn.edu.tsinghua.tsfile.write.TsFileWriter; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.SchemaBuilder; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.encoding.encoder.Encoder; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.FileUtils.Unit; +import org.apache.iotdb.tsfile.write.TsFileWriter; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.SchemaBuilder; import org.json.JSONArray; import org.json.JSONObject; import org.junit.Ignore; @@ -228,8 +228,8 @@ public class TsFileGeneratorForTest { in.close(); endTime = System.currentTimeMillis(); LOG.info("write total:{},use time:{}s", lineCount, (endTime - startTime) / 1000); - LOG.info("src file size:{}GB", FileUtils.getLocalFileByte(inputDataFile, Unit.GB)); - LOG.info("out file size:{}MB", FileUtils.getLocalFileByte(outputDataFile, Unit.MB)); + LOG.info("src file size:{}GB", FileUtils.getLocalFileByte(inputDataFile, FileUtils.Unit.GB)); + LOG.info("out file size:{}MB", FileUtils.getLocalFileByte(outputDataFile, FileUtils.Unit.MB)); } static private Scanner getDataFile(String path) { diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/PerfTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/PerfTest.java similarity index 92% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/PerfTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/PerfTest.java index 53f1de9b50c..9de03a37c30 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/PerfTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/PerfTest.java @@ -1,18 +1,18 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; import ch.qos.logback.classic.Level; import ch.qos.logback.classic.LoggerContext; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.utils.FileUtils; -import cn.edu.tsinghua.tsfile.utils.FileUtils.Unit; -import cn.edu.tsinghua.tsfile.utils.RecordUtils; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.utils.FileUtils; +import org.apache.iotdb.tsfile.utils.FileUtils.Unit; +import org.apache.iotdb.tsfile.utils.RecordUtils; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.json.JSONArray; import org.json.JSONObject; import org.junit.After; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/ReadPageInMemTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/ReadPageInMemTest.java similarity index 90% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/ReadPageInMemTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/ReadPageInMemTest.java index e359513d733..7cfd3bee020 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/ReadPageInMemTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/ReadPageInMemTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; import static org.junit.Assert.fail; @@ -11,14 +11,14 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.utils.RecordUtils; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.utils.RecordUtils; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; public class ReadPageInMemTest { diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileIOWriterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileIOWriterTest.java similarity index 73% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileIOWriterTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileIOWriterTest.java index 0af6c2ff11f..d91aa517b92 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileIOWriterTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileIOWriterTest.java @@ -1,17 +1,20 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.file.MetaMarker; -import cn.edu.tsinghua.tsfile.file.footer.ChunkGroupFooter; -import cn.edu.tsinghua.tsfile.file.header.ChunkHeader; -import cn.edu.tsinghua.tsfile.file.metadata.TimeSeriesMetadataTest; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.file.metadata.statistics.Statistics; -import cn.edu.tsinghua.tsfile.file.metadata.utils.TestHelper; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.writer.TsFileIOWriter; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.file.MetaMarker; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.TimeSeriesMetadataTest; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; +import org.apache.iotdb.tsfile.file.metadata.utils.TestHelper; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.writer.TsFileIOWriter; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter; +import org.apache.iotdb.tsfile.file.header.ChunkHeader; +import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics; import org.junit.*; import java.io.File; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileReadWriteTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileReadWriteTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileReadWriteTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileReadWriteTest.java index 925f59c0832..1db1cf90349 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/TsFileReadWriteTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/TsFileReadWriteTest.java @@ -1,17 +1,17 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.read.ReadOnlyTsFile; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.read.common.Path; -import cn.edu.tsinghua.tsfile.read.common.RowRecord; -import cn.edu.tsinghua.tsfile.read.expression.QueryExpression; -import cn.edu.tsinghua.tsfile.read.query.dataset.QueryDataSet; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.record.datapoint.*; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.read.ReadOnlyTsFile; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.read.common.Path; +import org.apache.iotdb.tsfile.read.common.RowRecord; +import org.apache.iotdb.tsfile.read.expression.QueryExpression; +import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.record.datapoint.*; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/WriteTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/WriteTest.java similarity index 93% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/WriteTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/WriteTest.java index 8d45c893d61..97bf1728fcf 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/WriteTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/WriteTest.java @@ -1,15 +1,15 @@ -package cn.edu.tsinghua.tsfile.write; +package org.apache.iotdb.tsfile.write; -import cn.edu.tsinghua.tsfile.common.conf.TSFileConfig; -import cn.edu.tsinghua.tsfile.common.conf.TSFileDescriptor; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.TsFileMetaData; -import cn.edu.tsinghua.tsfile.read.TsFileSequenceReader; -import cn.edu.tsinghua.tsfile.utils.RecordUtils; -import cn.edu.tsinghua.tsfile.utils.StringContainer; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.record.TSRecord; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.common.conf.TSFileConfig; +import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.TsFileMetaData; +import org.apache.iotdb.tsfile.read.TsFileSequenceReader; +import org.apache.iotdb.tsfile.utils.RecordUtils; +import org.apache.iotdb.tsfile.utils.StringContainer; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.record.TSRecord; +import org.apache.iotdb.tsfile.write.schema.FileSchema; import org.json.JSONArray; import org.json.JSONObject; import org.json.JSONTokener; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/JsonConverterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/JsonConverterTest.java similarity index 89% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/JsonConverterTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/JsonConverterTest.java index cf5e5c2081f..ea129d2ce22 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/JsonConverterTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/JsonConverterTest.java @@ -1,4 +1,4 @@ -package cn.edu.tsinghua.tsfile.write.schema.converter; +package org.apache.iotdb.tsfile.write.schema.converter; import static org.junit.Assert.*; @@ -9,18 +9,18 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.exception.write.InvalidJsonSchemaException; -import cn.edu.tsinghua.tsfile.exception.write.WriteProcessException; -import cn.edu.tsinghua.tsfile.write.schema.JsonConverter; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.exception.write.InvalidJsonSchemaException; +import org.apache.iotdb.tsfile.exception.write.WriteProcessException; +import org.apache.iotdb.tsfile.write.schema.JsonConverter; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONTokener; import org.junit.Test; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.schema.FileSchema; /** * @author kangrong diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/SchemaBuilderTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/SchemaBuilderTest.java similarity index 71% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/SchemaBuilderTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/SchemaBuilderTest.java index 6a201551556..94337006eff 100644 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/schema/converter/SchemaBuilderTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/schema/converter/SchemaBuilderTest.java @@ -1,12 +1,12 @@ -package cn.edu.tsinghua.tsfile.write.schema.converter; +package org.apache.iotdb.tsfile.write.schema.converter; -import cn.edu.tsinghua.tsfile.common.constant.JsonFormatConstant; -import cn.edu.tsinghua.tsfile.file.metadata.enums.CompressionType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSEncoding; -import cn.edu.tsinghua.tsfile.write.schema.MeasurementSchema; -import cn.edu.tsinghua.tsfile.write.schema.FileSchema; -import cn.edu.tsinghua.tsfile.write.schema.SchemaBuilder; +import org.apache.iotdb.tsfile.common.constant.JsonFormatConstant; +import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding; +import org.apache.iotdb.tsfile.write.schema.MeasurementSchema; +import org.apache.iotdb.tsfile.write.schema.FileSchema; +import org.apache.iotdb.tsfile.write.schema.SchemaBuilder; import org.junit.Test; import java.util.Collection; diff --git a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/series/PageWriterTest.java b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/series/PageWriterTest.java similarity index 81% rename from tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/series/PageWriterTest.java rename to tsfile/src/test/java/org/apache/iotdb/tsfile/write/series/PageWriterTest.java index db797fe42c3..9d75c50de90 100755 --- a/tsfile/src/test/java/cn/edu/tsinghua/tsfile/write/series/PageWriterTest.java +++ b/tsfile/src/test/java/org/apache/iotdb/tsfile/write/series/PageWriterTest.java @@ -1,14 +1,14 @@ -package cn.edu.tsinghua.tsfile.write.series; +package org.apache.iotdb.tsfile.write.series; -import cn.edu.tsinghua.tsfile.utils.Binary; +import org.apache.iotdb.tsfile.utils.Binary; -import cn.edu.tsinghua.tsfile.utils.ReadWriteForEncodingUtils; -import cn.edu.tsinghua.tsfile.encoding.common.EndianType; -import cn.edu.tsinghua.tsfile.encoding.decoder.PlainDecoder; -import cn.edu.tsinghua.tsfile.encoding.encoder.PlainEncoder; -import cn.edu.tsinghua.tsfile.file.metadata.enums.TSDataType; -import cn.edu.tsinghua.tsfile.constant.TimeseriesTestConstant; -import cn.edu.tsinghua.tsfile.write.page.PageWriter; +import org.apache.iotdb.tsfile.utils.ReadWriteForEncodingUtils; +import org.apache.iotdb.tsfile.encoding.common.EndianType; +import org.apache.iotdb.tsfile.encoding.decoder.PlainDecoder; +import org.apache.iotdb.tsfile.encoding.encoder.PlainEncoder; +import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.constant.TimeseriesTestConstant; +import org.apache.iotdb.tsfile.write.page.PageWriter; import org.junit.Assert; import org.junit.Test; diff --git a/tsfile/src/test/resources/logback.xml b/tsfile/src/test/resources/logback.xml index dda5e3e0e91..21af140f4bd 100644 --- a/tsfile/src/test/resources/logback.xml +++ b/tsfile/src/test/resources/logback.xml @@ -94,7 +94,7 @@ - +