Showing
3 changed files
with
7 additions
and
3 deletions
@@ -45,7 +45,7 @@ public class RpcManagerActor extends ContextAwareActor { | @@ -45,7 +45,7 @@ public class RpcManagerActor extends ContextAwareActor { | ||
45 | 45 | ||
46 | private final ServerAddress instance; | 46 | private final ServerAddress instance; |
47 | 47 | ||
48 | - public RpcManagerActor(ActorSystemContext systemContext) { | 48 | + RpcManagerActor(ActorSystemContext systemContext) { |
49 | super(systemContext); | 49 | super(systemContext); |
50 | this.sessionActors = new HashMap<>(); | 50 | this.sessionActors = new HashMap<>(); |
51 | this.pendingMsgs = new HashMap<>(); | 51 | this.pendingMsgs = new HashMap<>(); |
@@ -55,7 +55,6 @@ public class RpcManagerActor extends ContextAwareActor { | @@ -55,7 +55,6 @@ public class RpcManagerActor extends ContextAwareActor { | ||
55 | .filter(otherServer -> otherServer.getServerAddress().compareTo(instance) > 0) | 55 | .filter(otherServer -> otherServer.getServerAddress().compareTo(instance) > 0) |
56 | .forEach(otherServer -> onCreateSessionRequest( | 56 | .forEach(otherServer -> onCreateSessionRequest( |
57 | new RpcSessionCreateRequestMsg(UUID.randomUUID(), otherServer.getServerAddress(), null))); | 57 | new RpcSessionCreateRequestMsg(UUID.randomUUID(), otherServer.getServerAddress(), null))); |
58 | - | ||
59 | } | 58 | } |
60 | 59 | ||
61 | @Override | 60 | @Override |
@@ -48,7 +48,8 @@ public class CassandraBufferedRateExecutor extends AbstractBufferedRateExecutor< | @@ -48,7 +48,8 @@ public class CassandraBufferedRateExecutor extends AbstractBufferedRateExecutor< | ||
48 | 48 | ||
49 | @Scheduled(fixedDelayString = "${cassandra.query.rate_limit_print_interval_ms}") | 49 | @Scheduled(fixedDelayString = "${cassandra.query.rate_limit_print_interval_ms}") |
50 | public void printStats() { | 50 | public void printStats() { |
51 | - log.info("Permits totalAdded [{}] totalLaunched [{}] totalReleased [{}] totalFailed [{}] totalExpired [{}] totalRejected [{}] currBuffer [{}] ", | 51 | + log.info("Permits queueSize [{}] totalAdded [{}] totalLaunched [{}] totalReleased [{}] totalFailed [{}] totalExpired [{}] totalRejected [{}] currBuffer [{}] ", |
52 | + getQueueSize(), | ||
52 | totalAdded.getAndSet(0), totalLaunched.getAndSet(0), totalReleased.getAndSet(0), | 53 | totalAdded.getAndSet(0), totalLaunched.getAndSet(0), totalReleased.getAndSet(0), |
53 | totalFailed.getAndSet(0), totalExpired.getAndSet(0), totalRejected.getAndSet(0), | 54 | totalFailed.getAndSet(0), totalExpired.getAndSet(0), totalRejected.getAndSet(0), |
54 | concurrencyLevel.get()); | 55 | concurrencyLevel.get()); |
@@ -166,4 +166,8 @@ public abstract class AbstractBufferedRateExecutor<T extends AsyncTask, F extend | @@ -166,4 +166,8 @@ public abstract class AbstractBufferedRateExecutor<T extends AsyncTask, F extend | ||
166 | log.debug("[{}] {} task", taskCtx.getId(), action); | 166 | log.debug("[{}] {} task", taskCtx.getId(), action); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | + | ||
170 | + protected int getQueueSize(){ | ||
171 | + return queue.size(); | ||
172 | + } | ||
169 | } | 173 | } |