thulab / iotdb-jdbc Goto Github PK
View Code? Open in Web Editor NEWJdbc connection implementation for IoTDB
License: Apache License 2.0
Jdbc connection implementation for IoTDB
License: Apache License 2.0
目前每次是将sql传给服务器,让服务器通过SQL来对比查找。
这里是有问题的,
一个connection创建了两个statement,两个statement写了相同的查询语句,然后两个人各自翻页,就冲突了。。
应该改为按照operationID来对比查找。
iotdb-jdbc尚未支持getDatabaseProductVersion(),希望通过getDatabaseProductVersion()获取当前的代码版本,用于iotdb-benchmark的测试对应的代码版本记录
在Thrift中,一个数据点的值使用下面的结构表示的:
struct TSDataValue{
1: required bool is_empty
2: optional bool bool_val
3: optional i32 int_val
4: optional i64 long_val
5: optional double float_val
6: optional double double_val
7: optional binary binary_val
8: optional string type;
}
也就是说在内存中保存一个数据点实际上用了4 + 4 + 4 + 8 + 8 + 8 + 8 + 8 = 52byte的内存。
尽管大部分字段以optional修饰,但这仅表示在序列化时该字段可能不会被序列化,不会减小其存在于内存时的大小。
需要检讨这种设计是否会造成过大的内存占用。
Now in master there is a bug concerning columnInfoMap
and getValueByName
:
(1) columnInfoMap
is now assigned under the effect of slimit
& soffset
(2) in getValueByName
there is an assignment int tmp = columnInfoMap.get(columnName)+seriesOffset;
The bug is exposed when executing sql e.g., select *,s1,s0 from root.vehicle.d0 slimit 3 soffset 2
(Propose *
expands to be s0,s1,s2
) :
columnInfoList = [Time, root.vehicle.d0.s2, root.vehicle.d0.s1, root.vehicle.d0.s0]
columnInfoMap = [Time->1,
root.vehicle.d0.s2->2,
root.vehicle.d0.s1->3,
root.vehicle.d0.s0->4]
tmp=columnInfoMap.get("root.vehicle.d0.s1") + 2 = 3 + 2 = 5 -> thus resulting in the null result.
The core of the problem is that the assignment process of columnInfoMap
must not be affected by slimit
& soffset
in order to be consistent with the actual order of data in record
.
In the example shown above, the fix means that columnInfoMap
should be:
columnInfoMap = [Time->1,
root.vehicle.d0.s0->2,
root.vehicle.d0.s1->3,
root.vehicle.d0.s2->4]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Program%20Files/MATLAB/R2017b/java/jarext/slf4j/slf4j-log4j12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/iotdb-v0.3/lib/iotdb-jdbc.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
原有的实现里面很多地方还保留了TsFIle字样,统一改成IoTDB
每次执行完一条语句前都需要createStatement,否则即使connection断开重连,也会一次有结果一次没有
某些情况下 SQL是很大的。 可能几KB。
考虑打开thrfit传输的压缩选项,构建客户端时指定是否启动压缩。
Plugin execution not covered by lifecycle configuration: org.apache.thrift.tools:maven-thrift-plugin:0.1.11:compile (execution: thrift-sources, phase: generate-sources) pom.xml /iotdb-jdbc line 113 Maven Project Build Lifecycle Mapping Problem
Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187. (org.apache.maven.plugins:maven-dependency-plugin:2.10:copy-dependencies:copy-dependencies:package)
当前存在TsfileMetadataResultMetadata和TsfileResultMetadata两个类实现了ResultSetMetaData接口。
TsfileMetadataResultMetadata用于查询给定一个“元数据查询”时,它的相关信息(例如,每一列的名称)
TsfileResultMetadata用于查询给定的一个“一般查询”,它的相关信息(例如,每一列的名称,数据类型)
注意到代码中resultset段还在处理slimit和limit,感觉应该在服务器端过滤。
最好在查询出结果的时候,就把相关的columnsType返回。
同时如果查询的结果数量小于fetchsize,建议直接返回结果。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.