adaltonreis / cassandra-java-client

Automatically exported from code.google.com/p/cassandra-java-client
0 stars 0 forks source link

multi get function should return ordered map #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
call KeySpace multi get function with given column name list, should return 
a linked map with same order as column name list.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by Santal...@gmail.com on 24 Dec 2009 at 1:56

GoogleCodeExporter commented 9 years ago
The Fact is cassandra original client(Cassandra.Client)'s multi get is also no 
order
so the LinkedMap is no useful。
We can change our KeySpace code like this:
we know the input keys is a list,suppose it's name is keys.
TreeMap treeMap = new TreeMap();
treeMap.put(keys.indexOf(key), column); 
......
Map map = HashMap();
for(Integer keyNum:treeMap.keySet()){
    String key = keys.get(keyNum);
    map.put(key,treeMap.get(key ));
}
return map;

ok,we can return a ordered results like inputs.

Original comment by wangjiaj...@gmail.com on 27 Dec 2009 at 7:16