remove multiget_count until/unless there is a demonstrated need for it. patch by jbellis for CASSANDRA-70

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808597 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2009-08-27 20:11:49 +00:00
parent 3427b4b7d2
commit 40641c73a6
4 changed files with 37 additions and 976 deletions

View File

@ -129,9 +129,6 @@ service Cassandra {
i32 get_count(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 5:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire),
map<string,i32> multiget_count(1:string keyspace, 2:list<string> keys, 3:ColumnParent column_parent, 5:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire),
void insert(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:binary value, 5:i64 timestamp, 6:ConsistencyLevel consistency_level=0)
throws (1: InvalidRequestException ire, 2: UnavailableException ue),

View File

@ -363,15 +363,6 @@ public class CassandraServer implements Cassandra.Iface
return multigetCountInternal(table, Arrays.asList(key), column_parent, consistency_level).get(key);
}
public Map<String, Integer> multiget_count(String table, List<String> keys, ColumnParent column_parent, int consistency_level)
throws InvalidRequestException
{
if (logger.isDebugEnabled())
logger.debug("multiget_count");
return multigetCountInternal(table, keys, column_parent, consistency_level);
}
private Map<String, Integer> multigetCountInternal(String table, List<String> keys, ColumnParent column_parent, int consistency_level)
throws InvalidRequestException
{

View File

@ -542,22 +542,3 @@ class TestMutations(CassandraTester):
for key in keys:
assert rows.has_key(key) == True
assert columns == rows[key]
def test_multiget_count(self):
"""Insert multiple keys and retrieve them using the multiget_count interface"""
"""Generate a list of 10 keys and insert them"""
num_keys = 10
keys = ['key'+str(i) for i in range(1, num_keys+1)]
_insert_multi(keys)
"""Retrieve all 10 key slices"""
rows = client.multiget_count('Keyspace1', keys, ColumnParent('Standard1'), ConsistencyLevel.ONE)
keys1 = rows.keys().sort()
keys2 = keys.sort()
columns = [ColumnOrSuperColumn(c) for c in _SIMPLE_COLUMNS]
"""Validate if the returned rows have the keys requested and if the ColumnOrSuperColumn is what was inserted"""
for key in keys:
assert rows.has_key(key) == True
assert rows[key] == 2