开发者社区> 问答> 正文

hbase 2.0偶尔报错, 下面的compareTo方法是否没有判断that为null导致的?

public class CachedMobFile extends MobFile implements Comparable

@Override public int compareTo(CachedMobFile that) { if (this.accessCount == that.accessCount) return 0; return this.accessCount < that.accessCount ? 1 : -1; }

2021-09-16 20:38:08,559 ERROR [RpcServer.default.FPBQ.Fifo.handler=46,queue=6,port=16020] ipc.RpcServer: Unexpected throwable object java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:866) at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:483) at java.util.ComparableTimSort.mergeCollapse(ComparableTimSort.java:406) at java.util.ComparableTimSort.sort(ComparableTimSort.java:213) at java.util.Arrays.sort(Arrays.java:1312) at java.util.Arrays.sort(Arrays.java:1506) at java.util.ArrayList.sort(ArrayList.java:1462) at java.util.Collections.sort(Collections.java:141) at org.apache.hadoop.hbase.mob.MobFileCache.evict(MobFileCache.java:148) at org.apache.hadoop.hbase.mob.MobFileCache.openFile(MobFileCache.java:218) at org.apache.hadoop.hbase.regionserver.HMobStore.readCell(HMobStore.java:401) at org.apache.hadoop.hbase.regionserver.HMobStore.resolve(HMobStore.java:354) at org.apache.hadoop.hbase.regionserver.MobStoreScanner.next(MobStoreScanner.java:73) at org.apache.hadoop.hbase.regionserver.KeyValueHeap.next(KeyValueHeap.java:153) at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.populateResult(HRegion.java:6354) at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextInternal(HRegion.java:6518) at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.nextRaw(HRegion.java:6291) at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.next(HRegion.java:6268) at org.apache.hadoop.hbase.regionserver.HRegion$RegionScannerImpl.next(HRegion.java:6255) at org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2526) at org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2453) at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41998) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:409) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)

展开
收起
开发者小助理 2021-10-15 14:20:07 2064 0
2 条回答
写回答
取消 提交回答
  • 码字.....

    跟踪一下值问题。

    2021-10-27 12:35:03
    赞同 展开评论 打赏
  • 有值为null,排序导致的问题

    2021-10-15 17:25:20
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
大数据时代的存储 ——HBase的实践与探索 立即下载
Hbase在滴滴出行的应用场景和最佳实践 立即下载
阿里云HBase主备双活 立即下载