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

Nick Dimiduk commented on HBASE-8284:
-------------------------------------

It's just a style thing. I prefer fewest LOC between entry and exit. Get those 
exit conditions identified and executed first, leave the main body of the 
method for the more complex stuff. This, as opposed to having short LOC-to-exit 
at the beginning and short LOC-to-exit at the end with a big body of logic in 
the middle.

{noformat}
if (something) {
  // blah blah
  return blah;
}
if (something-else) {
  // foo bar
  return foo;
}

// else clause w/o need for extra indentation.
return other;
{noformat}

It's just style, and considered on a case-by-case basis. Nothing critical here.
                
> Allow String Offset(s) in ColumnPaginationFilter for bookmark based pagination
> ------------------------------------------------------------------------------
>
>                 Key: HBASE-8284
>                 URL: https://issues.apache.org/jira/browse/HBASE-8284
>             Project: HBase
>          Issue Type: Improvement
>          Components: Filters
>    Affects Versions: 0.94.6.1
>            Reporter: Varun Sharma
>            Assignee: Varun Sharma
>            Priority: Minor
>             Fix For: 0.98.0, 0.94.8, 0.95.1
>
>         Attachments: 8284-0.94.txt
>
>
> Attaching from email to HBase user mailing list:
> I am thinking of adding a string offset to ColumnPaginationFilter. There are 
> two reasons:
> 1) For deep pagination, you can seek using SEEK_NEXT_USING_HINT.
> 2) For correctness reasons, this approach is better if the list of columns is 
> mutation. Lets say you get 1st 50 columns using the current approach. In the 
> mean time some columns are inserted amongst the 1st 50 columns. Now you 
> request the 2nd set of 50 columns. Chances are that you will have duplicates 
> amongst the 2 sets (1st 50 and 2nd 50). If instead you used the last column 
> of the 1st 50 as a string offset for getting the 2nd set of columns, the 
> chances of getting dups is significantly lower.
> This becomes important for user facing interactive applications. Particularly 
> where consistency etc. are not as important since those are best effort 
> services. But showing duplicates across pages is pretty bad.
> Please let me know if this makes sense and is feasible. Basically, I would 
> like a string offset passed to ColumnPaginationFilter as an alternative 
> constructor. If the string offset is supplied, then, I would like to seek to 
> either the column supplied or if the column is deleted, seek to the column 
> just greater than the supplied column.

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