Code Monkey home page Code Monkey logo

taos-connector-dotnet's People

Contributors

dingbo8128 avatar gccgdb1234 avatar hjxilinx avatar huskar-t avatar pigwing avatar plum-lihui avatar sangshuduo avatar xleili avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

yejinmo maikebing

taos-connector-dotnet's Issues

error:some vnode/qnode/mnode(s) out of service

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

bug: show tables 返回垃圾字符

res = TDengine.Query(conn, $"show tables like 'tick%'");
row = TDengine.FetchRows(res)
string? s = Marshal.PtrToStringUTF8(Marshal.ReadIntPtr(row)); 这里返回垃圾字符结尾:\u000f 或 \u000e等,
怎样才能获取到正确的表名?

找不到指定模块taosdata.dll

引用TDengine.connector.test程序包建立websocket连接报错:
"无法加载 DLL“/d/git_space/work/3.0/taos-connector-rust/target/release/taosws.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。"

批量绑定插入的时候,C#代码和JAVA的不一样的方式,导致大数量插入无法方便使用。

例如有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");

请问客户端支持 Windows x86 吗

目前官网提供下载的是 x64 的客户端,它包含了一个 64 位的 taos.dll。
这里的 README 写支持 Windows x86,是有提供支持 x86 机器的 32 位的 taos.dll 吗?

释放连接后重新创建连接失败

TDengine版本:2.6.0.28
TDengineDriver版本:1.0.8
TDengine Client版本:2.6.0.28

image

如上图,重新连接失败!是需要在释放时做更多的处理吗?

短时间内(约2小时)会把服务器带宽占满

一台应用服务器,一台TDengine服务器。程序运行在应用服务器,刚启动没问题,CPU占用,带宽占用都正常。但两者,特别是带宽,会在程序启动15分钟之后开始,在2个小时15分钟的时间内占满2M带宽。
微信图片_20221021051954
检查过网络使用情况,带宽就是被这两台服务器之间的连接占用的。应用服务器和终端的连接流量很小。

Snipaste_2022-10-21_05-31-18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.