Bump to Dropwizard Metrics 4.0.3 This also cleans up some duplicate dependencies. Release notes: * 4.0.0: https://metrics.dropwizard.io/4.0.0/about/release-notes.html * 4.0.1: https://github.com/dropwizard/metrics/releases/tag/v4.0.1 * 4.0.2: https://github.com/dropwizard/metrics/releases/tag/v4.0.1 * 4.0.3: none available, see https://github.com/dropwizard/metrics/compare/v4.0.2...v4.0.3 Change-Id: I29050a587aebafcf0d169425242b6281dbb43519 Signed-off-by: Stephen Kitt <skitt@redhat.com>
Fix checkstyle reported by odlparent-3.0.0 Change-Id: I08c548fbbbef8527ad7b037b0def33d3c1c09bf6 Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
Make sure MetricsReporter cache is constant Add a missing final keyword, plus the general auto-format. Change-Id: I0027784b6773e4b862bc58d7cc573303dcc57b31 Signed-off-by: Robert Varga <rovarga@cisco.com>
Fix javadocs and enable doclint This eliminates the doclint suppression and fixes up javadoc, so they work with Java 8 out of the box. Change-Id: I7294f0dcd570e3e3c445e54cc8989078175d05d7 Signed-off-by: Robert Varga <rovarga@cisco.com>
Adjust Tx rate limiter for unused transactions I have a test that submits an arbitrary number of config transactions and I noticed it can take an unusually long time depending on the initial Tx rate limit setting. With the default setting of 100 it was very slow even though I could see the adjusted limit increasing where the elapsed time should've been much shorter. It turns out the config datastore rate limit wasn't issue. When a front-end Tx is created, a Tx instance is created in each data store. The operation Tx's were unused but they artificially limited the config rate since the operational rate wasn't getting updated, ie it stayed at 100. I made changes to adjust the rate limit for unused Tx's if there have been no prior "real" Tx's for that data store. In this case, the percentile metrics will be 0 so I basically adjust to the current rate from the other data store. I think this makes sense if we have no other data to go by. This required some infa changes so the ActorContext could get access to the metrics timer for the other data store. Mainly, we need a global MericsRegistry and JmxReporter across both data stores. I reused the MetricsReporter class for this to get the static instance (with changes to support multiple MetricsReporters per domain name). I also added a static method to get all the data store names. I found it useful to see the current rate limit via JMX so I added a new DatastoreInfoMXBean to report it. Change-Id: I09def94e40a1fe57779e76763e48696140f3a125 Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
Optimize MetricsReporter class Constants should really be static, singleton instance should be static and the inner field should never be exposed to outside world. Change-Id: I37776b190cef6b0402f1478b22c47746d547619d Signed-off-by: Robert Varga <rovarga@cisco.com>
Metrics and Configuration 1. Adds a new abstract class AbstractMeteredUntypedActored that extends AbstractUntypedActor. This adds metrics capture capability which can be turned on using Config Subsystem. By default its turned off. 2. Updates Shard actor; adds metrics capture capability which can be turned on via Config Subsystem. 3. In remote-rpc-connector module, we can now pass configuration obtained from config subsystem to actor system so that its available to all actors. This obviates the need to manually pass the configuration via constructors or other *Constant or *Util classes. It brings all configuration items in the module at one place and makes it easier to move them to config subsystem, if its required. 4. In spirit of DRY, moves common code to clustering-commons 5. Minor code inspection fixes. 6. Makes mailbox-capacity configurable via config subsystem. Patch 9: Adds a new behaviour (MeteringBehavior.java). AbstractUntypedActorWithMetering and Shard actor exhibit this behavior current. This patch also refactors unified configuration (config subsystem + typesafe config) pieces. Note that in subsequent commits distributed-datastore will have its configuration added to actor system configuration. Also few more configuration items in remote-rpc-connector will go to config subsystem. I wanted to limit the amount of changes going into this already large commit. Change-Id: I383ec813c16ed09ed0e68ee59179f454c0d174cf Signed-off-by: Abhishek Kumar <abhishk2@cisco.com>