mirror of https://github.com/apache/cassandra
CASSANDRA-14366: Add try-catch block for missing prepared statement
This commit is contained in:
parent
a5569da3c9
commit
3540e2463f
|
|
@ -120,13 +120,21 @@ public class Info extends AbstractCommand
|
|||
cacheService.getCounterCacheSavePeriodInSeconds());
|
||||
|
||||
// Prepared Statement Cache: entries, size, capacity, executions, evictions
|
||||
out.printf("%-23s: entries %d, size %s, capacity %s, %d executions, %d evictions%n",
|
||||
"Prepared Stmt Cache",
|
||||
probe.getCQLMetric("PreparedStatementsCount"),
|
||||
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheSize")),
|
||||
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheCapacity")),
|
||||
probe.getCQLMetric("PreparedStatementsExecuted"),
|
||||
probe.getCQLMetric("PreparedStatementsEvicted"));
|
||||
try
|
||||
{
|
||||
out.printf("%-23s: entries %d, size %s, capacity %s, %d executions, %d evictions%n",
|
||||
"Prepared Stmt Cache",
|
||||
probe.getCQLMetric("PreparedStatementsCount"),
|
||||
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheSize")),
|
||||
FileUtils.stringifyFileSize((long) probe.getCQLMetric("PreparedStatementsCacheCapacity")),
|
||||
probe.getCQLMetric("PreparedStatementsExecuted"),
|
||||
probe.getCQLMetric("PreparedStatementsEvicted"));
|
||||
}
|
||||
catch (RuntimeException e)
|
||||
{
|
||||
if (!(e.getCause() instanceof InstanceNotFoundException))
|
||||
throw e;
|
||||
}
|
||||
|
||||
// Chunk Cache: Hits, Requests, RecentHitRate, SavePeriodInSeconds
|
||||
try
|
||||
|
|
|
|||
Loading…
Reference in New Issue