'can't write data into aligned timeseries through MQTT api to apache iotdb database
Failed to write the pre-created aligned timeseries through the MQTT API but the unaligned timeseries is OK.
Steps to reproduce the behaviour:
create aligned timeseries root.o308.pd.IT0001(D001 TEXT encoding=PLAIN, D003 FLOAT encoding=GORILLA)
Modify the MQTTClient class in the example module of the source code, the code like this:
String payload =
String.format(
"{\n"
+ ""device":"root.o308.pd.IT0001",\n"
+ ""timestamp":%d,\n"
+ ""measurements":["D003"],\n"
+ ""values":[%f]\n"
+ "}",
System.currentTimeMillis(), random.nextDouble());
Thread.sleep(1);
connection.publish("root.o308.pd.IT0001.D003", payload.getBytes(), QoS.AT_LEAST_ONCE, false);
Run the main method,The execution is successful, no error is reported。no data is written.
When I change the device in the code to root.o308.pd.IT0002 (a time series that was not pre-created) it can be written normally. And when I pre-created the unaligned timeseries (create timeseries root.sg.d4.s1 FLOAT encoding=RLE), it also written normally.
IoTDB> select D003 from root.o308.pd.IT0001;
+----+------------------------+
|Time|root.o308.pd.IT0001.D003|
+----+------------------------+
+----+------------------------+
Empty set.
It costs 0.007s
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
