apache / apache/hugegraph

[Bug] hugeclient批量数据写入,提示:java.lang.illegalArgumentException: the max length of bytes is 65535, but get 337492.

Open
#2,291 14 comments 0 reactions 1 assignee Claimed by @LiJie20190102 View on GitHub
good first issue improvement todo
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Bug Type (问题类型)

rest-api (结果不合预期)

### Before submit

- [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 [FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)

### Environment (环境信息)

- Server Version: 1.0.0 (Apache Release Version)
- Backend: RocksDB x nodes, HDD or SSD
- OS: xx CPUs, xx G RAM, Ubuntu 2x.x / CentOS 7.x
- Data Size: xx vertices, xx edges

图库版本:1.0.0版本
存储引擎:HBase
数据量:点1亿+,边数量1亿+。点已正常写入,边上有属性字段较多,一批次写入1000条左右。

期望,请求体大小大于95535,看图库服务端是否参数可调整(限制请求体大小的参数为?)

### Expected & Actual behavior (期望与实际表现)

hugeclient批量数据写入,一批次request body请求次数大于服务端默认的65535大小,导致关系数据无法写入。
异常堆栈如下:
```
java.lang.IllegalArgumentException: the max length of bytes is 65535, but get 337492.
at org.apache.hugegraph.exception.ServerException.fromResponse(ServerException.java: 45)
at org.apache.hugegraph.client.RestClient.checkStatus(RestClinet.java:91)
at org.apache.hugegraph.rest.AbstractRestClient.post(AbstractRestClient.java:232)
at org.apache.hugegraph.api.graph.EdgeAPI.create(EdgeAPI.java:58)
at org.apache.hugegraph.driver.GraphManager.addEdges(GraphManager.java:262)
at org.apache.hugegraph.driver.GraphManager.addEdges(GraphManager.java:254)
.....
```

### Vertex/Edge example (问题点 / 边数据举例)

_No response_

### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.