You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yu...@apache.org on 2020/07/03 04:03:05 UTC
[incubator-iotdb] branch kyy updated: ignore path not found
This is an automated email from the ASF dual-hosted git repository.
yuyuankang pushed a commit to branch kyy
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/kyy by this push:
new e95696d ignore path not found
e95696d is described below
commit e95696dda8365c3df004f026960d0ac1c2d8e1fa
Author: Ring-k <yu...@hotmail.com>
AuthorDate: Fri Jul 3 12:01:46 2020 +0800
ignore path not found
---
.../iotdb/cluster/query/ClusterPlanExecutor.java | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java b/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java
index 7fecc55..4c5cd4a 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/query/ClusterPlanExecutor.java
@@ -24,6 +24,7 @@ import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -61,6 +62,7 @@ import org.apache.iotdb.db.metadata.mnode.StorageGroupMNode;
import org.apache.iotdb.db.qp.executor.PlanExecutor;
import org.apache.iotdb.db.qp.physical.PhysicalPlan;
import org.apache.iotdb.db.qp.physical.crud.AlignByDevicePlan;
+import org.apache.iotdb.db.qp.physical.crud.DeletePlan;
import org.apache.iotdb.db.qp.physical.crud.InsertPlan;
import org.apache.iotdb.db.qp.physical.crud.QueryPlan;
import org.apache.iotdb.db.qp.physical.sys.AuthorPlan;
@@ -707,5 +709,24 @@ public class ClusterPlanExecutor extends PlanExecutor {
}
}
+ @Override
+ public void delete(DeletePlan deletePlan) throws QueryProcessException {
+ try {
+ Set<String> existingPaths = new HashSet<>();
+ for (Path p : deletePlan.getPaths()) {
+ existingPaths.addAll(getPathsName(p.getFullPath()));
+ }
+ if (existingPaths.isEmpty()) {
+ logger.info("TimeSeries does not exist and its data cannot be deleted");
+ return;
+ }
+ for (String path : existingPaths) {
+ delete(new Path(path), deletePlan.getDeleteTime());
+ }
+ } catch (MetadataException e) {
+ throw new QueryProcessException(e);
+ }
+ }
+
}