You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Yongxian Yuan (JIRA)" <ji...@apache.org> on 2016/12/02 06:19:58 UTC

[jira] [Created] (PHOENIX-3514) java.lang.IndexOutOfBoundsException

Yongxian Yuan created PHOENIX-3514:
--------------------------------------

             Summary: java.lang.IndexOutOfBoundsException
                 Key: PHOENIX-3514
                 URL: https://issues.apache.org/jira/browse/PHOENIX-3514
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.7.0
            Reporter: Yongxian Yuan


When paged queries of second page and serached by local index 
automatically,the hbase sever sometime throw execption:

2016-11-30 14:59:58,205 DEBUG [B.DefaultRpcServer.handler=0,queue=0,port=60020] ipc.RpcServer: B.DefaultRpcServer.handler=0,queue=0,port=60020: callId: 34776 service: ClientService methodName: Scan size: 25 connection: 172.25.21.13:31201
org.apache.hadoop.hbase.DoNotRetryIOException: _LOCAL_IDX_GSMS_MSG_PACK_SMS,\xFF\xFF\xFE\xA7\xDA;C\xFF\x00\x00,1480416200074.f40d810e2caa8be6d1c3d01f8cd58c4f.: 
        at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:87)
        at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:53)
        at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$2.nextRaw(BaseScannerRegionObserver.java:352)
        at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:76)
        at org.apache.hadoop.hbase.regionserver.HRegionServer.scan(HRegionServer.java:3336)
        at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:32492)
        at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2197)
        at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:104)
        at org.apache.hadoop.hbase.ipc.RpcExecutor.consumerLoop(RpcExecutor.java:133)
        at org.apache.hadoop.hbase.ipc.RpcExecutor$1.run(RpcExecutor.java:108)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: 
        at org.apache.phoenix.index.IndexMaintainer.buildDataRowKey(IndexMaintainer.java:653)
        at org.apache.phoenix.util.IndexUtil.wrapResultUsingOffset(IndexUtil.java:506)
        at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$2.nextRaw(BaseScannerRegionObserver.java:339)
        ... 8 more
Caused by: java.lang.IndexOutOfBoundsException
        at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:151)
        at java.io.DataOutputStream.write(DataOutputStream.java:107)
        at org.apache.phoenix.index.IndexMaintainer.buildDataRowKey(IndexMaintainer.java:653)
        ... 10 more

When I modified the 4.7 source code to get more log(the source code and the log in the Attachments),I found the "indexRowKeyPtr" has bean changed.

Throws this execption is because ScanRegionObserver.class is a Singleton and the property of ptr(ImmutableBytesWritable.class) is not synchronised.

So changing the property of ptr to a temporary variable will solve the problem



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)