Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
…ation order on getRangeSlice
  • Loading branch information
rantav committed Apr 8, 2010
1 parent 4321125 commit c87d6d1
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -5,6 +5,7 @@
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -152,7 +153,7 @@ public Map<String, List<Column>> execute(Client cassandra) throws InvalidRequest
if (keySlices == null || keySlices.isEmpty()) {
return Collections.emptyMap();
}
Map<String, List<Column>> ret = new HashMap<String, List<Column>>(keySlices.size());
Map<String, List<Column>> ret = new LinkedHashMap<String, List<Column>>(keySlices.size());
for (KeySlice keySlice : keySlices) {
ret.put(keySlice.getKey(), getColumnList(keySlice.getColumns()));
}
Expand All @@ -177,7 +178,7 @@ public Map<String, List<SuperColumn>> execute(Client cassandra)
if (keySlices == null || keySlices.isEmpty()) {
return Collections.emptyMap();
}
Map<String, List<SuperColumn>> ret = new HashMap<String, List<SuperColumn>>(
Map<String, List<SuperColumn>> ret = new LinkedHashMap<String, List<SuperColumn>>(
keySlices.size());
for (KeySlice keySlice : keySlices) {
ret.put(keySlice.getKey(), getSuperColumnList(keySlice.getColumns()));
Expand Down Expand Up @@ -353,7 +354,7 @@ public Map<String, SuperColumn> multigetSuperColumn(List<String> keys, ColumnPat
return Collections.emptyMap();
}

HashMap<String, SuperColumn> result = new HashMap<String, SuperColumn>(keys.size() * 2);
Map<String, SuperColumn> result = new HashMap<String, SuperColumn>(keys.size() * 2);
for (Map.Entry<String, List<SuperColumn>> entry : sclist.entrySet()) {
List<SuperColumn> sclistByKey = entry.getValue();
if (sclistByKey.size() > 0) {
Expand Down

0 comments on commit c87d6d1

Please sign in to comment.