[ 
https://issues.apache.org/jira/browse/CASSANDRA-70?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12748251#action_12748251
 ] 

Jonathan Ellis commented on CASSANDRA-70:
-----------------------------------------

looking good.  you have good taste for using whitespace to break up blocks of 
code into related groups of lines.

some comments:

        Map<String, List<ColumnOrSuperColumn>> columnMap = 
multiget_slice(keyspace, keys, column_parent, predicate, consistency_level);
        return columnMap.get(key);

let's inline that:

        return multiget_slice(keyspace, keys, column_parent, predicate, 
consistency_level).get(key);

here,
        for (String key: keys)
        {
            if (predicate.column_names != null)
                commands.add(new SliceByNamesReadCommand(keyspace, key, 
column_parent, predicate.column_names));
            else
                commands.add(new SliceFromReadCommand(keyspace, key, 
column_parent, range.start, range.finish, range.reversed, range.count));
       }

put the if outside the for instead of vice versa to emphasize that predicate is 
constant

        List<ReadCommand> commandsAsList =

avoid hungarian-notation-ish names.  "commands" is better here, especially 
since this doesn't come from "arrays.aslist" which returns lists that can't be 
add()ed to.

looks like a ton of similar code b/t multiget and multiget_count, can we 
refactor any of that out similar to the getSlice method?

            logger.debug("weakreadlocal reading " + commands);

doublecheck that you can still follow a command and its ID through the debug 
logs -- this is the only one I noticed but there may be more.  this is going to 
print out the local object id which is not useful; use stringutils.join on 
Lists.



> MultiGet
> --------
>
>                 Key: CASSANDRA-70
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-70
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Core
>    Affects Versions: 0.4
>            Reporter: Jonathan Ellis
>            Assignee: Chris Goffinet
>         Attachments: 
> 0001-Added-multiget-support.-Added-new-multiget_-interface-v2.patch, 
> 0001-CASSANDRA-70-Multiget-interface-changes.patch, 
> 0002-CASSANDRA-70-Remove-multiget-interfaces-and-MultiAsy.patch
>
>
> Avinash is working on a multiget interface (requesting data from multiple 
> keys at once).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to