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

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

    [ https://issues.apache.org/jira/browse/PHOENIX-3514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15722711#comment-15722711 ] 

Josh Elser edited comment on PHOENIX-3514 at 12/5/16 4:47 PM:
--------------------------------------------------------------

[~Yongxian_Yuan], can you please attach a patch/diff instead of the final file? It's very difficult to understand what you changed.

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

Or... did you not actually make a change? And you're just showing the logging additions?

FYI [~chrajeshbabu32@gmail.com] if this is a local indexing issue..


was (Author: elserj):
[~Yongxian_Yuan], can you please attach a patch/diff instead of the final file? It's very difficult to understand what you changed.

> 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
>         Attachments: IndexMaintainer.java, log.txt
>
>
> 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)