批量写入顶点数据至hugegraph出现ArrayList cannot be cast to Integer转换异常
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 636
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 14
Description
### Bug Type (问题类型)
other exception / error (其他异常报错)
### Before submit
- [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
### Environment (环境信息)
- Server Version: v0.11.2
- Backend: HBase
- Data Size: 1000 vertices
- java:1.8
### Expected & Actual behavior (期望与实际表现)
期望正常批量写入数据至hugegraph,在代码中使用了addVertices(List vertices)方法批量写入。
但是出现了如下异常:
```
class java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Integer
at com.baidu.hugegraph.exception.ServerException.fromResponse(ServerException.java:47)
at com.baidu.hugegraph.client.RestClient.checkStatus(RestClient.java:93)
at com.baidu.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:198)
at com.baidu.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:178)
at com.baidu.hugegraph.api.graph.VertexAPI.create(VertexAPI.java:56)
at com.baidu.hugegraph.driver.GraphManager.addVertices(GraphManager.java:95)
```
### Vertex/Edge example (问题点 / 边数据举例)
经过排查之后发现,我修改了conf目录下的rest-server.properties文件,添加了如下两个参数:
```ini
batch.max_write_ratio=100
batch.max_write_threads=0
```
当我将文件中的这两个参数注释掉之后,批量写入数据addVertices便不会出现`java.util.ArrayList cannot be cast to java.lang.Integer`异常了,不知道这算不算一个Bug
### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.