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

Anil Gupta commented on HBASE-7474:
-----------------------------------

For SortingProtocol:

+  <T> Result[] sortIncreasing(Scan scan, byte[] columnFamily, byte[] 
columnQualifier,

I think sortAscending would be more familiar to people who have worked with 
RDBMS.
Anil: Done. Even, i was thinking that Ascending and Descending are more familiar

+  <T> Result[] sortDecreasing(Scan scan, byte[] columnFamily, byte[] 
columnQualifier,

sortDescending would be a better method name.
Anil: Done

+   * @param singleRegion does this scan request spans multiple regions?

spelling: 'spans' -> 'span'
Anil: "spans" is the correct word

Looking at SortingProtocolImplementation.sortIncreasing(), singleRegion is not 
referenced in the loop - we scan until there is no more row.
Anil: When the scan is limited to a single region we only return startIndex to 
startIndex+(pageSize-1) results to client since we dont need to merge sort at 
client side. We dont need to use singleRegion in the loop. Otherwise if scan 
spans multiple region then Region returns 0 to (startIndex+(pageSize-1)) to 
client for carrying out merge sort.

Some clarification is needed in javadoc and variable name.
Anil:Do you want me to write above description for singleRegion in comments? 
Wont it confuse the user with too much of information?

                
> 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
>            Assignee: Anil Gupta
>            Priority: Minor
>              Labels: coprocessors, scan, sort
>             Fix For: 0.94.5
>
>         Attachments: hbase-7474.patch, hbase-7474-v2.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

Reply via email to