Skip to content

Commit

Permalink
Merge pull request #303 from mebigfatguy/master
Browse files Browse the repository at this point in the history
minor cleanups
  • Loading branch information
Nate McCall committed Oct 15, 2011
2 parents 5dc421b + 137f79f commit 12c63ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public HClientPool getPool(Collection<HClientPool> pools, Set<CassandraHost> exc
if ((first - next) / first > DYNAMIC_BADNESS_THRESHOLD) {
Collections.sort(poolList, new SortByScoreComparator());
if (log.isDebugEnabled())
log.debug(String.format("According to score we have chosen {} vs first {}", poolList.get(0), fp));
log.debug("According to score we have chosen {} vs first {}", poolList.get(0), fp);
break;
}
}
Expand Down Expand Up @@ -183,4 +183,4 @@ public double getBadnessThreshold() {
public void setBadnessThreshold(double badness) {
DYNAMIC_BADNESS_THRESHOLD = badness;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,15 @@ private ExecutionResult<Map<ByteBuffer, List<ColumnOrSuperColumn>>> multigetSlic
return ((ExecutingKeyspace)keyspace).doExecuteOperation(new Operation<Map<ByteBuffer,List<ColumnOrSuperColumn>>>(OperationType.READ) {
@Override
public Map<ByteBuffer,List<ColumnOrSuperColumn>> execute(Cassandra.Client cassandra) throws HectorException {
Map<ByteBuffer,List<ColumnOrSuperColumn>> cosc = new LinkedHashMap<ByteBuffer, List<ColumnOrSuperColumn>>();
try {
List<K> keyList = new ArrayList<K>();
Iterators.addAll(keyList, keys.iterator());
cosc = cassandra.multiget_slice(keySerializer.toBytesList(keyList), columnParent,
return cassandra.multiget_slice(keySerializer.toBytesList(keyList), columnParent,
(workingSlicePredicate == null ? activeSlicePredicate.setColumnNames(columnValueSerializers.keySet()).toThrift() : workingSlicePredicate.toThrift()),
ThriftConverter.consistencyLevel(consistencyLevelPolicy.get(operationType)));
} catch (Exception e) {
throw exceptionsTranslator.translate(e);
}

return cosc;
}
});
}
Expand Down

0 comments on commit 12c63ce

Please sign in to comment.