phoenix hbase:resultset.next()运行到StackOverflower

juzqafwq  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(404)

我在遍历 ResultSet 查询的名称。我的代码是用java编写的,我做了如下操作:

String sql = " SELECT * FROM TABLE_NAME WHERE DATE_TIME > 'something' ORDER BY DATE_TIME DESC LIMIT 1"
  ResultSet rs = preparedStatement.execute(sql);

  while(rs.next()){
     //Code never enters this block
  }

在调试时,我发现当执行到达rs.next()时,它会遇到某种错误并抛出stackoverflowerror。我试图调试更多,但如果有人知道或理解为什么会发生这种情况,请帮助。提前谢谢。

org.apache.phoenix.exception.PhoenixIOException: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: THREAT_VIEW,,1431123584956.a0075602ce1d3ed11929c84e62686e45.: null
    at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:84)
    at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:52)
    at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$2.nextRaw(BaseScannerRegionObserver.java:309)
    at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:76)
    at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2195)
    at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:31443)
    at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2035)
    at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:107)
    at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:130)
    at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:107)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.StackOverflowError
    at org.apache.hadoop.hbase.util.Bytes$LexicographicalComparerHolder$UnsafeComparer.compareTo(Bytes.java:1295)
    at org.apache.hadoop.hbase.util.Bytes.compareTo(Bytes.java:1223)
    at org.apache.hadoop.hbase.CellComparator.compareRows(CellComparator.java:186)
    at org.apache.hadoop.hbase.CellComparator.compare(CellComparator.java:63)
    at org.apache.hadoop.hbase.KeyValue$KVComparator.compare(KeyValue.java:1968)
    at org.apache.hadoop.hbase.KeyValue$KVComparator.compare(KeyValue.java:1897)
    at org.apache.hadoop.hbase.util.Bytes.binarySearch(Bytes.java:1901)
    at org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.rootBlockContainingKey(HFileBlockIndex.java:426)
    at org.apache.hadoop.hbase.io.hfile.HFileBlockIndex$BlockIndexReader.loadDataBlockWithScanInfo(HFileBlockIndex.java:215)
    at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$AbstractScannerV2.seekTo(HFileReaderV2.java:625)
    at org.apache.hadoop.hbase.io.hfile.HFileReaderV2$AbstractScannerV2.seekTo(HFileReaderV2.java:573)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekAtOrAfter(StoreFileScanner.java:247)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:434)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
    at org.apache.hadoop.hbase.regionserver.StoreFileScanner.seekToPreviousRow(StoreFileScanner.java:449)
sqyvllje

sqyvllje1#

似乎使用的hbase版本不支持pk上的反向排序。
所以呢 ORDER BY START_TIME ->会有用的。但是 ORDER BY START_TIME DESC -->不起作用

相关问题