You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2016/01/11 23:57:40 UTC

[jira] [Commented] (PHOENIX-2587) Decoding error for TIMESTAMP DESC values

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

Hadoop QA commented on PHOENIX-2587:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12781669/2587.patch
  against master branch at commit 42736973bb9bc79490998d7906219ad14f1fb07d.
  ATTACHMENT ID: 12781669

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:red}-1 tests included{color}.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    {color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-PHOENIX-Build/219//console

This message is automatically generated.

> Decoding error for TIMESTAMP DESC values
> ----------------------------------------
>
>                 Key: PHOENIX-2587
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2587
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>            Reporter: Nick Dimiduk
>            Assignee: Nick Dimiduk
>             Fix For: 4.7.0, 4.6.1
>
>         Attachments: 2587.patch
>
>
> A minor logic error in {{TIMESTAMP DESC}} values results in the following exception:
> {noformat}
> Caused by: java.lang.IllegalArgumentException: offset (8) + length (4) exceed the capacity of the array: 4
> 	at org.apache.hadoop.hbase.util.Bytes.explainWrongLengthOrOffset(Bytes.java:631)
> 	at org.apache.hadoop.hbase.util.Bytes.toInt(Bytes.java:801)
> 	at org.apache.hadoop.hbase.util.Bytes.toInt(Bytes.java:787)
> 	at org.apache.phoenix.schema.types.PUnsignedInt$UnsignedIntCodec.decodeInt(PUnsignedInt.java:162)
> 	at org.apache.phoenix.schema.types.PTimestamp.toObject(PTimestamp.java:109)
> 	at org.apache.phoenix.schema.types.PTimestamp.toObject(PTimestamp.java:32)
> 	at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:988)
> 	at org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:846)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:322)
> 	at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:314)
> 	at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:313)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:242)
> 	at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:172)
> 	at org.apache.phoenix.jdbc.PhoenixStatement.executeBatch(PhoenixStatement.java:1318)
> 	... 11 more
> {noformat}
> On inspection, looks like we don't compensate the offset parameter when the nanos part is being decoded.
> {noformat}
>     public int decodeInt(byte[] b, int o, SortOrder sortOrder) {
> ...
>       if (sortOrder == SortOrder.DESC) {
>         b = SortOrder.invert(b, o, new byte[Bytes.SIZEOF_INT], 0, Bytes.SIZEOF_INT);
>       }
>       int v = Bytes.toInt(b, o);
> ...
>     }
> {noformat}



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