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/04/25 15:49:02 UTC

[incubator-iotdb] branch replace_list_by_array updated: remove unuseful codes

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

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


The following commit(s) were added to refs/heads/replace_list_by_array by this push:
     new 98c6eff  remove unuseful codes
98c6eff is described below

commit 98c6eff781ddc7e86899224a930ec0d7faaaa1a4
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Thu Apr 25 23:48:49 2019 +0800

    remove unuseful codes
---
 .../db/engine/filenode/FileNodeProcessor.java      | 29 +---------------------
 .../iotdb/db/engine/filenode/TsFileResource.java   |  7 ------
 .../iotdb/db/sync/receiver/SyncServiceImpl.java    |  2 --
 3 files changed, 1 insertion(+), 37 deletions(-)

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 df25fb4..6428fc6 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
@@ -382,22 +382,6 @@ public class FileNodeProcessor extends Processor implements IStatistic {
     return currentTsFileResource.getStartTime(deviceId);
   }
 
-  /**
-   * clear filenode.
-   */
-  public void clearFileNode() throws IOException {
-    isOverflowed = false;
-    emptyTsFileResource = new TsFileResource(null, false);
-    newFileNodes = new ArrayList<>();
-    isMerging = FileNodeProcessorStatus.NONE;
-    numOfMergeFile = 0;
-    fileNodeProcessorStore.setLastUpdateTimeMap(lastUpdateTimeMap);
-    fileNodeProcessorStore.setFileNodeProcessorStatus(isMerging);
-    fileNodeProcessorStore.setNewFileNodes(newFileNodes);
-    fileNodeProcessorStore.setNumOfMergeFile(numOfMergeFile);
-    fileNodeProcessorStore.setEmptyTsFileResource(emptyTsFileResource);
-  }
-
   private void addAllFileIntoIndex(List<TsFileResource> fileList) {
     // clear map
     invertedIndexOfFiles.clear();
@@ -548,17 +532,6 @@ public class FileNodeProcessor extends Processor implements IStatistic {
   }
 
   /**
-   * get buffer write processor.
-   */
-  public BufferWriteProcessor getBufferWriteProcessor() throws FileNodeProcessorException {
-    if (bufferWriteProcessor == null) {
-      LOGGER.error("The bufferwrite processor is null when get the bufferwriteProcessor");
-      throw new FileNodeProcessorException("The bufferwrite processor is null");
-    }
-    return bufferWriteProcessor;
-  }
-
-  /**
    * get overflow processor by processor name.
    */
   public OverflowProcessor getOverflowProcessor(String processorName) throws IOException {
@@ -1726,7 +1699,7 @@ public class FileNodeProcessor extends Processor implements IStatistic {
     if (bufferWriteProcessor != null && !bufferWriteProcessor.isClosed()) {
       bufferWriteFlushFuture = bufferWriteProcessor.flush();
     }
-    if (overflowProcessor != null && !bufferWriteProcessor.isClosed()) {
+    if (overflowProcessor != null && !overflowProcessor.isClosed()) {
       overflowFlushFuture = overflowProcessor.flush();
     }
     return new FileNodeFlushFuture(bufferWriteFlushFuture, overflowFlushFuture);
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/TsFileResource.java b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/TsFileResource.java
index 2a0da50..3d6d74a 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/TsFileResource.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/engine/filenode/TsFileResource.java
@@ -252,11 +252,6 @@ public class TsFileResource {
     return baseDirIndex;
   }
 
-//  public void setBaseDirIndex(int baseDirIndex) {
-//    this.baseDirIndex = baseDirIndex;
-//  }
-
-
   public boolean checkEmpty() {
 
     return startTimeMap.isEmpty() && endTimeMap.isEmpty();
@@ -305,8 +300,6 @@ public class TsFileResource {
     Map<String, Long> endTimeMapCopy = new HashMap<>(this.endTimeMap);
     return new TsFileResource(startTimeMapCopy,
         endTimeMapCopy, overflowChangeType, file);
-    //return new TsFileResource(startTimeMapCopy, endTimeMapCopy, overflowChangeType,
-      //        baseDirIndex, relativePath);
   }
 
   public Set<String> getDevices() {
diff --git a/iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java b/iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java
index 8622da6..400065e 100644
--- a/iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java
+++ b/iotdb/src/main/java/org/apache/iotdb/db/sync/receiver/SyncServiceImpl.java
@@ -619,8 +619,6 @@ public class SyncServiceImpl implements SyncService.Iface {
         for (String timeseries : timeseriesList) {
           paths.clear();
           paths.add(new Path(timeseries));
-          //Map<InsertPlan, String> originDataPoint = new HashMap<>();
-          //Map<InsertPlan, String> newDataPoint = new HashMap<>();
           Set<InsertPlan> originDataPoints = new HashSet<>();
           QueryExpression queryExpression = QueryExpression.create(paths, null);
           QueryDataSet queryDataSet = readOnlyTsFile.query(queryExpression);