fix countAllBatches query

patch by Lyuben Todorov; reviewed by jbellis for CASSANDRA-7300
This commit is contained in:
Jonathan Ellis 2014-05-25 07:23:43 -05:00
parent f64dc45276
commit 3aef07dbaa
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ public class BatchlogManager implements BatchlogManagerMBean
public int countAllBatches()
{
return (int) executeInternal("SELECT count(*) FROM %s.%s", Keyspace.SYSTEM_KS, SystemKeyspace.BATCHLOG_CF).one().getLong("count");
String query = String.format("SELECT count(*) FROM %s.%s", Keyspace.SYSTEM_KS, SystemKeyspace.BATCHLOG_CF);
return (int) executeInternal(query).one().getLong("count");
}
public long getTotalBatchesReplayed()