You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2020/03/12 04:56:18 UTC
[incubator-iotdb] branch debug_metero updated: add log for
PlanExecutor getschema
This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch debug_metero
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/debug_metero by this push:
new f0187b2 add log for PlanExecutor getschema
f0187b2 is described below
commit f0187b207aa325c20c6ccc94312c1e0cc90f3a15
Author: qiaojialin <64...@qq.com>
AuthorDate: Thu Mar 12 12:55:58 2020 +0800
add log for PlanExecutor getschema
---
.../org/apache/iotdb/db/qp/executor/PlanExecutor.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
index f62f222..64e442b 100644
--- a/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java
@@ -126,9 +126,12 @@ import org.apache.iotdb.tsfile.utils.Binary;
import org.apache.iotdb.tsfile.utils.Pair;
import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
import org.apache.iotdb.tsfile.write.writer.RestorableTsFileIOWriter;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class PlanExecutor implements IPlanExecutor {
+ private static final Logger logger = LoggerFactory.getLogger(PlanExecutor.class);
// for data query
protected IQueryRouter queryRouter;
// for system schema
@@ -724,12 +727,24 @@ public class PlanExecutor implements IPlanExecutor {
}
}
MNode measurementNode = node.getChild(measurement);
+
+ if (node.getChild(measurement) == null) {
+ logger.error("node {} does not have child {}", node.getFullPath(), measurement);
+ }
+
if (measurementNode instanceof InternalMNode) {
+ logger.error("path is not a leaf: {} ", measurementNode.getFullPath());
throw new QueryProcessException(
String.format("Current Path is not leaf node. %s.%s", deviceId, measurement));
}
- dataTypes[i] = measurementNode.getSchema().getType();
+ try {
+ dataTypes[i] = measurementNode.getSchema().getType();
+ } catch (Exception e) {
+ logger.error("path do not has a measurementSchema: {} , schema is null? ",
+ measurementNode.getFullPath(), measurementNode.getSchema() == null);
+
+ }
}
insertPlan.setDataTypes(dataTypes);
StorageEngine.getInstance().insert(insertPlan);