You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "changxue (Jira)" <ji...@apache.org> on 2023/02/17 02:31:00 UTC
[jira] [Reopened] (IOTDB-5469) [template]create template with backquote characters successfully but get schema info failed
[ https://issues.apache.org/jira/browse/IOTDB-5469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
changxue reopened IOTDB-5469:
-----------------------------
master 1a69b40
!image-2023-02-17-10-29-34-459.png|width=800!
> [template]create template with backquote characters successfully but get schema info failed
> -------------------------------------------------------------------------------------------
>
> Key: IOTDB-5469
> URL: https://issues.apache.org/jira/browse/IOTDB-5469
> Project: Apache IoTDB
> Issue Type: Bug
> Components: Core/Schema Manager
> Affects Versions: 1.1.0-SNAPSHOT
> Reporter: changxue
> Assignee: liaolanyu
> Priority: Major
> Labels: pull-request-available
> Attachments: names-error.csv
>
>
> [template]create template with backquote characters successfully but get schema info failed
> reproduction
> 1. create a template named `123`
> {code}
> String[] names = new String[]{"c", "_start", "_Start", "`123`"};
> boolean isAligned = true;
> Map<String, Object[]> structureInfo = new LinkedHashMap<>(6);
> structureInfo.put("s_boolean", new Object[]{TSDataType.BOOLEAN, TSEncoding.RLE, CompressionType.SNAPPY});
> structureInfo.put("s_int", new Object[]{TSDataType.INT32, TSEncoding.RLE, CompressionType.SNAPPY});
> structureInfo.put("s_long", new Object[]{TSDataType.INT64, TSEncoding.RLE, CompressionType.SNAPPY});
> structureInfo.put("s_float", new Object[]{TSDataType.FLOAT, TSEncoding.GORILLA, CompressionType.SNAPPY});
> structureInfo.put("s_double", new Object[]{TSDataType.DOUBLE, TSEncoding.GORILLA, CompressionType.SNAPPY});
> structureInfo.put("s_text", new Object[]{TSDataType.TEXT, TSEncoding.DICTIONARY, CompressionType.SNAPPY});
> for (String templateName: names ) {
> String loadNode = "root.template.aligned."+templateName;
> Template template = new Template(templateName, isAligned);
> structureInfo.forEach((key, value) -> {
> MeasurementNode mNode =
> new MeasurementNode(key, (TSDataType) value[0], (TSEncoding) value[1], (CompressionType) value[2]);
> try {
> template.addToTemplate(mNode);
> } catch (StatementExecutionException e) {
> throw new RuntimeException(e);
> }
> });
> session.createSchemaTemplate(template);
> // IOTDB-5437 StatementExecutionException: 300: COUNT_MEASUREMENTShas not been supported.
> // assert 6 == session.countMeasurementsInTemplate(templateName) : "查看模版中sensor数目";
> session.setSchemaTemplate(templateName, loadNode);
> {code}
> 2. start-cli.sh
> {code}
> IoTDB> show schema templates
> +------------+
> |TemplateName|
> +------------+
> | `123`|
> | c|
> | _start|
> | _Start|
> +------------+
> Total line number = 4
> It costs 0.018s
> IoTDB> show nodes in schema template `123`
> Msg: 305: org.apache.iotdb.commons.exception.IoTDBException: get template info error.
> {code}
> datanode logs:
> {code}
> 2023-02-03 17:08:08,488 [pool-21-IoTDB-MPPCoordinator-12] WARN o.a.i.d.m.p.e.c.ConfigExecution:131 - Failures happened during running ConfigExecution.
> java.lang.RuntimeException: org.apache.iotdb.commons.exception.IoTDBException: get template info error.
> at org.apache.iotdb.db.metadata.template.ClusterTemplateManager.getTemplate(ClusterTemplateManager.java:173)
> at org.apache.iotdb.db.mpp.plan.execution.config.executor.ClusterConfigTaskExecutor.showNodesInSchemaTemplate(ClusterConfigTaskExecutor.java:997)
> at org.apache.iotdb.db.mpp.plan.execution.config.metadata.template.ShowNodesInSchemaTemplateTask.execute(ShowNodesInSchemaTemplateTask.java:56)
> at org.apache.iotdb.db.mpp.plan.execution.config.ConfigExecution.start(ConfigExecution.java:106)
> at org.apache.iotdb.db.mpp.plan.Coordinator.execute(Coordinator.java:153)
> at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementInternal(ClientRPCServiceImpl.java:218)
> at org.apache.iotdb.db.service.thrift.impl.ClientRPCServiceImpl.executeStatementV2(ClientRPCServiceImpl.java:476)
> at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3629)
> at org.apache.iotdb.service.rpc.thrift.IClientRPCService$Processor$executeStatementV2.getResult(IClientRPCService.java:3609)
> at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:38)
> at org.apache.iotdb.db.service.thrift.ProcessorWithMetrics.process(ProcessorWithMetrics.java:64)
> at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:248)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at java.lang.Thread.run(Thread.java:750)
> Caused by: org.apache.iotdb.commons.exception.IoTDBException: get template info error.
> ... 15 common frames omitted
> {code}
> expect:
> If a template was created successfully , then we ought to make it useful in out system.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)