mirror of https://github.com/apache/cassandra
fix toString of hint destination tokens
patch by brandonwilliams; reviewed by jbellis for CASSANDRA-4568
This commit is contained in:
parent
ec76baf0dd
commit
4764a379e2
|
|
@ -1,4 +1,5 @@
|
|||
1.0.12
|
||||
* fix toString of hint destination tokens (CASSANDRA-4568)
|
||||
* (Hadoop) fix setting key length for old-style mapred api (CASSANDRA-4534)
|
||||
* (Hadoop) fix iterating through a resultset consisting entirely
|
||||
of tombstoned rows (CASSANDRA-4466)
|
||||
|
|
|
|||
|
|
@ -464,10 +464,15 @@ public class HintedHandOffManager implements HintedHandOffManagerMBean
|
|||
List<Row> rows = getHintsSlice(Integer.MAX_VALUE);
|
||||
|
||||
Map<String, Integer> result = new HashMap<String, Integer>();
|
||||
Token.TokenFactory tokenFactory = StorageService.getPartitioner().getTokenFactory();
|
||||
for (Row r : rows)
|
||||
{
|
||||
if (r.cf != null) //ignore removed rows
|
||||
result.put(new String(r.key.key.array()), r.cf.getColumnCount());
|
||||
if (r.cf == null) // ignore removed rows
|
||||
continue;
|
||||
|
||||
int count = r.cf.getColumnCount();
|
||||
if (count > 0)
|
||||
result.put(tokenFactory.toString(r.key.token), count);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue