[jira] [Commented] (HBASE-5821) Incorrect handling of null value in Coprocessor aggregation function min()

2013-08-02 Thread asha koshti (JIRA)

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

asha koshti commented on HBASE-5821:


Even i am facing the issue in using coprocessor for doing sum.

AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter ci = new LongColumnInterpreter();
Scan scan = new Scan();
scan.addColumn(Bytes.toBytes("info"),Bytes.toBytes("hits"));
long sum = aClient.sum(Bytes.toBytes("demo"), ci, scan);

> Incorrect handling of null value in Coprocessor aggregation function min()
> --
>
> Key: HBASE-5821
> URL: https://issues.apache.org/jira/browse/HBASE-5821
> Project: HBase
>  Issue Type: Bug
>  Components: Coprocessors
>Affects Versions: 0.92.1
>Reporter: Maryann Xue
>Assignee: Maryann Xue
> Fix For: 0.92.2
>
> Attachments: HBASE-5821.patch
>
>
> Both in AggregateImplementation and AggregationClient, the evaluation of the 
> current minimum value is like:
> min = (min == null || ci.compare(result, min) < 0) ? result : min;
> The LongColumnInterpreter takes null value is treated as the least value, 
> while the above expression takes min as the greater value when it is null. 
> Thus, the real minimum value gets discarded if a null value comes later.
> max() could also be wrong if a different ColumnInterpreter other than 
> LongColumnInterpreter treats null value differently (as the greatest).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (HBASE-9109) Null pointer exception while invoking coprocessor.

2013-08-02 Thread asha koshti (JIRA)

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

asha koshti commented on HBASE-9109:


Even i am facing the issue in  using coprocessor for doing sum.

AggregationClient aClient = new AggregationClient(conf);
final ColumnInterpreter ci = new LongColumnInterpreter();
Scan scan = new Scan();
scan.addColumn(Bytes.toBytes("info"),Bytes.toBytes("hits"));
long sum = aClient.sum(Bytes.toBytes("demo"), ci, scan);

> Null pointer exception while invoking coprocessor.
> --
>
> Key: HBASE-9109
> URL: https://issues.apache.org/jira/browse/HBASE-9109
> Project: HBase
>  Issue Type: Bug
>  Components: Client, Coprocessors
>Affects Versions: 0.98.0
> Environment: OS - CentOS release 6.2 (Final)
> JAVA - java version "1.6.0_22"
>OpenJDK Runtime Environment (IcedTea6 1.10.4) 
> (rhel-1.41.1.10.4.el6-x86_64)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> Configuration: 3 node cluster with Hadoop-3.0
>Reporter: Mayur
> Fix For: 0.98.0
>
>
> This problem is observed when region server dies while an endpoint 
> coprocessor is executing. On the client side channel.getLastRegion() returns 
> null and we get null pointer exception while updating result map. 
> Following stack-trace is seen on client:
> Caused by: java.lang.NullPointerException
> at org.apache.hadoop.hbase.util.Bytes.compareTo(Bytes.java:981)
> at 
> org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:128)
> at 
> org.apache.hadoop.hbase.util.Bytes$ByteArrayComparator.compare(Bytes.java:119)
> at java.util.TreeMap.put(TreeMap.java:530)
> at java.util.Collections$SynchronizedMap.put(Collections.java:1979)
> at org.apache.hadoop.hbase.client.HTable$17.update(HTable.java:1372)
> at org.apache.hadoop.hbase.client.HTable$18.call(HTable.java:1401)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
> at java.util.concurrent.FutureTask.run(FutureTask.java:138)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira