You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/02/19 11:37:59 UTC

[incubator-iotdb] branch delete_dev4 updated: format codes

This is an automated email from the ASF dual-hosted git repository.

hxd pushed a commit to branch delete_dev4
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git


The following commit(s) were added to refs/heads/delete_dev4 by this push:
     new 2e50ea5  format codes
2e50ea5 is described below

commit 2e50ea56265c03ee188518849c5cf225aee9ab35
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Tue Feb 19 19:37:45 2019 +0800

    format codes
---
 .../engine/bufferwrite/BufferWriteProcessor.java   |  18 +-
 .../iotdb/db/engine/filenode/FileNodeManager.java  | 181 ++++++++++-----------
 .../db/engine/filenode/FileNodeProcessor.java      |   1 -
 .../iotdb/db/engine/filenode/IntervalFileNode.java |  17 +-
 .../iotdb/db/engine/memtable/AbstractMemTable.java |  14 +-
 .../apache/iotdb/db/engine/memtable/IMemTable.java |   5 +-
 .../db/engine/memtable/IWritableMemChunk.java      |   2 +-
 .../db/engine/memtable/MemTableFlushUtil.java      |   7 +-
 .../iotdb/db/engine/modification/Deletion.java     |   4 +-
 .../db/engine/modification/ModificationFile.java   |   5 +-
 .../db/engine/overflow/ioV2/OverflowProcessor.java |  75 ++++-----
 .../db/engine/overflow/ioV2/OverflowResource.java  |  24 +--
 .../org/apache/iotdb/db/monitor/StatMonitor.java   |   3 +-
 .../iotdb/db/qp/strategy/PhysicalGenerator.java    |  23 ++-
 .../iotdb/db/query/context/QueryContext.java       |  14 +-
 .../db/query/control/QueryDataSourceManager.java   |   5 +-
 .../executor/EngineExecutorWithTimeGenerator.java  |   5 +-
 .../EngineExecutorWithoutTimeGenerator.java        |   5 +-
 .../db/query/factory/SeriesReaderFactory.java      |  66 ++++----
 .../query/reader/sequence/SealedTsFilesReader.java |  12 +-
 .../query/reader/sequence/SequenceDataReader.java  |   4 +-
 .../query/timegenerator/EngineNodeConstructor.java |   4 +-
 .../db/writelog/replay/ConcreteLogReplayer.java    |   5 +-
 .../engine/bufferwrite/BufferWriteBenchmark.java   |   5 +-
 .../bufferwrite/BufferWriteProcessorNewTest.java   |  19 +--
 .../bufferwrite/BufferWriteProcessorTest.java      |  43 +++--
 .../memcontrol/BufferwriteMetaSizeControlTest.java |   4 +-
 .../engine/modification/DeletionFileNodeTest.java  |  48 +++---
 .../db/engine/modification/DeletionQueryTest.java  |  15 +-
 .../engine/modification/ModificationFileTest.java  |  24 +--
 .../io/LocalTextModificationAccessorTest.java      |  15 +-
 .../db/integration/IoTDBEngineTimeGeneratorIT.java |   8 +-
 .../tsfile/read/reader/chunk/ChunkReader.java      |   4 +-
 .../iotdb/tsfile/write/writer/TsFileIOWriter.java  |   7 +-
 34 files changed, 329 insertions(+), 362 deletions(-)

diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
index 16a5c0d..13dcf57 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessor.java
@@ -27,7 +27,6 @@ import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.ReentrantLock;
-
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBConstant;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
@@ -94,8 +93,8 @@ public class BufferWriteProcessor extends Processor {
    * @throws BufferWriteProcessorException BufferWriteProcessorException
    */
   public BufferWriteProcessor(String baseDir, String processorName, String fileName,
-                              Map<String, Action> parameters, VersionController versionController,
-                              FileSchema fileSchema) throws BufferWriteProcessorException {
+      Map<String, Action> parameters, VersionController versionController,
+      FileSchema fileSchema) throws BufferWriteProcessorException {
     super(processorName);
     this.fileSchema = fileSchema;
     this.baseDir = baseDir;
@@ -182,13 +181,13 @@ public class BufferWriteProcessor extends Processor {
         return true;
       case WARNING:
         memory = MemUtils.bytesCntToStr(BasicMemController.getInstance().getTotalUsage());
-        LOGGER.warn("Memory usage will exceed warning threshold, current : {}.",memory);
+        LOGGER.warn("Memory usage will exceed warning threshold, current : {}.", memory);
         checkMemThreshold4Flush(memUsage);
         return true;
       case DANGEROUS:
       default:
         memory = MemUtils.bytesCntToStr(BasicMemController.getInstance().getTotalUsage());
-        LOGGER.warn("Memory usage will exceed dangerous threshold, current : {}.",memory);
+        LOGGER.warn("Memory usage will exceed dangerous threshold, current : {}.", memory);
         return false;
     }
   }
@@ -204,7 +203,7 @@ public class BufferWriteProcessor extends Processor {
       try {
         flush();
       } catch (IOException e) {
-        LOGGER.error("Flush bufferwrite error.",e);
+        LOGGER.error("Flush bufferwrite error.", e);
         throw new BufferWriteProcessorException(e);
       }
     }
@@ -220,8 +219,8 @@ public class BufferWriteProcessor extends Processor {
    * @return corresponding chunk data and chunk metadata in memory
    */
   public Pair<ReadOnlyMemChunk, List<ChunkMetaData>> queryBufferWriteData(String deviceId,
-                                                                          String measurementId,
-                                                                          TSDataType dataType) {
+      String measurementId,
+      TSDataType dataType) {
     flushQueryLock.lock();
     try {
       MemSeriesLazyMerger memSeriesLazyMerger = new MemSeriesLazyMerger();
@@ -270,7 +269,7 @@ public class BufferWriteProcessor extends Processor {
       if (flushMemTable != null && !flushMemTable.isEmpty()) {
         // flush data
         MemTableFlushUtil.flushMemTable(fileSchema, writer, flushMemTable,
-                version);
+            version);
         // write restore information
         writer.flush();
       }
@@ -510,6 +509,7 @@ public class BufferWriteProcessor extends Processor {
   /**
    * Delete data whose timestamp <= 'timestamp' and belonging to timeseries deviceId.measurementId.
    * Delete data in both working MemTable and flushing MemTable.
+   *
    * @param deviceId the deviceId of the timeseries to be deleted.
    * @param measurementId the measurementId of the timeseries to be deleted.
    * @param timestamp the upper-bound of deletion time.
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
index 4999e2e..2e3c15d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeManager.java
@@ -31,7 +31,6 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBConstant;
@@ -83,7 +82,7 @@ public class FileNodeManager implements IStatistic, IService {
    * Stat information.
    */
   private final String statStorageDeltaName = MonitorConstants.statStorageGroupPrefix
-          + MonitorConstants.MONITOR_PATH_SEPERATOR + MonitorConstants.fileNodeManagerPath;
+      + MonitorConstants.MONITOR_PATH_SEPERATOR + MonitorConstants.fileNodeManagerPath;
   /**
    * This map is used to manage all filenode processor,<br> the key is filenode name which is
    * storage group seriesPath.
@@ -97,7 +96,7 @@ public class FileNodeManager implements IStatistic, IService {
   private HashMap<String, AtomicLong> statParamsHashMap = new HashMap<String, AtomicLong>() {
     {
       for (MonitorConstants.FileNodeManagerStatConstants fileNodeManagerStatConstant :
-              MonitorConstants.FileNodeManagerStatConstants.values()) {
+          MonitorConstants.FileNodeManagerStatConstants.values()) {
         put(fileNodeManagerStatConstant.name(), new AtomicLong(0));
       }
     }
@@ -129,9 +128,9 @@ public class FileNodeManager implements IStatistic, IService {
 
   private void updateStatHashMapWhenFail(TSRecord tsRecord) {
     statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_REQ_FAIL.name())
-            .incrementAndGet();
+        .incrementAndGet();
     statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS_FAIL.name())
-            .addAndGet(tsRecord.dataPointList.size());
+        .addAndGet(tsRecord.dataPointList.size());
   }
 
   /**
@@ -147,9 +146,9 @@ public class FileNodeManager implements IStatistic, IService {
   public List<String> getAllPathForStatistic() {
     List<String> list = new ArrayList<>();
     for (MonitorConstants.FileNodeManagerStatConstants statConstant :
-            MonitorConstants.FileNodeManagerStatConstants.values()) {
+        MonitorConstants.FileNodeManagerStatConstants.values()) {
       list.add(
-              statStorageDeltaName + MonitorConstants.MONITOR_PATH_SEPERATOR + statConstant.name());
+          statStorageDeltaName + MonitorConstants.MONITOR_PATH_SEPERATOR + statConstant.name());
     }
     return list;
   }
@@ -158,7 +157,7 @@ public class FileNodeManager implements IStatistic, IService {
   public HashMap<String, TSRecord> getAllStatisticsValue() {
     long curTime = System.currentTimeMillis();
     TSRecord tsRecord = StatMonitor
-            .convertToTSRecord(getStatParamsHashMap(), statStorageDeltaName, curTime);
+        .convertToTSRecord(getStatParamsHashMap(), statStorageDeltaName, curTime);
     return new HashMap<String, TSRecord>() {
       {
         put(statStorageDeltaName, tsRecord);
@@ -174,9 +173,9 @@ public class FileNodeManager implements IStatistic, IService {
     HashMap<String, String> hashMap = new HashMap<String, String>() {
       {
         for (MonitorConstants.FileNodeManagerStatConstants statConstant :
-                MonitorConstants.FileNodeManagerStatConstants.values()) {
+            MonitorConstants.FileNodeManagerStatConstants.values()) {
           put(statStorageDeltaName + MonitorConstants.MONITOR_PATH_SEPERATOR + statConstant.name(),
-                  MonitorConstants.DataType);
+              MonitorConstants.DataType);
         }
       }
     };
@@ -194,7 +193,7 @@ public class FileNodeManager implements IStatistic, IService {
   }
 
   private FileNodeProcessor constructNewProcessor(String filenodeName)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
     try {
       return new FileNodeProcessor(baseDir, filenodeName);
     } catch (FileNodeProcessorException e) {
@@ -204,7 +203,7 @@ public class FileNodeManager implements IStatistic, IService {
   }
 
   private FileNodeProcessor getProcessor(String path, boolean isWriteLock)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
     String filenodeName;
     try {
       filenodeName = MManager.getInstance().getFileNameByPath(path);
@@ -226,7 +225,7 @@ public class FileNodeManager implements IStatistic, IService {
         } else {
           // calculate the value with the key monitor
           LOGGER.debug("Calcuate the processor, the filenode is {}, Thread is {}", filenodeName,
-                  Thread.currentThread().getId());
+              Thread.currentThread().getId());
           processor = constructNewProcessor(filenodeName);
           processor.lock(isWriteLock);
           processorMap.put(filenodeName, processor);
@@ -248,8 +247,8 @@ public class FileNodeManager implements IStatistic, IService {
         FileNodeProcessor fileNodeProcessor = getProcessor(filenodeName, true);
         if (fileNodeProcessor.shouldRecovery()) {
           LOGGER.info("Recovery the filenode processor, the filenode is {}, the status is {}",
-                  filenodeName,
-                  fileNodeProcessor.getFileNodeProcessorStatus());
+              filenodeName,
+              fileNodeProcessor.getFileNodeProcessorStatus());
           fileNodeProcessor.fileNodeRecovery();
         } else {
           fileNodeProcessor.writeUnlock();
@@ -280,7 +279,7 @@ public class FileNodeManager implements IStatistic, IService {
 
     if (!isMonitor) {
       statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS.name())
-              .addAndGet(tsRecord.dataPointList.size());
+          .addAndGet(tsRecord.dataPointList.size());
     }
 
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
@@ -296,7 +295,7 @@ public class FileNodeManager implements IStatistic, IService {
           overflowProcessor = fileNodeProcessor.getOverflowProcessor(filenodeName);
         } catch (IOException e) {
           LOGGER.error("Get the overflow processor failed, the filenode is {}, insert time is {}",
-                  filenodeName, timestamp);
+              filenodeName, timestamp);
           if (!isMonitor) {
             updateStatHashMapWhenFail(tsRecord);
           }
@@ -312,7 +311,7 @@ public class FileNodeManager implements IStatistic, IService {
               insertValues.add(dp.getValue().toString());
             }
             overflowProcessor.getLogNode().write(
-                    new InsertPlan(2, tsRecord.deviceId, tsRecord.time, measurementList, insertValues));
+                new InsertPlan(2, tsRecord.deviceId, tsRecord.time, measurementList, insertValues));
           }
         } catch (IOException e) {
           if (!isMonitor) {
@@ -349,8 +348,8 @@ public class FileNodeManager implements IStatistic, IService {
           bufferWriteProcessor = fileNodeProcessor.getBufferWriteProcessor(filenodeName, timestamp);
         } catch (FileNodeProcessorException e) {
           LOGGER
-                  .error("Get the bufferwrite processor failed, the filenode is {}, insert time is {}",
-                          filenodeName, timestamp);
+              .error("Get the bufferwrite processor failed, the filenode is {}, insert time is {}",
+                  filenodeName, timestamp);
           if (!isMonitor) {
             updateStatHashMapWhenFail(tsRecord);
           }
@@ -363,7 +362,7 @@ public class FileNodeManager implements IStatistic, IService {
           String bufferwriteRelativePath = bufferWriteProcessor.getFileRelativePath();
           try {
             fileNodeProcessor
-                    .addIntervalFileNode(timestamp, bufferwriteBaseDir, bufferwriteRelativePath);
+                .addIntervalFileNode(timestamp, bufferwriteBaseDir, bufferwriteRelativePath);
           } catch (Exception e) {
             if (!isMonitor) {
               updateStatHashMapWhenFail(tsRecord);
@@ -381,7 +380,7 @@ public class FileNodeManager implements IStatistic, IService {
               insertValues.add(dp.getValue().toString());
             }
             bufferWriteProcessor.getLogNode().write(
-                    new InsertPlan(2, tsRecord.deviceId, tsRecord.time, measurementList, insertValues));
+                new InsertPlan(2, tsRecord.deviceId, tsRecord.time, measurementList, insertValues));
           }
         } catch (IOException e) {
           if (!isMonitor) {
@@ -402,20 +401,20 @@ public class FileNodeManager implements IStatistic, IService {
         }
         insertType = 2;
         if (bufferWriteProcessor
-                .getFileSize() > IoTDBDescriptor.getInstance()
-                .getConfig().bufferwriteFileSizeThreshold) {
+            .getFileSize() > IoTDBDescriptor.getInstance()
+            .getConfig().bufferwriteFileSizeThreshold) {
           LOGGER.info(
-                  "The filenode processor {} will close the bufferwrite processor, "
-                          + "because the size[{}] of tsfile {} reaches the threshold {}",
-                  filenodeName, MemUtils.bytesCntToStr(bufferWriteProcessor.getFileSize()),
-                  bufferWriteProcessor.getFileName(), MemUtils.bytesCntToStr(
-                          IoTDBDescriptor.getInstance().getConfig().bufferwriteFileSizeThreshold));
+              "The filenode processor {} will close the bufferwrite processor, "
+                  + "because the size[{}] of tsfile {} reaches the threshold {}",
+              filenodeName, MemUtils.bytesCntToStr(bufferWriteProcessor.getFileSize()),
+              bufferWriteProcessor.getFileName(), MemUtils.bytesCntToStr(
+                  IoTDBDescriptor.getInstance().getConfig().bufferwriteFileSizeThreshold));
           fileNodeProcessor.closeBufferWrite();
         }
       }
     } catch (FileNodeProcessorException e) {
       LOGGER.error(String.format("Encounter an error when closing the buffer write processor %s.",
-              fileNodeProcessor.getProcessorName()), e);
+          fileNodeProcessor.getProcessorName()), e);
       throw new FileNodeManagerException(e);
     } finally {
       fileNodeProcessor.writeUnlock();
@@ -423,16 +422,16 @@ public class FileNodeManager implements IStatistic, IService {
     // Modify the insert
     if (!isMonitor) {
       fileNodeProcessor.getStatParamsHashMap()
-              .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_POINTS_SUCCESS.name())
-              .addAndGet(tsRecord.dataPointList.size());
+          .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_POINTS_SUCCESS.name())
+          .addAndGet(tsRecord.dataPointList.size());
       fileNodeProcessor.getStatParamsHashMap()
-              .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_REQ_SUCCESS.name())
-              .incrementAndGet();
+          .get(MonitorConstants.FileNodeProcessorStatConstants.TOTAL_REQ_SUCCESS.name())
+          .incrementAndGet();
       statParamsHashMap.get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_REQ_SUCCESS.name())
-              .incrementAndGet();
+          .incrementAndGet();
       statParamsHashMap
-              .get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS_SUCCESS.name())
-              .addAndGet(tsRecord.dataPointList.size());
+          .get(MonitorConstants.FileNodeManagerStatConstants.TOTAL_POINTS_SUCCESS.name())
+          .addAndGet(tsRecord.dataPointList.size());
     }
     return insertType;
   }
@@ -441,8 +440,8 @@ public class FileNodeManager implements IStatistic, IService {
    * update data.
    */
   public void update(String deviceId, String measurementId, long startTime, long endTime,
-                     TSDataType type, String v)
-          throws FileNodeManagerException {
+      TSDataType type, String v)
+      throws FileNodeManagerException {
 
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
     try {
@@ -450,8 +449,8 @@ public class FileNodeManager implements IStatistic, IService {
       long lastUpdateTime = fileNodeProcessor.getLastUpdateTime(deviceId);
       if (startTime > lastUpdateTime) {
         LOGGER.warn("The update range is error, startTime {} is great than lastUpdateTime {}",
-                startTime,
-                lastUpdateTime);
+            startTime,
+            lastUpdateTime);
         return;
       }
       if (endTime > lastUpdateTime) {
@@ -464,9 +463,9 @@ public class FileNodeManager implements IStatistic, IService {
         overflowProcessor = fileNodeProcessor.getOverflowProcessor(filenodeName);
       } catch (IOException e) {
         LOGGER.error(
-                "Get the overflow processor failed, the filenode is {}, "
-                        + "insert time range is from {} to {}",
-                filenodeName, startTime, endTime);
+            "Get the overflow processor failed, the filenode is {}, "
+                + "insert time range is from {} to {}",
+            filenodeName, startTime, endTime);
         throw new FileNodeManagerException(e);
       }
       overflowProcessor.update(deviceId, measurementId, startTime, endTime, type, v);
@@ -478,8 +477,8 @@ public class FileNodeManager implements IStatistic, IService {
       try {
         if (IoTDBDescriptor.getInstance().getConfig().enableWal) {
           overflowProcessor.getLogNode()
-                  .write(
-                          new UpdatePlan(startTime, endTime, v, new Path(deviceId + "." + measurementId)));
+              .write(
+                  new UpdatePlan(startTime, endTime, v, new Path(deviceId + "." + measurementId)));
         }
       } catch (IOException e) {
         throw new FileNodeManagerException(e);
@@ -499,7 +498,7 @@ public class FileNodeManager implements IStatistic, IService {
    * delete data.
    */
   public void delete(String deviceId, String measurementId, long timestamp)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
 
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
     try {
@@ -507,8 +506,8 @@ public class FileNodeManager implements IStatistic, IService {
       // no tsfile data, the delete operation is invalid
       if (lastUpdateTime == -1) {
         LOGGER.warn("The last update time is -1, delete overflow is invalid, "
-                        + "the filenode processor is {}",
-                fileNodeProcessor.getProcessorName());
+                + "the filenode processor is {}",
+            fileNodeProcessor.getProcessorName());
       } else {
         // write wal
         if (IoTDBDescriptor.getInstance().getConfig().enableWal) {
@@ -521,16 +520,16 @@ public class FileNodeManager implements IStatistic, IService {
             bufferWriteProcessor = fileNodeProcessor.getBufferWriteProcessor();
           } catch (IOException | FileNodeProcessorException e) {
             LOGGER.error("Getting the processor failed, the filenode is {}, delete time is {}.",
-                    filenodeName, timestamp);
+                filenodeName, timestamp);
             throw new FileNodeManagerException(e);
           }
           try {
             overflowProcessor.getLogNode()
-                    .write(new DeletePlan(timestamp,
-                            new Path(deviceId + "." + measurementId)));
+                .write(new DeletePlan(timestamp,
+                    new Path(deviceId + "." + measurementId)));
             bufferWriteProcessor.getLogNode()
-                    .write(new DeletePlan(timestamp,
-                            new Path(deviceId + "." + measurementId)));
+                .write(new DeletePlan(timestamp,
+                    new Path(deviceId + "." + measurementId)));
           } catch (IOException e) {
             throw new FileNodeManagerException(e);
           }
@@ -552,11 +551,10 @@ public class FileNodeManager implements IStatistic, IService {
   }
 
   /**
-   * Similar to delete(), but only deletes data in BufferWrite.
-   * Only used by WAL recovery.
+   * Similar to delete(), but only deletes data in BufferWrite. Only used by WAL recovery.
    */
   public void deleteBufferWrite(String deviceId, String measurementId, long timestamp)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
     try {
       fileNodeProcessor.deleteBufferWrite(deviceId, measurementId, timestamp);
@@ -571,11 +569,10 @@ public class FileNodeManager implements IStatistic, IService {
   }
 
   /**
-   * Similar to delete(), but only deletes data in Overflow.
-   * Only used by WAL recovery.
+   * Similar to delete(), but only deletes data in Overflow. Only used by WAL recovery.
    */
   public void deleteOverflow(String deviceId, String measurementId, long timestamp)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
     try {
       fileNodeProcessor.deleteOverflow(deviceId, measurementId, timestamp);
@@ -591,8 +588,8 @@ public class FileNodeManager implements IStatistic, IService {
 
 
   private void delete(String processorName,
-                      Iterator<Map.Entry<String, FileNodeProcessor>> processorIterator)
-          throws FileNodeManagerException {
+      Iterator<Map.Entry<String, FileNodeProcessor>> processorIterator)
+      throws FileNodeManagerException {
     if (processorMap.containsKey(processorName)) {
       LOGGER.info("Try to delete the filenode processor {}.", processorName);
       FileNodeProcessor processor = processorMap.get(processorName);
@@ -628,7 +625,7 @@ public class FileNodeManager implements IStatistic, IService {
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, true);
     try {
       LOGGER.debug("Get the FileNodeProcessor: filenode is {}, begin query.",
-              fileNodeProcessor.getProcessorName());
+          fileNodeProcessor.getProcessorName());
       int token = fileNodeProcessor.addMultiPassLock();
       return token;
     } finally {
@@ -640,12 +637,12 @@ public class FileNodeManager implements IStatistic, IService {
    * query data.
    */
   public QueryDataSource query(SingleSeriesExpression seriesExpression, QueryContext context)
-          throws FileNodeManagerException {
+      throws FileNodeManagerException {
     String deviceId = seriesExpression.getSeriesPath().getDevice();
     String measurementId = seriesExpression.getSeriesPath().getMeasurement();
     FileNodeProcessor fileNodeProcessor = getProcessor(deviceId, false);
     LOGGER.debug("Get the FileNodeProcessor: filenode is {}, query.",
-            fileNodeProcessor.getProcessorName());
+        fileNodeProcessor.getProcessorName());
     try {
       QueryDataSource queryDataSource = null;
       // query operation must have overflow processor
@@ -654,16 +651,16 @@ public class FileNodeManager implements IStatistic, IService {
           fileNodeProcessor.getOverflowProcessor(fileNodeProcessor.getProcessorName());
         } catch (IOException e) {
           LOGGER.error("Get the overflow processor failed, the filenode is {}, query is {},{}",
-                  fileNodeProcessor.getProcessorName(), deviceId, measurementId);
+              fileNodeProcessor.getProcessorName(), deviceId, measurementId);
           throw new FileNodeManagerException(e);
         }
       }
       try {
         queryDataSource = fileNodeProcessor
-                .query(deviceId, measurementId, seriesExpression.getFilter(), context);
+            .query(deviceId, measurementId, seriesExpression.getFilter(), context);
       } catch (FileNodeProcessorException e) {
         LOGGER.error("Query error: the deviceId {}, the measurementId {}", deviceId, measurementId,
-                e);
+            e);
         throw new FileNodeManagerException(e);
       }
       // return query structure
@@ -696,8 +693,8 @@ public class FileNodeManager implements IStatistic, IService {
    * @param appendFile the appended tsfile information
    */
   public boolean appendFileToFileNode(String fileNodeName, IntervalFileNode appendFile,
-                                      String appendFilePath)
-          throws FileNodeManagerException {
+      String appendFilePath)
+      throws FileNodeManagerException {
     FileNodeProcessor fileNodeProcessor = getProcessor(fileNodeName, true);
     try {
       // check append file
@@ -726,8 +723,8 @@ public class FileNodeManager implements IStatistic, IService {
    * @param appendFile the appended tsfile information
    */
   public List<String> getOverlapFilesFromFileNode(String fileNodeName, IntervalFileNode appendFile,
-                                                  String uuid)
-          throws FileNodeManagerException {
+      String uuid)
+      throws FileNodeManagerException {
     FileNodeProcessor fileNodeProcessor = getProcessor(fileNodeName, true);
     List<String> overlapFiles = new ArrayList<>();
     try {
@@ -778,9 +775,9 @@ public class FileNodeManager implements IStatistic, IService {
         while (!task.isDone()) {
           try {
             LOGGER.info(
-                    "Waiting for the end of merge, already waiting for {}s, "
-                            + "continue to wait anothor {}s",
-                    totalTime, time);
+                "Waiting for the end of merge, already waiting for {}s, "
+                    + "continue to wait anothor {}s",
+                totalTime, time);
             TimeUnit.SECONDS.sleep(time);
             totalTime += time;
             if (time < 32) {
@@ -797,7 +794,7 @@ public class FileNodeManager implements IStatistic, IService {
       LOGGER.info("End to merge all overflowed filenode");
     } else {
       LOGGER.warn("Failed to merge all overflowed filenode, because filenode manager status is {}",
-              fileNodeManagerStatus);
+          fileNodeManagerStatus);
     }
   }
 
@@ -849,8 +846,8 @@ public class FileNodeManager implements IStatistic, IService {
                   break;
                 } else {
                   LOGGER.info(
-                          "Can't delete the filenode processor {}, "
-                                  + "because the filenode processor can't be closed. Wait 100ms to retry");
+                      "Can't delete the filenode processor {}, "
+                          + "because the filenode processor can't be closed. Wait 100ms to retry");
                 }
               } catch (ProcessorException e) {
                 LOGGER.error("Delete the filenode processor {} error.", processorName, e);
@@ -860,8 +857,8 @@ public class FileNodeManager implements IStatistic, IService {
               }
             } else {
               LOGGER.info(
-                      "Can't delete the filenode processor {}, because it can't get the write lock."
-                              + " Wait 100ms to retry");
+                  "Can't delete the filenode processor {}, because it can't get the write lock."
+                      + " Wait 100ms to retry");
             }
             try {
               TimeUnit.MILLISECONDS.sleep(100);
@@ -900,9 +897,9 @@ public class FileNodeManager implements IStatistic, IService {
         FileUtils.deleteDirectory(new File(overflowPath));
 
         MultiFileLogNodeManager.getInstance()
-                .deleteNode(processorName + IoTDBConstant.BUFFERWRITE_LOG_NODE_SUFFIX);
+            .deleteNode(processorName + IoTDBConstant.BUFFERWRITE_LOG_NODE_SUFFIX);
         MultiFileLogNodeManager.getInstance()
-                .deleteNode(processorName + IoTDBConstant.OVERFLOW_LOG_NODE_SUFFIX);
+            .deleteNode(processorName + IoTDBConstant.OVERFLOW_LOG_NODE_SUFFIX);
         return true;
       } catch (IOException e) {
         LOGGER.error("Delete the filenode processor {} error.", processorName, e);
@@ -918,8 +915,8 @@ public class FileNodeManager implements IStatistic, IService {
   private String standardizeDir(String originalPath) {
     String res = originalPath;
     if ((originalPath.length() > 0
-            && originalPath.charAt(originalPath.length() - 1) != File.separatorChar)
-            || originalPath.length() == 0) {
+        && originalPath.charAt(originalPath.length() - 1) != File.separatorChar)
+        || originalPath.length() == 0) {
       res = originalPath + File.separatorChar;
     }
     return res;
@@ -1002,7 +999,7 @@ public class FileNodeManager implements IStatistic, IService {
       fileNodeManagerStatus = FileNodeManagerStatus.CLOSE;
       try {
         Iterator<Map.Entry<String, FileNodeProcessor>> processorIterator = processorMap.entrySet()
-                .iterator();
+            .iterator();
         while (processorIterator.hasNext()) {
           Map.Entry<String, FileNodeProcessor> processorEntry = processorIterator.next();
           try {
@@ -1033,7 +1030,7 @@ public class FileNodeManager implements IStatistic, IService {
       fileNodeManagerStatus = FileNodeManagerStatus.CLOSE;
       try {
         Iterator<Map.Entry<String, FileNodeProcessor>> processorIterator = processorMap.entrySet()
-                .iterator();
+            .iterator();
         while (processorIterator.hasNext()) {
           Map.Entry<String, FileNodeProcessor> processorEntry = processorIterator.next();
           try {
@@ -1085,7 +1082,7 @@ public class FileNodeManager implements IStatistic, IService {
         // if the flush thread pool is not full ( or half full), start a new
         // flush task
         if (FlushManager.getInstance().getActiveCnt() < 0.5 * FlushManager.getInstance()
-                .getThreadCnt()) {
+            .getThreadCnt()) {
           try {
             flushTop(0.01f);
           } catch (IOException e) {
@@ -1123,8 +1120,8 @@ public class FileNodeManager implements IStatistic, IService {
       }
     });
     int flushNum =
-            (int) (tempProcessors.size() * percentage) > 1 ? (int) (tempProcessors.size() * percentage)
-                    : 1;
+        (int) (tempProcessors.size() * percentage) > 1 ? (int) (tempProcessors.size() * percentage)
+            : 1;
     for (int i = 0; i < flushNum && i < tempProcessors.size(); i++) {
       FileNodeProcessor processor = tempProcessors.get(i);
       // 64M
@@ -1178,11 +1175,11 @@ public class FileNodeManager implements IStatistic, IService {
    * recover filenode.
    */
   public void recoverFileNode(String filenodeName)
-          throws FileNodeProcessorException, FileNodeManagerException {
+      throws FileNodeProcessorException, FileNodeManagerException {
     FileNodeProcessor fileNodeProcessor = getProcessor(filenodeName, true);
     LOGGER
-            .info("Recovery the filenode processor, the filenode is {}, the status is {}", filenodeName,
-                    fileNodeProcessor.getFileNodeProcessorStatus());
+        .info("Recovery the filenode processor, the filenode is {}, the status is {}", filenodeName,
+            fileNodeProcessor.getFileNodeProcessorStatus());
     fileNodeProcessor.fileNodeRecovery();
   }
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
index 98316e6..8d8daa8 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/FileNodeProcessor.java
@@ -39,7 +39,6 @@ import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.ReadWriteLock;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
-
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBConstant;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java
index 048c34d..03057b2 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/IntervalFileNode.java
@@ -24,7 +24,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-
 import org.apache.iotdb.db.conf.directories.Directories;
 import org.apache.iotdb.db.engine.modification.ModificationFile;
 
@@ -53,8 +52,8 @@ public class IntervalFileNode implements Serializable {
     this.startTimeMap = startTimeMap;
     this.endTimeMap = endTimeMap;
     this.modFile = new ModificationFile(
-            Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
-                    + relativePath + ModificationFile.FILE_SUFFIX);
+        Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
+            + relativePath + ModificationFile.FILE_SUFFIX);
   }
 
   /**
@@ -72,8 +71,8 @@ public class IntervalFileNode implements Serializable {
     startTimeMap = new HashMap<>();
     endTimeMap = new HashMap<>();
     this.modFile = new ModificationFile(
-            Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
-                    + relativePath + ModificationFile.FILE_SUFFIX);
+        Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
+            + relativePath + ModificationFile.FILE_SUFFIX);
   }
 
   public IntervalFileNode(OverflowChangeType type, String baseDir, String relativePath) {
@@ -85,8 +84,8 @@ public class IntervalFileNode implements Serializable {
     startTimeMap = new HashMap<>();
     endTimeMap = new HashMap<>();
     this.modFile = new ModificationFile(
-            Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
-                    + relativePath + ModificationFile.FILE_SUFFIX);
+        Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
+            + relativePath + ModificationFile.FILE_SUFFIX);
   }
 
   public IntervalFileNode(OverflowChangeType type, String relativePath) {
@@ -290,8 +289,8 @@ public class IntervalFileNode implements Serializable {
   public synchronized ModificationFile getModFile() {
     if (modFile == null) {
       modFile = new ModificationFile(
-              Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
-                      + relativePath + ModificationFile.FILE_SUFFIX);
+          Directories.getInstance().getTsFileFolder(baseDirIndex) + File.separator
+              + relativePath + ModificationFile.FILE_SUFFIX);
     }
     return modFile;
   }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
index bb95a25..482592c 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/AbstractMemTable.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.engine.memtable;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.iotdb.db.utils.TimeValuePair;
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 
@@ -52,7 +51,7 @@ public abstract class AbstractMemTable implements IMemTable {
   }
 
   private IWritableMemChunk createIfNotExistAndGet(String deviceId, String measurement,
-                                                   TSDataType dataType) {
+      TSDataType dataType) {
     if (!memTableMap.containsKey(deviceId)) {
       memTableMap.put(deviceId, new HashMap<>());
     }
@@ -67,7 +66,7 @@ public abstract class AbstractMemTable implements IMemTable {
 
   @Override
   public void write(String deviceId, String measurement, TSDataType dataType, long insertTime,
-                    String insertValue) {
+      String insertValue) {
     IWritableMemChunk memSeries = createIfNotExistAndGet(deviceId, measurement, dataType);
     memSeries.write(insertTime, insertValue);
   }
@@ -114,12 +113,13 @@ public abstract class AbstractMemTable implements IMemTable {
   }
 
   /**
-   * If chunk contains data with timestamp less than 'timestamp', create a copy and delete all
-   * those data. Otherwise return null.
+   * If chunk contains data with timestamp less than 'timestamp', create a copy and delete all those
+   * data. Otherwise return null.
+   *
    * @param chunk the source chunk.
    * @param timestamp the upper-bound of deletion time.
-   * @return A reduced copy of chunk if chunk contains data with timestamp less than 'timestamp',
-   * of null.
+   * @return A reduced copy of chunk if chunk contains data with timestamp less than 'timestamp', of
+   * null.
    */
   private IWritableMemChunk filterChunk(IWritableMemChunk chunk, long timestamp) {
     List<TimeValuePair> timeValuePairs = chunk.getSortedTimeValuePairList();
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java
index 4833ffa..d51715d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IMemTable.java
@@ -19,7 +19,6 @@
 package org.apache.iotdb.db.engine.memtable;
 
 import java.util.Map;
-
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
 
 /**
@@ -34,7 +33,7 @@ public interface IMemTable {
   Map<String, Map<String, IWritableMemChunk>> getMemTableMap();
 
   void write(String deviceId, String measurement, TSDataType dataType,
-             long insertTime, String insertValue);
+      long insertTime, String insertValue);
 
   int size();
 
@@ -50,6 +49,7 @@ public interface IMemTable {
   /**
    * Delete data in it whose timestamp <= 'timestamp' and belonging to timeseries
    * deviceId.measurementId.
+   *
    * @param deviceId the deviceId of the timeseries to be deleted.
    * @param measurementId the measurementId of the timeseries to be deleted.
    * @param timestamp the upper-bound of deletion time.
@@ -58,6 +58,7 @@ public interface IMemTable {
 
   /**
    * Make a copy of this MemTable.
+   *
    * @return a MemTable with the same data as this one.
    */
   IMemTable copy();
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
index 05b0522..daeb4b1 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/IWritableMemChunk.java
@@ -19,7 +19,7 @@
 package org.apache.iotdb.db.engine.memtable;
 
 import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
-import org.apache.iotdb.tsfile.utils.Binary;
+    import org.apache.iotdb.tsfile.utils.Binary;
 
 public interface IWritableMemChunk extends TimeValuePairSorter {
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java
index 32d1cff..9f6d3cc 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/memtable/MemTableFlushUtil.java
@@ -20,7 +20,6 @@ package org.apache.iotdb.db.engine.memtable;
 
 import java.io.IOException;
 import java.util.List;
-
 import org.apache.iotdb.db.utils.TimeValuePair;
 import org.apache.iotdb.tsfile.common.conf.TSFileDescriptor;
 import org.apache.iotdb.tsfile.file.footer.ChunkGroupFooter;
@@ -40,12 +39,12 @@ public class MemTableFlushUtil {
   private static final int PAGE_SIZE_THRESHOLD = TSFileDescriptor.getInstance()
       .getConfig().pageSizeInByte;
 
-  private MemTableFlushUtil(){
+  private MemTableFlushUtil() {
 
   }
 
   private static int writeOneSeries(List<TimeValuePair> tvPairs, IChunkWriter seriesWriterImpl,
-                                    TSDataType dataType)
+      TSDataType dataType)
       throws IOException {
     int count = 0;
     switch (dataType) {
@@ -99,7 +98,7 @@ public class MemTableFlushUtil {
    * the function for flushing memtable.
    */
   public static void flushMemTable(FileSchema fileSchema, TsFileIOWriter tsFileIoWriter,
-                                   IMemTable imemTable, long version)
+      IMemTable imemTable, long version)
       throws IOException {
     for (String deviceId : imemTable.getMemTableMap().keySet()) {
       long startPos = tsFileIoWriter.getPos();
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/Deletion.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/Deletion.java
index bf59f04..549bf07 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/Deletion.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/Deletion.java
@@ -25,6 +25,7 @@ import java.util.Objects;
  * Deletion is a delete operation on a timeseries.
  */
 public class Deletion extends Modification {
+
   private long timestamp;
 
   public Deletion(String path, long versionNum, long timestamp) {
@@ -42,8 +43,9 @@ public class Deletion extends Modification {
 
   @Override
   public boolean equals(Object obj) {
-    if (!(obj instanceof Modification))
+    if (!(obj instanceof Modification)) {
       return false;
+    }
     Deletion del = (Deletion) obj;
     return super.equals(obj) && del.timestamp == this.timestamp;
   }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/ModificationFile.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/ModificationFile.java
index a970e21..180f705 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/ModificationFile.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/modification/ModificationFile.java
@@ -23,17 +23,16 @@ import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
-
 import org.apache.iotdb.db.engine.modification.io.LocalTextModificationAccessor;
 import org.apache.iotdb.db.engine.modification.io.ModificationReader;
 import org.apache.iotdb.db.engine.modification.io.ModificationWriter;
 
 /**
  * ModificationFile stores the Modifications of a TsFile or unseq file in another file in the same
- * directory.
- * Methods in this class are highly synchronized for concurrency safety.
+ * directory. Methods in this class are highly synchronized for concurrency safety.
  */
 public class ModificationFile {
+
   public static final String FILE_SUFFIX = ".mods";
 
   private List<Modification> modifications;
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java
index 64cb6b7..68bcdc1 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowProcessor.java
@@ -29,7 +29,6 @@ import java.util.Map;
 import java.util.concurrent.Future;
 import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.ReentrantLock;
-
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBConstant;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
@@ -96,7 +95,7 @@ public class OverflowProcessor extends Processor {
   private VersionController versionController;
 
   public OverflowProcessor(String processorName, Map<String, Action> parameters,
-                           FileSchema fileSchema, VersionController versionController)
+      FileSchema fileSchema, VersionController versionController)
       throws IOException {
     super(processorName);
     this.fileSchema = fileSchema;
@@ -170,9 +169,6 @@ public class OverflowProcessor extends Processor {
 
   /**
    * insert one time-series record
-   *
-   * @param tsRecord
-   * @throws IOException
    */
   public void insert(TSRecord tsRecord) throws IOException {
     // memory control
@@ -233,15 +229,16 @@ public class OverflowProcessor extends Processor {
 
   /**
    * Delete data of a timeseries whose time ranges from 0 to timestamp.
-   *  @param deviceId the deviceId of the timeseries.
+   *
+   * @param deviceId the deviceId of the timeseries.
    * @param measurementId the measurementId of the timeseries.
    * @param timestamp the upper-bound of deletion time.
    * @param version the version number of this deletion.
    * @param updatedModFiles add successfully updated Modification files to the list, and abort them
-   *                        when exception is
+   * when exception is
    */
   public void delete(String deviceId, String measurementId, long timestamp, long version,
-                     List<ModificationFile> updatedModFiles) throws IOException {
+      List<ModificationFile> updatedModFiles) throws IOException {
     workResource.delete(deviceId, measurementId, timestamp, version, updatedModFiles);
     workSupport.delete(deviceId, measurementId, timestamp, false);
     if (flushStatus.isFlushing()) {
@@ -251,18 +248,13 @@ public class OverflowProcessor extends Processor {
   }
 
   /**
-   * query all overflow data which contain insert data in memory, insert data in file, update/delete data in memory,
-   * update/delete data in file.
-   *
+   * query all overflow data which contain insert data in memory, insert data in file, update/delete
+   * data in memory, update/delete data in file.
    *
-   * @param deviceId
-   * @param measurementId
-   * @param dataType
    * @return OverflowSeriesDataSource
-   * @throws IOException
    */
   public OverflowSeriesDataSource query(String deviceId, String measurementId, Filter filter,
-                                        TSDataType dataType, QueryContext context)
+      TSDataType dataType, QueryContext context)
       throws IOException {
     queryFlushLock.lock();
     try {
@@ -295,15 +287,13 @@ public class OverflowProcessor extends Processor {
   }
 
   /**
-   * query insert data in memory table. while flushing, merge the work memory table with flush memory table.
+   * query insert data in memory table. while flushing, merge the work memory table with flush
+   * memory table.
    *
-   * @param deviceId
-   * @param measurementId
-   * @param dataType
    * @return insert data in SeriesChunkInMemTable
    */
   private TimeValuePairSorter queryOverflowInsertInMemory(String deviceId, String measurementId,
-                                                          TSDataType dataType) {
+      TSDataType dataType) {
 
     MemSeriesLazyMerger memSeriesLazyMerger = new MemSeriesLazyMerger();
     if (flushStatus.isFlushing()) {
@@ -319,15 +309,13 @@ public class OverflowProcessor extends Processor {
   /**
    * Get the insert data which is WORK in unseqTsFile.
    *
-   * @param deviceId
-   * @param measurementId
-   * @param dataType
-   * @return the seriesPath of unseqTsFile, List of TimeSeriesChunkMetaData for the special time-series.
+   * @return the seriesPath of unseqTsFile, List of TimeSeriesChunkMetaData for the special
+   * time-series.
    */
   private Pair<String, List<ChunkMetaData>> queryWorkDataInOverflowInsert(String deviceId,
-                                                                          String measurementId,
-                                                                          TSDataType dataType,
-                                                                          QueryContext context) {
+      String measurementId,
+      TSDataType dataType,
+      QueryContext context) {
     Pair<String, List<ChunkMetaData>> pair = new Pair<String, List<ChunkMetaData>>(
         workResource.getInsertFilePath(),
         workResource.getInsertMetadatas(deviceId, measurementId, dataType, context));
@@ -337,13 +325,10 @@ public class OverflowProcessor extends Processor {
   /**
    * Get the all merge data in unseqTsFile and overflowFile.
    *
-   * @param deviceId
-   * @param measurementId
-   * @param dataType
    * @return MergeSeriesDataSource
    */
   public MergeSeriesDataSource queryMerge(String deviceId, String measurementId,
-                                          TSDataType dataType, QueryContext context) {
+      TSDataType dataType, QueryContext context) {
     Pair<String, List<ChunkMetaData>> mergeInsert = queryMergeDataInOverflowInsert(deviceId,
         measurementId,
         dataType, context);
@@ -351,9 +336,9 @@ public class OverflowProcessor extends Processor {
   }
 
   public OverflowSeriesDataSource queryMerge(String deviceId, String measurementId,
-                                             TSDataType dataType,
-                                             boolean isMerge,
-                                             QueryContext context) {
+      TSDataType dataType,
+      boolean isMerge,
+      QueryContext context) {
     Pair<String, List<ChunkMetaData>> mergeInsert = queryMergeDataInOverflowInsert(deviceId,
         measurementId,
         dataType, context);
@@ -369,15 +354,13 @@ public class OverflowProcessor extends Processor {
   /**
    * Get the insert data which is MERGE in unseqTsFile
    *
-   * @param deviceId
-   * @param measurementId
-   * @param dataType
-   * @return the seriesPath of unseqTsFile, List of TimeSeriesChunkMetaData for the special time-series.
+   * @return the seriesPath of unseqTsFile, List of TimeSeriesChunkMetaData for the special
+   * time-series.
    */
   private Pair<String, List<ChunkMetaData>> queryMergeDataInOverflowInsert(String deviceId,
-                                                                           String measurementId,
-                                                                           TSDataType dataType,
-                                                                           QueryContext context) {
+      String measurementId,
+      TSDataType dataType,
+      QueryContext context) {
     if (!isMerge) {
       return new Pair<String, List<ChunkMetaData>>(null, null);
     }
@@ -608,16 +591,16 @@ public class OverflowProcessor extends Processor {
   }
 
   /**
-   * Close current OverflowFile and open a new one for future writes. Block new writes and wait until current writes
-   * finish.
+   * Close current OverflowFile and open a new one for future writes. Block new writes and wait
+   * until current writes finish.
    */
   private void rollToNewFile() {
     // TODO : [MemControl] implement this
   }
 
   /**
-   * Check whether current overflow file contains too many metadata or size of current overflow file is too large If
-   * true, close current file and open a new one.
+   * Check whether current overflow file contains too many metadata or size of current overflow file
+   * is too large If true, close current file and open a new one.
    */
   private boolean checkSize() {
     IoTDBConfig config = IoTDBDescriptor.getInstance().getConfig();
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
index eba8ede..33886a6 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/overflow/ioV2/OverflowResource.java
@@ -27,7 +27,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.commons.io.FileUtils;
 import org.apache.iotdb.db.conf.IoTDBConstant;
 import org.apache.iotdb.db.engine.memtable.IMemTable;
@@ -70,7 +69,7 @@ public class OverflowResource {
   private ModificationFile modificationFile;
 
   public OverflowResource(String parentPath, String dataPath, VersionController versionController)
-          throws IOException {
+      throws IOException {
     this.insertMetadatas = new HashMap<>();
     this.appendInsertMetadatas = new ArrayList<>();
     this.parentPath = parentPath;
@@ -170,7 +169,7 @@ public class OverflowResource {
   }
 
   public List<ChunkMetaData> getInsertMetadatas(String deviceId, String measurementId,
-                                                TSDataType dataType, QueryContext context) {
+      TSDataType dataType, QueryContext context) {
     List<ChunkMetaData> chunkMetaDatas = new ArrayList<>();
     if (insertMetadatas.containsKey(deviceId) && insertMetadatas.get(deviceId)
         .containsKey(measurementId)) {
@@ -183,17 +182,17 @@ public class OverflowResource {
     }
     try {
       List<Modification> modifications = context.getPathModifications(modificationFile,
-              deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId);
+          deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId);
       QueryUtils.modifyChunkMetaData(chunkMetaDatas, modifications);
     } catch (IOException e) {
       LOGGER.error("Cannot access the modification file of Overflow {}, because:", parentPath,
-              e);
+          e);
     }
     return chunkMetaDatas;
   }
 
   public void flush(FileSchema fileSchema, IMemTable memTable,
-                    Map<String, Map<String, OverflowSeriesImpl>> overflowTrees, String processorName)
+      Map<String, Map<String, OverflowSeriesImpl>> overflowTrees, String processorName)
       throws IOException {
     // insert data
     long startPos = insertIO.getPos();
@@ -214,7 +213,7 @@ public class OverflowResource {
       insertIO.toTail();
       long lastPosition = insertIO.getPos();
       MemTableFlushUtil.flushMemTable(fileSchema, insertIO, memTable,
-              versionController.nextVersion());
+          versionController.nextVersion());
       List<ChunkGroupMetaData> rowGroupMetaDatas = insertIO.getChunkGroupMetaDatas();
       appendInsertMetadatas.addAll(rowGroupMetaDatas);
       if (!rowGroupMetaDatas.isEmpty()) {
@@ -295,17 +294,18 @@ public class OverflowResource {
 
   /**
    * Delete data of a timeseries whose time ranges from 0 to timestamp.
-   *  @param deviceId the deviceId of the timeseries.
+   *
+   * @param deviceId the deviceId of the timeseries.
    * @param measurementId the measurementId of the timeseries.
    * @param timestamp the upper-bound of deletion time.
    * @param updatedModFiles add successfully updated modificationFile to this list, so that the
-   *                        deletion can be aborted when exception is thrown.
+   * deletion can be aborted when exception is thrown.
    */
   public void delete(String deviceId, String measurementId, long timestamp, long version,
-                     List<ModificationFile> updatedModFiles)
-          throws IOException {
+      List<ModificationFile> updatedModFiles)
+      throws IOException {
     modificationFile.write(new Deletion(deviceId + IoTDBConstant.PATH_SEPARATOR
-            + measurementId, version, timestamp));
+        + measurementId, version, timestamp));
     updatedModFiles.add(modificationFile);
   }
 }
\ No newline at end of file
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
index 849af4b..41a61e0 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/monitor/StatMonitor.java
@@ -25,7 +25,6 @@ import java.util.Map;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
-
 import org.apache.iotdb.db.concurrent.IoTDBThreadPoolFactory;
 import org.apache.iotdb.db.concurrent.ThreadName;
 import org.apache.iotdb.db.conf.IoTDBConfig;
@@ -98,7 +97,7 @@ public class StatMonitor implements IService {
    * @return TSRecord contains the DataPoints of a statGroupDeltaName
    */
   public static TSRecord convertToTSRecord(HashMap<String, AtomicLong> hashMap,
-                                           String statGroupDeltaName, long curTime) {
+      String statGroupDeltaName, long curTime) {
     TSRecord tsRecord = new TSRecord(curTime, statGroupDeltaName);
     tsRecord.dataPointList = new ArrayList<DataPoint>() {
       {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
index 1ae54f3..65f06f0 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/qp/strategy/PhysicalGenerator.java
@@ -20,7 +20,6 @@
 package org.apache.iotdb.db.qp.strategy;
 
 import java.util.List;
-
 import org.apache.iotdb.db.auth.AuthException;
 import org.apache.iotdb.db.exception.ProcessorException;
 import org.apache.iotdb.db.exception.qp.LogicalOperatorException;
@@ -65,15 +64,15 @@ public class PhysicalGenerator {
   }
 
   public PhysicalPlan transformToPhysicalPlan(Operator operator)
-          throws QueryProcessorException, ProcessorException {
+      throws QueryProcessorException, ProcessorException {
     List<Path> paths;
     switch (operator.getType()) {
       case AUTHOR:
         AuthorOperator author = (AuthorOperator) operator;
         try {
           return new AuthorPlan(author.getAuthorType(), author.getUserName(), author.getRoleName(),
-                  author.getPassWord(), author.getNewPassword(), author.getPrivilegeList(),
-                  author.getNodeName());
+              author.getPassWord(), author.getNewPassword(), author.getPrivilegeList(),
+              author.getNodeName());
         } catch (AuthException e) {
           throw new QueryProcessorException(e.getMessage());
         }
@@ -85,12 +84,12 @@ public class PhysicalGenerator {
       case METADATA:
         MetadataOperator metadata = (MetadataOperator) operator;
         return new MetadataPlan(metadata.getNamespaceType(), metadata.getPath(),
-                metadata.getDataType(),
-                metadata.getEncoding(), metadata.getEncodingArgs(), metadata.getDeletePathList());
+            metadata.getDataType(),
+            metadata.getEncoding(), metadata.getEncodingArgs(), metadata.getDeletePathList());
       case PROPERTY:
         PropertyOperator property = (PropertyOperator) operator;
         return new PropertyPlan(property.getPropertyType(), property.getPropertyPath(),
-                property.getMetadataPath());
+            property.getMetadataPath());
       case DELETE:
         DeleteOperator delete = (DeleteOperator) operator;
         paths = delete.getSelectedPaths();
@@ -103,14 +102,14 @@ public class PhysicalGenerator {
         paths = Insert.getSelectedPaths();
         if (paths.size() != 1) {
           throw new LogicalOperatorException(
-                  "For Insert command, cannot specified more than one seriesPath:" + paths);
+              "For Insert command, cannot specified more than one seriesPath:" + paths);
         }
         if (Insert.getTime() <= 0) {
           throw new LogicalOperatorException("For Insert command, time must greater than 0.");
         }
         return new InsertPlan(paths.get(0).getFullPath(), Insert.getTime(),
-                Insert.getMeasurementList(),
-                Insert.getValueList());
+            Insert.getMeasurementList(),
+            Insert.getValueList());
       // case UPDATE:
       // UpdateOperator update = (UpdateOperator) operator;
       // UpdatePlan updatePlan = new UpdatePlan();
@@ -234,7 +233,7 @@ public class PhysicalGenerator {
   // }
 
   private PhysicalPlan transformQuery(QueryOperator queryOperator)
-          throws QueryProcessorException, ProcessorException {
+      throws QueryProcessorException, ProcessorException {
 
     QueryPlan queryPlan;
 
@@ -255,7 +254,7 @@ public class PhysicalGenerator {
     } else if (queryOperator.hasAggregation()) { // ordinary query
       queryPlan = new AggregationPlan();
       ((AggregationPlan) queryPlan)
-              .setAggregations(queryOperator.getSelectOperator().getAggregations());
+          .setAggregations(queryOperator.getSelectOperator().getAggregations());
     } else {
       queryPlan = new QueryPlan();
     }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java b/iotdb/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
index e05d850..92ee66d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/context/QueryContext.java
@@ -21,11 +21,9 @@ package org.apache.iotdb.db.query.context;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-
 import org.apache.iotdb.db.engine.modification.Modification;
 import org.apache.iotdb.db.engine.modification.ModificationFile;
 
@@ -40,8 +38,8 @@ public class QueryContext {
    */
   private Map<String, Map<String, List<Modification>>> filePathModCache = new HashMap<>();
   /**
-   * The key is the path of a ModificationFile and the value is all Modifications in this file.
-   * We use this field because each call of Modification.getModifications() return a copy of the
+   * The key is the path of a ModificationFile and the value is all Modifications in this file. We
+   * use this field because each call of Modification.getModifications() return a copy of the
    * Modifications, and we do not want it to create multiple copies within a query.
    */
   private Map<String, List<Modification>> fileModCache = new HashMap<>();
@@ -49,16 +47,12 @@ public class QueryContext {
   /**
    * Find the modifications of timeseries 'path' in 'modFile'. If they are not in the cache, read
    * them from 'modFile' and put then into the cache.
-   * @param modFile
-   * @param path
-   * @return
-   * @throws IOException
    */
   public List<Modification> getPathModifications(ModificationFile modFile, String path)
-          throws IOException {
+      throws IOException {
 
     Map<String, List<Modification>> fileModifications =
-            filePathModCache.computeIfAbsent(modFile.getFilePath(), k -> new HashMap<>());
+        filePathModCache.computeIfAbsent(modFile.getFilePath(), k -> new HashMap<>());
     List<Modification> pathModifications = fileModifications.get(path);
 
     if (pathModifications == null) {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java
index 75a4764..f3fd1f3 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/control/QueryDataSourceManager.java
@@ -27,7 +27,8 @@ import org.apache.iotdb.tsfile.read.expression.impl.SingleSeriesExpression;
 
 /**
  * <p>
- * This class is used to get query data source of a given path. See the component of <code>QueryDataSource</code>
+ * This class is used to get query data source of a given path. See the component of
+ * <code>QueryDataSource</code>
  */
 public class QueryDataSourceManager {
 
@@ -37,7 +38,7 @@ public class QueryDataSourceManager {
   }
 
   public static QueryDataSource getQueryDataSource(long jobId, Path selectedPath,
-                                                   QueryContext context)
+      QueryContext context)
       throws FileNodeManagerException {
 
     SingleSeriesExpression singleSeriesExpression = new SingleSeriesExpression(selectedPath, null);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java
index 224aed7..79ad5dd 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithTimeGenerator.java
@@ -59,7 +59,6 @@ public class EngineExecutorWithTimeGenerator {
    * @return QueryDataSet object
    * @throws IOException IOException
    * @throws FileNodeManagerException FileNodeManagerException
-   * @param context
    */
   public QueryDataSet execute(QueryContext context) throws IOException, FileNodeManagerException {
 
@@ -90,7 +89,7 @@ public class EngineExecutorWithTimeGenerator {
   }
 
   private List<EngineReaderByTimeStamp> getReadersOfSelectedPaths(List<Path> paths,
-                                                                  QueryContext context)
+      QueryContext context)
       throws IOException, FileNodeManagerException {
 
     List<EngineReaderByTimeStamp> readersOfSelectedSeries = new ArrayList<>();
@@ -98,7 +97,7 @@ public class EngineExecutorWithTimeGenerator {
     for (Path path : paths) {
 
       QueryDataSource queryDataSource = QueryDataSourceManager.getQueryDataSource(jobId, path,
-              context);
+          context);
 
       PriorityMergeReaderByTimestamp mergeReaderByTimestamp = new PriorityMergeReaderByTimestamp();
 
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java
index 36eb2b1..dd2d18f 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/executor/EngineExecutorWithoutTimeGenerator.java
@@ -55,7 +55,6 @@ public class EngineExecutorWithoutTimeGenerator {
 
   /**
    * with global time filter.
-   * @param context
    */
   public QueryDataSet executeWithGlobalTimeFilter(QueryContext context)
       throws IOException, FileNodeManagerException, PathErrorException {
@@ -71,7 +70,7 @@ public class EngineExecutorWithoutTimeGenerator {
     for (Path path : queryExpression.getSelectedSeries()) {
 
       QueryDataSource queryDataSource = QueryDataSourceManager.getQueryDataSource(jobId, path,
-              context);
+          context);
 
       // add data type
       dataTypes.add(MManager.getInstance().getSeriesType(path.getFullPath()));
@@ -111,7 +110,7 @@ public class EngineExecutorWithoutTimeGenerator {
     for (Path path : queryExpression.getSelectedSeries()) {
 
       QueryDataSource queryDataSource = QueryDataSourceManager.getQueryDataSource(jobId, path,
-              context);
+          context);
 
       // add data type
       dataTypes.add(MManager.getInstance().getSeriesType(path.getFullPath()));
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java b/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java
index d3f83d9..cd88f4a 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/factory/SeriesReaderFactory.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.query.factory;
 
 import java.io.IOException;
 import java.util.List;
-
 import org.apache.iotdb.db.engine.filenode.IntervalFileNode;
 import org.apache.iotdb.db.engine.modification.Modification;
 import org.apache.iotdb.db.engine.querycontext.OverflowInsertFile;
@@ -70,29 +69,29 @@ public class SeriesReaderFactory {
    * process, it's no need to maintain the opened file stream.
    */
   public PriorityMergeReader createUnSeqMergeReader(
-          OverflowSeriesDataSource overflowSeriesDataSource, Filter filter)
-          throws IOException {
+      OverflowSeriesDataSource overflowSeriesDataSource, Filter filter)
+      throws IOException {
 
     PriorityMergeReader unSeqMergeReader = new PriorityMergeReader();
 
     int priorityValue = 1;
 
     for (OverflowInsertFile overflowInsertFile : overflowSeriesDataSource
-            .getOverflowInsertFileList()) {
+        .getOverflowInsertFileList()) {
 
       // store only one opened file stream into manager, to avoid too many opened files
       TsFileSequenceReader unClosedTsFileReader = FileReaderManager.getInstance()
-              .get(overflowInsertFile.getFilePath(), true);
+          .get(overflowInsertFile.getFilePath(), true);
 
       ChunkLoaderImpl chunkLoader = new ChunkLoaderImpl(unClosedTsFileReader);
 
       for (ChunkMetaData chunkMetaData : overflowInsertFile.getChunkMetaDataList()) {
 
         DigestForFilter digest = new DigestForFilter(chunkMetaData.getStartTime(),
-                chunkMetaData.getEndTime(),
-                chunkMetaData.getDigest().getStatistics().get(StatisticConstant.MIN_VALUE),
-                chunkMetaData.getDigest().getStatistics().get(StatisticConstant.MAX_VALUE),
-                chunkMetaData.getTsDataType());
+            chunkMetaData.getEndTime(),
+            chunkMetaData.getDigest().getStatistics().get(StatisticConstant.MIN_VALUE),
+            chunkMetaData.getDigest().getStatistics().get(StatisticConstant.MAX_VALUE),
+            chunkMetaData.getTsDataType());
 
         if (filter != null && !filter.satisfy(digest)) {
           continue;
@@ -100,11 +99,11 @@ public class SeriesReaderFactory {
 
         Chunk chunk = chunkLoader.getChunk(chunkMetaData);
         ChunkReader chunkReader = filter != null ? new ChunkReaderWithFilter(chunk, filter)
-                : new ChunkReaderWithoutFilter(chunk);
+            : new ChunkReaderWithoutFilter(chunk);
 
         unSeqMergeReader
-                .addReaderWithPriority(new EngineChunkReader(chunkReader, unClosedTsFileReader),
-                        priorityValue);
+            .addReaderWithPriority(new EngineChunkReader(chunkReader, unClosedTsFileReader),
+                priorityValue);
         priorityValue++;
       }
     }
@@ -113,12 +112,12 @@ public class SeriesReaderFactory {
     if (overflowSeriesDataSource.hasRawChunk()) {
       if (filter != null) {
         unSeqMergeReader.addReaderWithPriority(
-                new MemChunkReaderWithFilter(overflowSeriesDataSource.getReadableMemChunk(), filter),
-                priorityValue);
+            new MemChunkReaderWithFilter(overflowSeriesDataSource.getReadableMemChunk(), filter),
+            priorityValue);
       } else {
         unSeqMergeReader.addReaderWithPriority(
-                new MemChunkReaderWithoutFilter(overflowSeriesDataSource.getReadableMemChunk()),
-                priorityValue);
+            new MemChunkReaderWithoutFilter(overflowSeriesDataSource.getReadableMemChunk()),
+            priorityValue);
       }
     }
 
@@ -127,58 +126,59 @@ public class SeriesReaderFactory {
   }
 
   // TODO createUnSeqMergeReaderByTime a method with filter
-  
+
   /**
    * This method is used to construct reader for merge process in IoTDB. To merge only one TsFile
    * data and one UnSeqFile data.
    */
   public IReader createSeriesReaderForMerge(IntervalFileNode intervalFileNode,
-                                            OverflowSeriesDataSource overflowSeriesDataSource,
-                                            SingleSeriesExpression singleSeriesExpression,
-                                            QueryContext context)
-          throws IOException {
+      OverflowSeriesDataSource overflowSeriesDataSource,
+      SingleSeriesExpression singleSeriesExpression,
+      QueryContext context)
+      throws IOException {
 
     logger.debug("Create seriesReaders for merge. SeriesFilter = {}. TsFilePath = {}",
-            singleSeriesExpression,
-            intervalFileNode.getFilePath());
+        singleSeriesExpression,
+        intervalFileNode.getFilePath());
 
     PriorityMergeReader priorityMergeReader = new PriorityMergeReader();
 
     // Sequence reader
     IReader seriesInTsFileReader = createSealedTsFileReaderForMerge(intervalFileNode,
-            singleSeriesExpression, context);
+        singleSeriesExpression, context);
     priorityMergeReader.addReaderWithPriority(seriesInTsFileReader, 1);
 
     // UnSequence merge reader
     IReader unSeqMergeReader = createUnSeqMergeReader(overflowSeriesDataSource,
-            singleSeriesExpression.getFilter());
+        singleSeriesExpression.getFilter());
     priorityMergeReader.addReaderWithPriority(unSeqMergeReader, 2);
 
     return priorityMergeReader;
   }
 
   private IReader createSealedTsFileReaderForMerge(IntervalFileNode fileNode,
-                                                   SingleSeriesExpression singleSeriesExpression,
-                                                   QueryContext context)
-          throws IOException {
+      SingleSeriesExpression singleSeriesExpression,
+      QueryContext context)
+      throws IOException {
     TsFileSequenceReader tsFileSequenceReader = FileReaderManager.getInstance()
-            .get(fileNode.getFilePath(), false);
+        .get(fileNode.getFilePath(), false);
     ChunkLoaderImpl chunkLoader = new ChunkLoaderImpl(tsFileSequenceReader);
     MetadataQuerier metadataQuerier = new MetadataQuerierByFileImpl(tsFileSequenceReader);
     List<ChunkMetaData> metaDataList = metadataQuerier
-            .getChunkMetaDataList(singleSeriesExpression.getSeriesPath());
+        .getChunkMetaDataList(singleSeriesExpression.getSeriesPath());
 
     List<Modification> modifications = context.getPathModifications(fileNode.getModFile(),
-            singleSeriesExpression.getSeriesPath().getFullPath());
+        singleSeriesExpression.getSeriesPath().getFullPath());
     QueryUtils.modifyChunkMetaData(metaDataList, modifications);
 
     FileSeriesReader seriesInTsFileReader = new FileSeriesReaderWithFilter(chunkLoader,
-            metaDataList,
-            singleSeriesExpression.getFilter());
+        metaDataList,
+        singleSeriesExpression.getFilter());
     return new SealedTsFilesReader(seriesInTsFileReader, context);
   }
 
   private static class SeriesReaderFactoryHelper {
+
     private static final SeriesReaderFactory INSTANCE = new SeriesReaderFactory();
   }
 }
\ No newline at end of file
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java
index 16c0e13..acbb621 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SealedTsFilesReader.java
@@ -21,9 +21,7 @@ package org.apache.iotdb.db.query.reader.sequence;
 
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
-
 import org.apache.iotdb.db.engine.filenode.IntervalFileNode;
 import org.apache.iotdb.db.engine.modification.Modification;
 import org.apache.iotdb.db.query.context.QueryContext;
@@ -56,7 +54,7 @@ public class SealedTsFilesReader implements IReader {
   private QueryContext context;
 
   public SealedTsFilesReader(Path seriesPath, List<IntervalFileNode> sealedTsFiles, Filter filter,
-                             QueryContext context) {
+      QueryContext context) {
     this(seriesPath, sealedTsFiles, context);
     this.filter = filter;
 
@@ -66,7 +64,7 @@ public class SealedTsFilesReader implements IReader {
    * init with seriesPath and sealedTsFiles.
    */
   public SealedTsFilesReader(Path seriesPath, List<IntervalFileNode> sealedTsFiles,
-                             QueryContext context) {
+      QueryContext context) {
     this.seriesPath = seriesPath;
     this.sealedTsFiles = sealedTsFiles;
     this.usedIntervalFileIndex = 0;
@@ -168,17 +166,17 @@ public class SealedTsFilesReader implements IReader {
   }
 
   private void initSingleTsFileReader(IntervalFileNode fileNode, QueryContext context)
-          throws IOException {
+      throws IOException {
 
     // to avoid too many opened files
     TsFileSequenceReader tsFileReader = FileReaderManager.getInstance()
-            .get(fileNode.getFilePath(), false);
+        .get(fileNode.getFilePath(), false);
 
     MetadataQuerierByFileImpl metadataQuerier = new MetadataQuerierByFileImpl(tsFileReader);
     List<ChunkMetaData> metaDataList = metadataQuerier.getChunkMetaDataList(seriesPath);
 
     List<Modification> pathModifications = context.getPathModifications(fileNode.getModFile(),
-            seriesPath.getFullPath());
+        seriesPath.getFullPath());
     if (pathModifications.size() > 0) {
       QueryUtils.modifyChunkMetaData(metaDataList, pathModifications);
     }
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java
index 0a3f1e2..e4ca98f 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/reader/sequence/SequenceDataReader.java
@@ -47,7 +47,7 @@ public class SequenceDataReader implements IReader {
    * init with globalSortedSeriesDataSource and filter.
    */
   public SequenceDataReader(GlobalSortedSeriesDataSource sources, Filter filter,
-                            QueryContext context)
+      QueryContext context)
       throws IOException {
     seriesReaders = new ArrayList<>();
 
@@ -58,7 +58,7 @@ public class SequenceDataReader implements IReader {
     if (sources.hasSealedTsFiles()) {
       seriesReaders.add(
           new SealedTsFilesReader(sources.getSeriesPath(), sources.getSealedTsFiles(), filter,
-                  context));
+              context));
     }
 
     // add reader for unSealed TsFile
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java
index 8ee11d4..6c50fb7 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/query/timegenerator/EngineNodeConstructor.java
@@ -57,7 +57,7 @@ public class EngineNodeConstructor {
    * @throws FileNodeManagerException FileNodeManagerException
    */
   public Node construct(IExpression expression, QueryContext context)
-          throws IOException, FileNodeManagerException {
+      throws IOException, FileNodeManagerException {
     if (expression.getType() == SERIES) {
       return new EngineLeafNode(generateSeriesReader((SingleSeriesExpression) expression, context));
     } else {
@@ -79,7 +79,7 @@ public class EngineNodeConstructor {
   }
 
   private IReader generateSeriesReader(SingleSeriesExpression singleSeriesExpression,
-                                       QueryContext context)
+      QueryContext context)
       throws IOException, FileNodeManagerException {
 
     QueryDataSource queryDataSource = QueryDataSourceManager.getQueryDataSource(jobId,
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java
index cb9d52b..4f5742d 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/writelog/replay/ConcreteLogReplayer.java
@@ -19,7 +19,6 @@
 package org.apache.iotdb.db.writelog.replay;
 
 import java.util.List;
-
 import org.apache.iotdb.db.engine.filenode.FileNodeManager;
 import org.apache.iotdb.db.exception.FileNodeManagerException;
 import org.apache.iotdb.db.exception.PathErrorException;
@@ -92,10 +91,10 @@ public class ConcreteLogReplayer implements LogReplayer {
     for (Path path : deletePlan.getPaths()) {
       if (isOverflow) {
         FileNodeManager.getInstance().deleteOverflow(path.getDevice(), path.getMeasurement(),
-                deletePlan.getDeleteTime());
+            deletePlan.getDeleteTime());
       } else {
         FileNodeManager.getInstance().deleteBufferWrite(path.getDevice(), path.getMeasurement(),
-                deletePlan.getDeleteTime());
+            deletePlan.getDeleteTime());
       }
     }
   }
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java
index 73f20ec..7c62ff7 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteBenchmark.java
@@ -33,7 +33,8 @@ import org.apache.iotdb.tsfile.write.schema.FileSchema;
 import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
 
 /**
- * BufferWrite insert Benchmark. This class is used to bench Bufferwrite module and gets its performance.
+ * BufferWrite insert Benchmark. This class is used to bench Bufferwrite module and gets its
+ * performance.
  */
 public class BufferWriteBenchmark {
 
@@ -94,7 +95,7 @@ public class BufferWriteBenchmark {
     });
 
     BufferWriteProcessor bufferWriteProcessor = new BufferWriteProcessor("BufferBenchmark",
-            "bench", "benchFile",
+        "bench", "benchFile",
         parameters, SysTimeVersionController.INSTANCE, fileSchema);
 
     long startTime = System.currentTimeMillis();
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java
index 8299d75..cdd9ec3 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorNewTest.java
@@ -28,7 +28,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.iotdb.db.conf.directories.Directories;
 import org.apache.iotdb.db.engine.MetadataManagerHelper;
 import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk;
@@ -93,19 +92,19 @@ public class BufferWriteProcessorNewTest {
 
   @Test
   public void testWriteAndFlush()
-          throws BufferWriteProcessorException, WriteProcessException, IOException, InterruptedException {
+      throws BufferWriteProcessorException, WriteProcessException, IOException, InterruptedException {
     bufferwrite = new BufferWriteProcessor(Directories.getInstance().getFolderForTest(),
-            processorName, filename,
-            parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(processorName));
+        processorName, filename,
+        parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(processorName));
     assertEquals(filename, bufferwrite.getFileName());
     assertEquals(processorName + File.separator + filename, bufferwrite.getFileRelativePath());
     assertEquals(true, bufferwrite.isNewProcessor());
     bufferwrite.setNewProcessor(false);
     assertEquals(false, bufferwrite.isNewProcessor());
     Pair<ReadOnlyMemChunk, List<ChunkMetaData>> pair = bufferwrite
-            .queryBufferWriteData(processorName,
-                    measurementId, dataType);
+        .queryBufferWriteData(processorName,
+            measurementId, dataType);
     ReadOnlyMemChunk left = pair.left;
     List<ChunkMetaData> right = pair.right;
     assertEquals(true, left.isEmpty());
@@ -145,9 +144,9 @@ public class BufferWriteProcessorNewTest {
 
     // test recovery
     BufferWriteProcessor bufferWriteProcessor = new BufferWriteProcessor(
-            Directories.getInstance().getFolderForTest(), processorName, filename, parameters,
-            SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(processorName));
+        Directories.getInstance().getFolderForTest(), processorName, filename, parameters,
+        SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(processorName));
     pair = bufferWriteProcessor.queryBufferWriteData(processorName, measurementId, dataType);
     left = pair.left;
     right = pair.right;
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java
index 6b3ccbe..06d47f1 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/bufferwrite/BufferWriteProcessorTest.java
@@ -29,7 +29,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
-
 import org.apache.iotdb.db.conf.directories.Directories;
 import org.apache.iotdb.db.engine.MetadataManagerHelper;
 import org.apache.iotdb.db.engine.PathUtils;
@@ -112,10 +111,10 @@ public class BufferWriteProcessorTest {
 
   @Test
   public void testWriteAndAbnormalRecover()
-          throws WriteProcessException, InterruptedException, IOException, ProcessorException {
+      throws WriteProcessException, InterruptedException, IOException, ProcessorException {
     bufferwrite = new BufferWriteProcessor(directories.getFolderForTest(), deviceId, insertPath,
-            parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(deviceId));
+        parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(deviceId));
     for (int i = 1; i < 100; i++) {
       bufferwrite.write(deviceId, measurementId, i, dataType, String.valueOf(i));
     }
@@ -138,14 +137,14 @@ public class BufferWriteProcessorTest {
     bufferwrite.close();
     file.renameTo(restoreFile);
     BufferWriteProcessor bufferWriteProcessor = new BufferWriteProcessor(
-            directories.getFolderForTest(), deviceId,
-            insertPath, parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(deviceId));
+        directories.getFolderForTest(), deviceId,
+        insertPath, parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(deviceId));
     assertEquals(true, insertFile.exists());
     assertEquals(insertFileLength, insertFile.length());
     Pair<ReadOnlyMemChunk, List<ChunkMetaData>> pair = bufferWriteProcessor
-            .queryBufferWriteData(deviceId,
-                    measurementId, dataType);
+        .queryBufferWriteData(deviceId,
+            measurementId, dataType);
     assertEquals(true, pair.left.isEmpty());
     assertEquals(1, pair.right.size());
     ChunkMetaData chunkMetaData = pair.right.get(0);
@@ -157,10 +156,10 @@ public class BufferWriteProcessorTest {
 
   @Test
   public void testWriteAndNormalRecover()
-          throws WriteProcessException, ProcessorException, InterruptedException {
+      throws WriteProcessException, ProcessorException, InterruptedException {
     bufferwrite = new BufferWriteProcessor(directories.getFolderForTest(), deviceId, insertPath,
-            parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(deviceId));
+        parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(deviceId));
     for (int i = 1; i < 100; i++) {
       bufferwrite.write(deviceId, measurementId, i, dataType, String.valueOf(i));
     }
@@ -172,12 +171,12 @@ public class BufferWriteProcessorTest {
     File restoreFile = new File(dataFile, restoreFilePath);
     assertEquals(true, restoreFile.exists());
     BufferWriteProcessor bufferWriteProcessor = new BufferWriteProcessor(
-            directories.getFolderForTest(), deviceId,
-            insertPath, parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(deviceId));
+        directories.getFolderForTest(), deviceId,
+        insertPath, parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(deviceId));
     Pair<ReadOnlyMemChunk, List<ChunkMetaData>> pair = bufferWriteProcessor
-            .queryBufferWriteData(deviceId,
-                    measurementId, dataType);
+        .queryBufferWriteData(deviceId,
+            measurementId, dataType);
     assertEquals(true, pair.left.isEmpty());
     assertEquals(1, pair.right.size());
     ChunkMetaData chunkMetaData = pair.right.get(0);
@@ -190,10 +189,10 @@ public class BufferWriteProcessorTest {
 
   @Test
   public void testWriteAndQuery()
-          throws WriteProcessException, InterruptedException, ProcessorException {
+      throws WriteProcessException, InterruptedException, ProcessorException {
     bufferwrite = new BufferWriteProcessor(directories.getFolderForTest(), deviceId, insertPath,
-            parameters, SysTimeVersionController.INSTANCE,
-            FileSchemaUtils.constructFileSchema(deviceId));
+        parameters, SysTimeVersionController.INSTANCE,
+        FileSchemaUtils.constructFileSchema(deviceId));
     assertEquals(false, bufferwrite.isFlush());
     assertEquals(true, bufferwrite.canBeClosed());
     assertEquals(0, bufferwrite.memoryUsage());
@@ -211,8 +210,8 @@ public class BufferWriteProcessorTest {
     assertEquals(0, bufferwrite.memoryUsage());
     // query result
     Pair<ReadOnlyMemChunk, List<ChunkMetaData>> pair = bufferwrite
-            .queryBufferWriteData(deviceId, measurementId,
-                    dataType);
+        .queryBufferWriteData(deviceId, measurementId,
+            dataType);
     assertEquals(true, pair.left.isEmpty());
     assertEquals(1, pair.right.size());
     ChunkMetaData chunkMetaData = pair.right.get(0);
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java
index 78d90c1..15be8cb 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/memcontrol/BufferwriteMetaSizeControlTest.java
@@ -143,8 +143,8 @@ public class BufferwriteMetaSizeControlTest {
 
     try {
       processor = new BufferWriteProcessor(Directories.getInstance().getFolderForTest(), nsp,
-              filename,
-              parameters, SysTimeVersionController.INSTANCE, constructFileSchema(nsp));
+          filename,
+          parameters, SysTimeVersionController.INSTANCE, constructFileSchema(nsp));
     } catch (BufferWriteProcessorException e) {
       e.printStackTrace();
       fail(e.getMessage());
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionFileNodeTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionFileNodeTest.java
index e40be77..2c3bd20 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionFileNodeTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionFileNodeTest.java
@@ -19,11 +19,13 @@
 
 package org.apache.iotdb.db.engine.modification;
 
+import static junit.framework.TestCase.assertTrue;
+import static org.junit.Assert.assertEquals;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Iterator;
-
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.conf.directories.Directories;
 import org.apache.iotdb.db.engine.filenode.FileNodeManager;
@@ -46,9 +48,6 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static junit.framework.TestCase.assertTrue;
-import static org.junit.Assert.assertEquals;
-
 public class DeletionFileNodeTest {
 
   private String processorName = "root.test";
@@ -66,12 +65,13 @@ public class DeletionFileNodeTest {
 
   @Before
   public void setup() throws MetadataArgsErrorException,
-          PathErrorException, IOException, FileNodeManagerException {
+      PathErrorException, IOException, FileNodeManagerException {
     MManager.getInstance().setStorageLevelToMTree(processorName);
     for (int i = 0; i < 10; i++) {
       MManager.getInstance().addPathToMTree(processorName + "." + measurements[i], dataType,
-              encoding, args);
-      FileNodeManager.getInstance().addTimeSeries(new Path(processorName, measurements[i]), dataType,
+          encoding, args);
+      FileNodeManager.getInstance()
+          .addTimeSeries(new Path(processorName, measurements[i]), dataType,
               encoding);
     }
   }
@@ -83,7 +83,7 @@ public class DeletionFileNodeTest {
 
   @Test
   public void testDeleteInBufferWriteCache() throws
-          FileNodeManagerException {
+      FileNodeManagerException {
 
     for (int i = 1; i <= 100; i++) {
       TSRecord record = new TSRecord(i, processorName);
@@ -99,11 +99,11 @@ public class DeletionFileNodeTest {
     FileNodeManager.getInstance().delete(processorName, measurements[5], 50);
 
     SingleSeriesExpression expression = new SingleSeriesExpression(new Path(processorName,
-            measurements[5]), null);
+        measurements[5]), null);
     QueryContext context = new QueryContext();
     QueryDataSource dataSource = FileNodeManager.getInstance().query(expression, context);
     Iterator<TimeValuePair> timeValuePairs =
-            dataSource.getSeqDataSource().getReadableChunk().getIterator();
+        dataSource.getSeqDataSource().getReadableChunk().getIterator();
     int count = 0;
     while (timeValuePairs.hasNext()) {
       timeValuePairs.next();
@@ -128,20 +128,20 @@ public class DeletionFileNodeTest {
     FileNodeManager.getInstance().delete(processorName, measurements[3], 30);
 
     Modification[] realModifications = new Modification[]{
-            new Deletion(processorName + "." + measurements[5], 102, 50),
-            new Deletion(processorName + "." + measurements[4], 103, 40),
-            new Deletion(processorName + "." + measurements[3], 104, 30),
+        new Deletion(processorName + "." + measurements[5], 102, 50),
+        new Deletion(processorName + "." + measurements[4], 103, 40),
+        new Deletion(processorName + "." + measurements[3], 104, 30),
     };
 
     String fileNodePath = Directories.getInstance().getTsFileFolder(0) + File.separator
-            + processorName;
+        + processorName;
     File fileNodeDir = new File(fileNodePath);
     File[] modFiles = fileNodeDir.listFiles((dir, name)
-            -> name.endsWith(ModificationFile.FILE_SUFFIX));
+        -> name.endsWith(ModificationFile.FILE_SUFFIX));
     assertEquals(modFiles.length, 1);
 
     LocalTextModificationAccessor accessor =
-            new LocalTextModificationAccessor(modFiles[0].getPath());
+        new LocalTextModificationAccessor(modFiles[0].getPath());
     try {
       Collection<Modification> modifications = accessor.read();
       assertEquals(modifications.size(), 3);
@@ -181,11 +181,11 @@ public class DeletionFileNodeTest {
     FileNodeManager.getInstance().delete(processorName, measurements[5], 50);
 
     SingleSeriesExpression expression = new SingleSeriesExpression(new Path(processorName,
-            measurements[5]), null);
+        measurements[5]), null);
     QueryContext context = new QueryContext();
     QueryDataSource dataSource = FileNodeManager.getInstance().query(expression, context);
     Iterator<TimeValuePair> timeValuePairs =
-            dataSource.getOverflowSeriesDataSource().getReadableMemChunk().getIterator();
+        dataSource.getOverflowSeriesDataSource().getReadableMemChunk().getIterator();
     int count = 0;
     while (timeValuePairs.hasNext()) {
       timeValuePairs.next();
@@ -221,20 +221,20 @@ public class DeletionFileNodeTest {
     FileNodeManager.getInstance().delete(processorName, measurements[3], 30);
 
     Modification[] realModifications = new Modification[]{
-            new Deletion(processorName + "." + measurements[5], 103, 50),
-            new Deletion(processorName + "." + measurements[4], 104, 40),
-            new Deletion(processorName + "." + measurements[3], 105, 30),
+        new Deletion(processorName + "." + measurements[5], 103, 50),
+        new Deletion(processorName + "." + measurements[4], 104, 40),
+        new Deletion(processorName + "." + measurements[3], 105, 30),
     };
 
     String fileNodePath = IoTDBDescriptor.getInstance().getConfig().overflowDataDir + File.separator
-            + processorName + File.separator + "0" + File.separator;
+        + processorName + File.separator + "0" + File.separator;
     File fileNodeDir = new File(fileNodePath);
     File[] modFiles = fileNodeDir.listFiles((dir, name)
-            -> name.endsWith(ModificationFile.FILE_SUFFIX));
+        -> name.endsWith(ModificationFile.FILE_SUFFIX));
     assertEquals(modFiles.length, 1);
 
     LocalTextModificationAccessor accessor =
-            new LocalTextModificationAccessor(modFiles[0].getPath());
+        new LocalTextModificationAccessor(modFiles[0].getPath());
     Collection<Modification> modifications = accessor.read();
     assertEquals(modifications.size(), 3);
     int i = 0;
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionQueryTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionQueryTest.java
index 4cfe0d7..824def4 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionQueryTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/DeletionQueryTest.java
@@ -19,10 +19,11 @@
 
 package org.apache.iotdb.db.engine.modification;
 
+import static org.junit.Assert.assertEquals;
+
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
-
 import org.apache.iotdb.db.engine.filenode.FileNodeManager;
 import org.apache.iotdb.db.exception.FileNodeManagerException;
 import org.apache.iotdb.db.exception.MetadataArgsErrorException;
@@ -41,9 +42,8 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-
 public class DeletionQueryTest {
+
   private String processorName = "root.test";
 
   private static String[] measurements = new String[10];
@@ -60,12 +60,13 @@ public class DeletionQueryTest {
 
   @Before
   public void setup() throws MetadataArgsErrorException,
-          PathErrorException, IOException, FileNodeManagerException {
+      PathErrorException, IOException, FileNodeManagerException {
     MManager.getInstance().setStorageLevelToMTree(processorName);
     for (int i = 0; i < 10; i++) {
       MManager.getInstance().addPathToMTree(processorName + "." + measurements[i], dataType,
-              encoding, args);
-      FileNodeManager.getInstance().addTimeSeries(new Path(processorName, measurements[i]), dataType,
+          encoding, args);
+      FileNodeManager.getInstance()
+          .addTimeSeries(new Path(processorName, measurements[i]), dataType,
               encoding);
     }
   }
@@ -77,7 +78,7 @@ public class DeletionQueryTest {
 
   @Test
   public void testDeleteInBufferWriteCache() throws
-          FileNodeManagerException, IOException {
+      FileNodeManagerException, IOException {
 
     for (int i = 1; i <= 100; i++) {
       TSRecord record = new TSRecord(i, processorName);
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/ModificationFileTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/ModificationFileTest.java
index 21cf52c..b9a85e5 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/ModificationFileTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/ModificationFileTest.java
@@ -19,24 +19,24 @@
 
 package org.apache.iotdb.db.engine.modification;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.List;
-
 import org.junit.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 public class ModificationFileTest {
+
   @Test
   public void readMyWrite() {
     String tempFileName = "mod.temp";
     Modification[] modifications = new Modification[]{
-            new Deletion("p1", 1, 1),
-            new Deletion("p2", 2, 2),
-            new Deletion("p3", 3, 3),
-            new Deletion("p4", 4, 4),
+        new Deletion("p1", 1, 1),
+        new Deletion("p2", 2, 2),
+        new Deletion("p3", 3, 3),
+        new Deletion("p4", 4, 4),
     };
     try {
       ModificationFile mFile = new ModificationFile(tempFileName);
@@ -67,10 +67,10 @@ public class ModificationFileTest {
   public void testAbort() {
     String tempFileName = "mod.temp";
     Modification[] modifications = new Modification[]{
-            new Deletion("p1", 1, 1),
-            new Deletion("p2", 2, 2),
-            new Deletion("p3", 3, 3),
-            new Deletion("p4", 4, 4),
+        new Deletion("p1", 1, 1),
+        new Deletion("p2", 2, 2),
+        new Deletion("p3", 3, 3),
+        new Deletion("p4", 4, 4),
     };
     try {
       ModificationFile mFile = new ModificationFile(tempFileName);
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/io/LocalTextModificationAccessorTest.java b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/io/LocalTextModificationAccessorTest.java
index 91f92cc..d0059de 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/io/LocalTextModificationAccessorTest.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/engine/modification/io/LocalTextModificationAccessorTest.java
@@ -19,27 +19,28 @@
 
 package org.apache.iotdb.db.engine.modification.io;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.List;
-
 import org.apache.iotdb.db.engine.modification.Deletion;
 import org.apache.iotdb.db.engine.modification.Modification;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 public class LocalTextModificationAccessorTest {
 
   @Test
   public void readMyWrite() {
     String tempFileName = "mod.temp";
     Modification[] modifications = new Modification[]{
-            new Deletion("p1", 1, 1),
-            new Deletion("p2", 2, 2),
-            new Deletion("p3", 3, 3),
-            new Deletion("p4", 4, 4),
+        new Deletion("p1", 1, 1),
+        new Deletion("p2", 2, 2),
+        new Deletion("p3", 3, 3),
+        new Deletion("p4", 4, 4),
     };
     try {
       LocalTextModificationAccessor accessor = new LocalTextModificationAccessor(tempFileName);
diff --git a/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
index ef5ba95..5bcc27c 100644
--- a/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
+++ b/iotdb/src/test/java/org/apache/iotdb/db/integration/IoTDBEngineTimeGeneratorIT.java
@@ -48,8 +48,8 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
- * Notice that, all test begins with "IoTDB" is integration test. All test which will start the IoTDB server should be
- * defined as integration test.
+ * Notice that, all test begins with "IoTDB" is integration test. All test which will start the
+ * IoTDB server should be defined as integration test.
  */
 public class IoTDBEngineTimeGeneratorIT {
 
@@ -206,7 +206,7 @@ public class IoTDBEngineTimeGeneratorIT {
     OpenedFilePathsManager.getInstance().setJobIdForCurrentRequestThread(0);
     QueryContext context = new QueryContext();
     EngineTimeGenerator timeGenerator = new EngineTimeGenerator(0, singleSeriesExpression,
-            context);
+        context);
 
     int cnt = 0;
     while (timeGenerator.hasNext()) {
@@ -232,7 +232,7 @@ public class IoTDBEngineTimeGeneratorIT {
     IExpression singleSeriesExpression = new SingleSeriesExpression(pd1s0, valueGtEq);
     QueryContext context = new QueryContext();
     EngineTimeGenerator timeGenerator = new EngineTimeGenerator(0, singleSeriesExpression,
-            context);
+        context);
 
     int cnt = 0;
     while (timeGenerator.hasNext()) {
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java
index 588b311..4b35b0b 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/read/reader/chunk/ChunkReader.java
@@ -132,8 +132,8 @@ public abstract class ChunkReader {
     chunkDataBuffer.get(compressedPageBody, 0, compressedPageBodyLength);
     valueDecoder.reset();
     PageReader reader = new PageReader(ByteBuffer.wrap(unCompressor.uncompress(compressedPageBody)),
-            chunkHeader.getDataType(),
-            valueDecoder, timeDecoder, filter);
+        chunkHeader.getDataType(),
+        valueDecoder, timeDecoder, filter);
     reader.setDeletedAt(deletedAt);
     return reader;
   }
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
index 277b906..eb4ebf6 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/write/writer/TsFileIOWriter.java
@@ -26,7 +26,6 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
-
 import org.apache.iotdb.tsfile.common.conf.TSFileConfig;
 import org.apache.iotdb.tsfile.common.constant.StatisticConstant;
 import org.apache.iotdb.tsfile.file.MetaMarker;
@@ -143,9 +142,9 @@ public class TsFileIOWriter {
    * @throws IOException if I/O error occurs
    */
   public int startFlushChunk(MeasurementSchema descriptor, CompressionType compressionCodecName,
-                             TSDataType tsDataType, TSEncoding encodingType, Statistics<?> statistics, long maxTime,
-                             long minTime,
-                             int dataSize, int numOfPages) throws IOException {
+      TSDataType tsDataType, TSEncoding encodingType, Statistics<?> statistics, long maxTime,
+      long minTime,
+      int dataSize, int numOfPages) throws IOException {
     LOG.debug("start series chunk:{}, file position {}", descriptor, out.getPosition());
 
     currentChunkMetaData = new ChunkMetaData(descriptor.getMeasurementId(), tsDataType,