hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7474) Endpoint Implementation to support Scans with Sorting of Rows based on column values(similar to "order by" clause of RDBMS)
Date Fri, 04 Jan 2013 19:06:13 GMT

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

Ted Yu commented on HBASE-7474:
-------------------------------

Any new feature should come with some tests, do you agree ?
{code}
+   * @param startIndex
+   * @param pageSize
+   * @return
{code}
Please add explanation for the above parameters of sortIncreasing(). Underneath getSortedRows()
is called with last parameter of false. Can we introduce sortDecreasing so that sortIncreasing()
and sortDecreasing() can be removed ?
This would make the if statements below unnecessary:
{code}
+            if (sortDecreasing) return instance.sortDecreasing(scan, columnFamily, columnQualifier,
+              colInterpreter, startIndex, pageSize, true);
+            else return instance.sortIncreasing(scan, columnFamily, columnQualifier,
{code}
{code}
+   * @param startIndex
+   * @param pageSize
+   * @param sortDecreasing
+   * @return
{code}
Complete javadoc above. nit: sortDecreasing -> sortDescending
{code}
+      return new Result[0];
+    } else if (numberOfRegionsInRange == 1) {
{code}
'else' keyword is not needed above.
{code}
+      System.out.println("Querying only one region");
{code}
Please use log throughout the patch.
In mergeSortIncreasing():
{code}
+    int currentMaxValueRegion = 0;
{code}
I guess you meant currentMinValueRegion.
{code}
+    int[] arrayIndex = new int[regionResultMap.size()];
{code}
arrayIndex is used to point to entries in Result[] returned for region(s). Please add comment
explaining its purpose.
It would be nice if you can unite mergeSortIncreasing() and mergeSortDecreasing().
                
> Endpoint Implementation to support Scans with Sorting of Rows based on column values(similar
to "order by" clause of RDBMS)
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-7474
>                 URL: https://issues.apache.org/jira/browse/HBASE-7474
>             Project: HBase
>          Issue Type: New Feature
>          Components: Coprocessors, Scanners
>    Affects Versions: 0.94.3
>            Reporter: Anil Gupta
>            Priority: Minor
>              Labels: coprocessors, scan, sort
>             Fix For: 0.94.5
>
>         Attachments: hbase-7474.patch, SortingEndpoint_high_level_flowchart.pdf
>
>
> Recently, i have developed an Endpoint which can sort the Results(rows) on the basis
of column values. This functionality is similar to "order by" clause of RDBMS. I will be submitting
this Patch for HBase0.94.3
> I am almost done with the initial development and testing of feature. But, i need to
write the JUnits for this. I will also try to make design doc.
> Thanks,
> Anil Gupta
> Software Engineer II, Intuit, inc

--
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

Mime
View raw message