modify doc && fix length calculating

This commit is contained in:
fariel 2021-03-18 16:18:04 +08:00
parent 8ba8e4973b
commit 70a480f562
2 changed files with 11 additions and 2 deletions

View File

@ -67,7 +67,8 @@ DorisWriter 插件实现了写入数据到 Doris 主库的目的表的功能。
"preSql": [], "preSql": [],
"postSql": [], "postSql": [],
"jdbcUrl": "jdbc:mysql://172.28.17.100:9030/", "jdbcUrl": "jdbc:mysql://172.28.17.100:9030/",
"loadUrl": ["172.28.17.100:8030", "172.28.17.100:8030"] "loadUrl": ["172.28.17.100:8030", "172.28.17.100:8030"],
"loadProps": {}
} }
} }
} }
@ -156,6 +157,14 @@ DorisWriter 插件实现了写入数据到 Doris 主库的目的表的功能。
* 默认值:无 <br /> * 默认值:无 <br />
* **loadProps**
* 描述StreamLoad 的请求参数详情参照StreamLoad介绍页面。 <br />
* 必选:否 <br />
* 默认值:无 <br />
### 3.3 类型转换 ### 3.3 类型转换

View File

@ -33,7 +33,7 @@ public class DorisWriterManager {
try { try {
buffer.add(record); buffer.add(record);
batchCount++; batchCount++;
batchSize += record.length(); batchSize += record.getBytes().length;
if (batchCount >= writerOptions.getBatchRows() || batchSize >= writerOptions.getBatchSize()) { if (batchCount >= writerOptions.getBatchRows() || batchSize >= writerOptions.getBatchSize()) {
flush(createBatchLabel()); flush(createBatchLabel());
} }