OpenTSDB / asynchbase

A fully asynchronous, non-blocking, thread-safe, high-performance HBase client.
https://github.com/OpenTSDB/asynchbase
BSD 3-Clause "New" or "Revised" License
610 stars 303 forks source link

Comparison method violates its general contract #220

Open wensiqun opened 4 years ago

wensiqun commented 4 years ago

There has an exctpion when i use asynchbase 1.8.2 and jdk 1.8.

Exception fregment as following:

Uncaught exception while serializing RPC: MultiAction(batch=[PutRequest(...)]) java.lang.IllegalArgumentException: Comparison method violates its general contract!
    at java.util.TimSort.mergeLo(TimSort.java:777)
    at java.util.TimSort.mergeAt(TimSort.java:514)
    at java.util.TimSort.mergeForceCollapse(TimSort.java:457)
    at java.util.TimSort.sort(TimSort.java:254)
    at java.util.Arrays.sort(Arrays.java:1512)
    at java.util.ArrayList.sort(ArrayList.java:1462)
    at java.util.Collections.sort(Collections.java:175)
    at org.hbase.async.MultiAction.serialize(MultiAction.java:214)
    at org.hbase.async.RegionClient.encode(RegionClient.java:1322)
    at org.hbase.async.RegionClient.sendRpc(RegionClient.java:1016)
    at org.hbase.async.RegionClient.bufferEdit(RegionClient.java:866)
    at org.hbase.async.RegionClient.sendRpc(RegionClient.java:1002)
    at org.hbase.async.HBaseClient.sendRpcToRegion(HBaseClient.java:2460)
    at org.hbase.async.HBaseClient.put(HBaseClient.java:2018)

It seems like a compartor(org.hbase.async.Bytes#memcmp) that violates the Comparable contract in jdk 1.8