cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-70) MultiGet
Date Thu, 27 Aug 2009 03:56:59 GMT


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

        for (String key: keys)
            if (predicate.column_names != null)
                commands.add(new SliceByNamesReadCommand(keyspace, key, column_parent, predicate.column_names));
                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:
>             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.

View raw message