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

Ted Yu commented on HBASE-9543:
-------------------------------

{code}
+      public synchronized void update(byte[] region, byte[] row, List<R> 
results) {
+        if (isSetTooLarge) return;
+        set.addAll(results);
+        if (set.size() > uniqueNumLimit) {
{code}
Before adding results to set, we should be able to see if the addition would 
cause isSetTooLarge to be true, right ?
So the check can be made before addition.
When isSetTooLarge becomes true, we can clear set.
{code}
+    UniqueCallBack aUniqueCallBack = new UniqueCallBack(conf);
{code}
nit: naming the variable uniqueCallBack should do.
{code}
+    } catch( IOException e) {
+      assertTrue(e.getMessage().contains(
+        "uniqe column value num is larger than limit:"));
{code}
What if exception message is changed by someone in the future ?

In AggregateImplementation#getUniqueValues():
{code}
+      if (qualifiers != null && !qualifiers.isEmpty()) {
+        qualifier = qualifiers.pollFirst();
+      }
{code}
Why are second and subsequent qualifiers be ignored ?

>  Impl unique aggregation
> ------------------------
>
>                 Key: HBASE-9543
>                 URL: https://issues.apache.org/jira/browse/HBASE-9543
>             Project: HBase
>          Issue Type: New Feature
>          Components: Coprocessors
>            Reporter: Liu Shaohui
>            Assignee: Liu Shaohui
>            Priority: Minor
>         Attachments: HBASE-9543-0.94-v1.diff, HBASE-9543-0.94-v2.diff, 
> HBASE-9543-0.94-v3.diff, HBASE-9543-trunk-v1.diff, HBASE-9543-trunk-v2.diff, 
> HBASE-9543-trunk-v3.diff, HBASE-9543-trunk-v4.diff, HBASE-9543-trunk-v5.diff
>
>
> Impl unique aggregation: return a set of all columns' values in a scan.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to