You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ea...@apache.org on 2019/04/09 06:40:48 UTC
[incubator-iotdb] branch cluster updated: fix it bug
This is an automated email from the ASF dual-hosted git repository.
east pushed a commit to branch cluster
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/cluster by this push:
new 36d8cda fix it bug
new d379b7e Merge remote-tracking branch 'origin/cluster' into cluster
36d8cda is described below
commit 36d8cdad0b2f17a090ee672e88a8b2cfc144a01f
Author: mdf369 <95...@qq.com>
AuthorDate: Tue Apr 9 14:40:25 2019 +0800
fix it bug
---
.../cluster/qp/executor/QueryMetadataExecutor.java | 2 +-
.../cluster/integration/IoTDBMetadataFetchIT.java | 112 ++++++++++++++++++---
2 files changed, 97 insertions(+), 17 deletions(-)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/qp/executor/QueryMetadataExecutor.java b/cluster/src/main/java/org/apache/iotdb/cluster/qp/executor/QueryMetadataExecutor.java
index f138c12..22e9c38 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/qp/executor/QueryMetadataExecutor.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/qp/executor/QueryMetadataExecutor.java
@@ -326,6 +326,6 @@ public class QueryMetadataExecutor extends ClusterQPExecutor {
* @return single String of all metadata
*/
private String combineMetadataInStringList(List<String> metadataList) {
- return MManager.combineMetadataInStrings((String[]) metadataList.toArray());
+ return MManager.combineMetadataInStrings(metadataList.toArray(new String[metadataList.size()]));
}
}
diff --git a/cluster/src/test/java/org/apache/iotdb/cluster/integration/IoTDBMetadataFetchIT.java b/cluster/src/test/java/org/apache/iotdb/cluster/integration/IoTDBMetadataFetchIT.java
index ad95425..5c5d210 100644
--- a/cluster/src/test/java/org/apache/iotdb/cluster/integration/IoTDBMetadataFetchIT.java
+++ b/cluster/src/test/java/org/apache/iotdb/cluster/integration/IoTDBMetadataFetchIT.java
@@ -60,20 +60,20 @@ public class IoTDBMetadataFetchIT {
EnvironmentUtils.cleanEnv();
}
-// @Test
-// public void test() throws SQLException {
-// Connection connection = null;
-// try {
-// connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/", "root", "root");
-// insertSQL(connection, false);
-//// testShowStorageGroup(connection);
-// testDatabaseMetadata(connection);
-//// testShowTimeseries(connection);
-//// testShowTimeseriesPath(connection);
-// } finally {
-// connection.close();
-// }
-// }
+ @Test
+ public void test() throws SQLException {
+ Connection connection = null;
+ try {
+ connection = DriverManager.getConnection(Config.IOTDB_URL_PREFIX + "127.0.0.1:6667/", "root", "root");
+ insertSQL(connection, false);
+// testShowStorageGroup(connection);
+ testDatabaseMetadata(connection);
+// testShowTimeseries(connection);
+// testShowTimeseriesPath(connection);
+ } finally {
+ connection.close();
+ }
+ }
@Test
public void testBatch() throws SQLException {
@@ -239,18 +239,98 @@ public class IoTDBMetadataFetchIT {
+ "{\n"
+ "\t\"root\":{\n"
+ "\t\t\"ln\":{\n"
+ + "\t\t\t\"wf05\":{\n"
+ + "\t\t\t\t\"wt01\":{\n"
+ + "\t\t\t\t\t\"status\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf05\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"DOUBLE\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"PLAIN\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t}\n"
+ + "\t\t\t},\n"
+ + "\t\t\t\"wf04\":{\n"
+ + "\t\t\t\t\"wt05\":{\n"
+ + "\t\t\t\t\t\"temperature\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf04\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"FLOAT\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"GORILLA\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t},\n"
+ + "\t\t\t\t\"wt04\":{\n"
+ + "\t\t\t\t\t\"status\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf04\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"TEXT\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"PLAIN\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t}\n"
+ + "\t\t\t},\n"
+ + "\t\t\t\"wf03\":{\n"
+ + "\t\t\t\t\"wt03\":{\n"
+ + "\t\t\t\t\t\"temperature\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{max_point_number=5}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf03\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"FLOAT\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"TS_2DIFF\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t},\n"
+ + "\t\t\t\t\"wt02\":{\n"
+ + "\t\t\t\t\t\"status\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf03\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"INT64\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"PLAIN\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t}\n"
+ + "\t\t\t},\n"
+ + "\t\t\t\"wf02\":{\n"
+ + "\t\t\t\t\"wt04\":{\n"
+ + "\t\t\t\t\t\"temperature\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf02\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"FLOAT\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"RLE\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t},\n"
+ + "\t\t\t\t\"wt03\":{\n"
+ + "\t\t\t\t\t\"status\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf02\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"INT32\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"PLAIN\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t}\n"
+ + "\t\t\t},\n"
+ "\t\t\t\"wf01\":{\n"
+ + "\t\t\t\t\"wt02\":{\n"
+ + "\t\t\t\t\t\"humidity\":{\n"
+ + "\t\t\t\t\t\t\"args\":\"{}\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf01\",\n"
+ + "\t\t\t\t\t\t\"DataType\":\"DOUBLE\",\n"
+ + "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ + "\t\t\t\t\t\t\"Encoding\":\"RLE\"\n"
+ + "\t\t\t\t\t}\n"
+ + "\t\t\t\t},\n"
+ "\t\t\t\t\"wt01\":{\n"
+ "\t\t\t\t\t\"temperature\":{\n"
+ "\t\t\t\t\t\t\"args\":\"{max_point_number=3}\",\n"
- + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf01.wt01\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf01\",\n"
+ "\t\t\t\t\t\t\"DataType\":\"FLOAT\",\n"
+ "\t\t\t\t\t\t\"Compressor\":\"SNAPPY\",\n"
+ "\t\t\t\t\t\t\"Encoding\":\"RLE\"\n"
+ "\t\t\t\t\t},\n"
+ "\t\t\t\t\t\"status\":{\n"
+ "\t\t\t\t\t\t\"args\":\"{}\",\n"
- + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf01.wt01\",\n"
+ + "\t\t\t\t\t\t\"StorageGroup\":\"root.ln.wf01\",\n"
+ "\t\t\t\t\t\t\"DataType\":\"BOOLEAN\",\n"
+ "\t\t\t\t\t\t\"Compressor\":\"UNCOMPRESSED\",\n"
+ "\t\t\t\t\t\t\"Encoding\":\"PLAIN\"\n"