You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2020/04/14 10:02:38 UTC

[incubator-iotdb] branch cluster_data_snapshot updated: start fixing fill

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

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


The following commit(s) were added to refs/heads/cluster_data_snapshot by this push:
     new 2689f43  start fixing fill
2689f43 is described below

commit 2689f43b8aff271ff39c2199e0c3d1803b0e52a9
Author: jt2594838 <jt...@163.com>
AuthorDate: Tue Apr 14 18:02:24 2020 +0800

    start fixing fill
---
 .../apache/iotdb/cluster/query/ClusterQueryRouter.java   |  1 +
 .../cluster/query/{ => fill}/ClusterFillExecutor.java    | 16 +++++++---------
 .../iotdb/cluster/query/ClusterFillExecutorTest.java     |  1 +
 pom.xml                                                  |  2 +-
 .../iotdb/db/query/executor/FillQueryExecutor.java       |  9 ++++++++-
 5 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterQueryRouter.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterQueryRouter.java
index 4bb2b0f..3bdea12 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterQueryRouter.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterQueryRouter.java
@@ -21,6 +21,7 @@ package org.apache.iotdb.cluster.query;
 
 import java.util.List;
 import java.util.Map;
+import org.apache.iotdb.cluster.query.fill.ClusterFillExecutor;
 import org.apache.iotdb.cluster.query.groupby.ClusterGroupByNoVFilterDataSet;
 import org.apache.iotdb.cluster.query.groupby.ClusterGroupByVFilterDataSet;
 import org.apache.iotdb.cluster.server.member.MetaGroupMember;
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterFillExecutor.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/fill/ClusterFillExecutor.java
similarity index 79%
rename from cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterFillExecutor.java
rename to cluster/src/main/java/org/apache/iotdb/cluster/query/fill/ClusterFillExecutor.java
index 2b5b252..9669862 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterFillExecutor.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/fill/ClusterFillExecutor.java
@@ -17,13 +17,14 @@
  * under the License.
  */
 
-package org.apache.iotdb.cluster.query;
+package org.apache.iotdb.cluster.query.fill;
 
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import org.apache.iotdb.cluster.server.member.MetaGroupMember;
 import org.apache.iotdb.db.exception.StorageEngineException;
+import org.apache.iotdb.db.exception.query.QueryProcessException;
 import org.apache.iotdb.db.query.context.QueryContext;
 import org.apache.iotdb.db.query.executor.FillQueryExecutor;
 import org.apache.iotdb.db.query.fill.IFill;
@@ -44,13 +45,10 @@ public class ClusterFillExecutor extends FillQueryExecutor {
   }
 
   @Override
-  protected void configureFill(IFill fill, TSDataType dataType, Path path, Set<String> deviceMeasurements,
-      QueryContext context,
-      long queryTime) throws StorageEngineException {
-    fill.setDataType(dataType);
-    fill.setQueryTime(queryTime);
-    fill.setAllDataReader(metaGroupMember.getSeriesReader(path, deviceMeasurements, dataType,
-        fill.getFilter(), null,
-     context));
+  protected IFill configureFill(IFill fill, Path path, TSDataType dataType, long queryTime,
+      Set<String> deviceMeasurements, QueryContext context)
+      throws QueryProcessException, StorageEngineException {
+    // TODO-Cluster complete
+    return null;
   }
 }
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/query/ClusterFillExecutorTest.java b/cluster/src/test/java/org/apache/iotdb/cluster/query/ClusterFillExecutorTest.java
index 51e2387..3cc27b0 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/query/ClusterFillExecutorTest.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/query/ClusterFillExecutorTest.java
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.util.Collections;
 import java.util.Map;
 import org.apache.iotdb.cluster.common.TestUtils;
+import org.apache.iotdb.cluster.query.fill.ClusterFillExecutor;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.exception.StorageEngineException;
 import org.apache.iotdb.db.exception.query.QueryProcessException;
diff --git a/pom.xml b/pom.xml
index 7431162..ceefe47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -551,7 +551,7 @@
                             <exclude>**/*.cvs</exclude>
                             <!-- licenses -->
                             <exclude>licenses/*</exclude>
-			    <!-- only for Travis CI with WinOS-->
+                            <!-- only for Travis CI with WinOS-->
                             <exclude>hadoopbin</exclude>
                             <exclude>windowssystem32</exclude>
                             <!-- generated by Github -->
diff --git a/server/src/main/java/org/apache/iotdb/db/query/executor/FillQueryExecutor.java b/server/src/main/java/org/apache/iotdb/db/query/executor/FillQueryExecutor.java
index 6b823c9..e3a456b 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/executor/FillQueryExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/executor/FillQueryExecutor.java
@@ -87,7 +87,7 @@ public class FillQueryExecutor {
       } else {
         fill = typeIFillMap.get(dataType).copy();
       }
-      fill.configureFill(path, dataType, queryTime,
+      fill = configureFill(fill, path, dataType, queryTime,
           fillQueryPlan.getAllMeasurementsInDevice(path.getDevice()), context);
 
       TimeValuePair timeValuePair = fill.getFillResult();
@@ -102,4 +102,11 @@ public class FillQueryExecutor {
     dataSet.setRecord(record);
     return dataSet;
   }
+
+  protected IFill configureFill(IFill fill, Path path, TSDataType dataType, long queryTime,
+      Set<String> deviceMeasurements, QueryContext context)
+      throws QueryProcessException, StorageEngineException {
+    fill.configureFill(path, dataType, queryTime, deviceMeasurements, context);
+    return fill;
+  }
 }