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

Jean-Marc Spaggiari commented on HBASE-7503:
--------------------------------------------

Hi Ted,

To detect the complexiti and go without the sorting option, this will add 
almost the same effort are simply always sorting.

Sorting the regions will take R x log(R).
Sorting the gets will take G x log(g).
Looping through the sorting lists will take max (G, R).

So basically, at the end, the complexity will be close to n.log(n)

Not doing the sort will always give is something like n² because of the nested 
loop... 

I will change the implementation.

In Sergey's example above, even if we are setting the gets to null to skip them 
faster, we are still doing the entire loop2. It's a bit more optimal than what 
I did, but we still have n².

Let me think about that and I will come back with a proposal.
                
> Add exists(List) in HTableInterface to allow multiple parallel exists at one 
> time
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-7503
>                 URL: https://issues.apache.org/jira/browse/HBASE-7503
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jean-Marc Spaggiari
>            Assignee: Jean-Marc Spaggiari
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: HBASE-7503-v0-trunk.patch, HBASE-7503-v10-trunk.patch, 
> HBASE-7503-v11-trunk.patch, HBASE-7503-v12-trunk.patch, 
> HBASE-7503-v13-trunk.patch, HBASE-7503-v13-trunk.patch, 
> HBASE-7503-v1-trunk.patch, HBASE-7503-v2-trunk.patch, 
> HBASE-7503-v2-trunk.patch, HBASE-7503-v3-trunk.patch, 
> HBASE-7503-v4-trunk.patch, HBASE-7503-v5-trunk.patch, 
> HBASE-7503-v7-trunk.patch, HBASE-7503-v8-trunk.patch, 
> HBASE-7503-v9-trunk.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> We need to have a Boolean[] exists(List<Get> gets) throws IOException method 
> implemented in HTableInterface.

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