taosdata / taos-connector-dotnet Goto Github PK
View Code? Open in Web Editor NEWTDegnine connector for .Net
License: MIT License
TDegnine connector for .Net
License: MIT License
为什么不实现ado.net的标准接口呢= =
句柄用起来实在太别扭了 感觉就是对sdk的封装= = ~~~~
另:大佬辛苦
07/18 15:02:16.271859 00044800 QRY catalog update thread started
07/18 15:02:16.271859 00053148 QRY scheduler 0x41373343303043 initizlized, maxJob:1000
07/18 15:02:16.275632 00053148 TSC connecting to server, numOfEps:1 inUse:0 user:root db: key:root:dcc5bed04851fec854c035b2e40263b6:106.23.79.186:6030
07/18 15:02:16.275632 00053148 TSC ep:0, 106.23.79.186:6030
07/18 15:02:19.339513 00062628 RPC ERROR TSC msg vnode-batch-meta failed to send, conn 00000153EBB83B50 failed to connect to 106.53.79.86:6030, reason: operation canceled, gtid:0x198bc4ce89fd0002:0xe4167ce8a00004
07/18 15:02:22.338974 00062628 RPC ERROR TSC msg vnode-batch-meta failed to send, conn 00000153EBB82590 failed to connect to 106.53.79.86:6030, reason: operation canceled, gtid:0x198bc4ce89fd0002:0xe4167ce8a00004
07/18 15:02:25.350374 00062628 RPC ERROR TSC msg vnode-batch-meta failed to send, conn 00000153EBB83980 failed to connect to 106.53.79.86:6030, reason: operation canceled, gtid:0x198bc4ce89fd0002:0xe4167ce8a00004
07/18 15:02:28.371259 00062628 RPC ERROR TSC msg vnode-batch-meta failed to send, conn 00000153EBB83980 failed to connect to 106.53.79.86:6030, reason: operation canceled, gtid:0x198bc4ce89fd0002:0xe4167ce8a00004
07/18 15:02:31.411474 00062628 RPC ERROR TSC msg vnode-batch-meta failed to send, conn 00000153EBB82EA0 failed to connect to 106.53.79.86:6030, reason: operation canceled, gtid:0x198bc4ce89fd0002:0xe4167ce8a00004
07/18 15:02:31.411474 00057088 QRY ERROR Got error rsp, error:some vnode/qnode/mnode(s) out of service
07/18 15:02:31.411474 00057088 QRY ERROR QID:198bc4ce89fd0002 CTG:00000153EA2BED80 Get table 1.mediacloud.userlog meta failed with error some vnode/qnode/mnode(s) out of service
07/18 15:02:31.411474 00063156 TSC ERROR 0x3 error happens, code:-2147483616 - some vnode/qnode/mnode(s) out of service, reqId:0x198bc4ce89fd0002
res = TDengine.Query(conn, $"show tables like 'tick%'");
row = TDengine.FetchRows(res)
string? s = Marshal.PtrToStringUTF8(Marshal.ReadIntPtr(row)); 这里返回垃圾字符结尾:\u000f 或 \u000e等,
怎样才能获取到正确的表名?
引用TDengine.connector.test程序包建立websocket连接报错:
"无法加载 DLL“/d/git_space/work/3.0/taos-connector-rust/target/release/taosws.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。"
没有支持使用配置文件进行连接 直接获取连接的方法吗。想使用配置文件中的firstEp和secondEp进行故障切换都不行吗
例如有10万条待插入数据,这10万条数据可能是相同或不同设备(即有可能在不同的表,DEVICE_X表示)
2023-03-13 00:00:01 ,DEVICE_A,a, a,a
2023-03-13 00:00:02 ,DEVICE_B,b,b,b
2023-03-13 00:00:03 ,DEVICE_C,c,c,c
2023-03-13 00:00:02 ,DEVICE_A,a,a,a
.....10万....
如果是JAVA代码
String psql = "INSERT INTO ? USING meters TAGS(?, ?) VALUES(?, ?, ?, ?)";
try (TSDBPreparedStatement pst = (TSDBPreparedStatement) conn.prepareStatement(psql)) {
for (String line : getRawData()) {//通过循环可以一次性遍历待插入的数据
String[] ps = line.split(",");
// bind table name and tags
pst.setTableName(ps[0]); //这里可以指定表名
pst.setTagString(0, ps[5]);
pst.setTagInt(1, Integer.valueOf(ps[6]));
// bind values
//这里的数据绑定,是以每一条为单位的,这样循环就可以绑定完10万条
pst.setTimestamp(0, tsToLongArray(ps[1])); //ps[1] looks like: 2018-10-03 14:38:05.000
pst.setFloat(1, toArray(Float.valueOf(ps[2])));
pst.setInt(2, toArray(Integer.valueOf(ps[3])));
pst.setFloat(3, toArray(Float.valueOf(ps[4])));
pst.columnDataAddBatch();//这里可以一次
}
pst.columnDataExecuteBatch();
}
而C#代码里
int res = TDengine.StmtPrepare(stmt, "INSERT INTO ? USING meters TAGS(?, ?) VALUES(?, ?, ?, ?)");
CheckStmtRes(res, "failed to prepare stmt");
// 2. bind table name and tags
TAOS_MULTI_BIND[] tags = new TAOS_MULTI_BIND[2] { TaosMultiBind.MultiBindBinary(new string[] { "California.SanFrancisco" }), TaosMultiBind.MultiBindInt(new int?[] { 2 }) };
res = TDengine.StmtSetTbnameTags(stmt, "d1001", tags);//只能设置单个表
CheckStmtRes(res, "failed to bind table name and tags");
// 3. bind values
TAOS_MULTI_BIND[] values = new TAOS_MULTI_BIND[4] {
TaosMultiBind.MultiBindTimestamp(new long[2] { 1648432611249, 1648432611749}),//绑定数据是按字段拆了,不是一条条的,如果有10万条怎么办?
TaosMultiBind.MultiBindFloat(new float?[2] { 10.3f, 12.6f}),
TaosMultiBind.MultiBindInt(new int?[2] { 219, 218}),
TaosMultiBind.MultiBindFloat(new float?[2]{ 0.31f, 0.33f})
};
res = TDengine.StmtBindParamBatch(stmt, values);
CheckStmtRes(res, "failed to bind params");
// 4. add batch
res = TDengine.StmtAddBatch(stmt);
CheckStmtRes(res, "failed to add batch");
// 5. execute
res = TDengine.StmtExecute(stmt);
CheckStmtRes(res, "failed to execute");
目前官网提供下载的是 x64 的客户端,它包含了一个 64 位的 taos.dll。
这里的 README 写支持 Windows x86,是有提供支持 x86 机器的 32 位的 taos.dll 吗?
使用3.0版本的c#驱动可以连接旧版本的TDengine吗?
驱动:TDengine-client-3.1.0.2-Linux-x64.tar.gz (13.5 M)
系统:centos linux release 7.9.2009
容器:docker 20.10.17
程序在windows下安装TDengine-client-3.1.0.2-Windows-x64.exe (16.8 M),
可以正常运行,linux下共享库报错:unable to load shared library 'taos' or one of its dependencies
linux下指定容器里taos的数据库客户端后
3.1.0 、3.1.1 版本下使用stmt写入内存不断增长
tdengine 版本3.2.3.0
触发了GC 但是内存没有回收
https://github.com/taosdata/taos-connector-dotnet/blob/cc269758bb15d77552b5735d05ceea053b79cf01/src/TDengine.TMQ/ConsumerConfig.cs#L70C1-L82C6
ConsumerConfig的TDConnectIp属性和TDConnectUser属性重复
按照https://docs.taosdata.com/develop/insert-data/sql-writing/ 的例子,进行sql写入会导致内存缓慢的升高。怀疑某些intptr没有正确的释放。
请问什么时候实现ADO.NET的驱动 ,人家QuestDB都有
根据 https://docs.microsoft.com/zh-cn/dotnet/standard/net-standard?tabs=net-standard-2-0 可知,.Net Standard 2.0 是整个 .Net 体系中目标最广的一组规范。
在当今国产化趋势中,仍有很多技改项目运行较旧版本的 Windows 系统,此部分系统因兼容性原因仅能使用 .Net Framework,增加 .Net Standard 2.0 目标可以很好的支持这些系统。
库版本 3.0.0
Connect后 句柄返回0
但是客户端taosshell 能正常链接
新出了varbinary类型,请问驱动什么时候能支持?
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.