hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Shelukhin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7503) Add exists(List) in HTableInterface to allow multiple parallel exists at one time
Date Fri, 18 Jan 2013 23:20:13 GMT

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

Sergey Shelukhin commented on HBASE-7503:
-----------------------------------------


{code}
Input: List<Get> gets; List<KeyPair> startEndKeys = ...;

List<Request> requests = [];
List<int[]> getIndexesPerRequest = [];

for {s,e} in startEndKeys {
  Request request = null
  for i in [0, gets.length) {
    if (gets[i] != null and gets[i].rowKey is in [s,e)) {
      if (request == null) {
        request = new Request()
        requests.add(request)
        getIndexesPerRequest.add(new int[])
      }
      request.addGet(gets[i]);
      getIndexesPerRequest[requests.length - 1] = i;
      gets[i] = null;
    }
  }
}
optionally check that gets are all nulls
send and wait for requests (or could be sent inline after internal for-loop above).
List<blah> results = new List<blah>(gets.length)
for i in [0, responses.length) {
  if error do error stuff, otherwise {
    assert response[i].results.length == getIndexesPerRequest[i].length;
    for j in [0, response[i].results.length) {
      results[getIndexesPerRequest[i][j]] = response.results[j]
   }
}
return results;
{code}
                
> 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-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

Mime
View raw message