bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-971: update bk codahale stats provider version
Date Sat, 17 Dec 2016 01:43:40 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master 4bb57ef0b -> be99f024d


BOOKKEEPER-971: update bk codahale stats provider version

Update bk stats provider: from codahale to yammer.
Currently io.dropwizard.metrics 3.1.0 is used most widely. will change version to 3.1.0.

And change CodahaleMetricsProvider.getMetrics() to public, since this would be used outside
package.

And a small bug here:
```
            File outdir;
            if (Strings.isNullOrEmpty(prefix)) {  < === if (!)
                outdir = new File(csvDir, prefix);
            } else {
                outdir = new File(csvDir);
            }
```

Author: jiazhai <jia.zhai@emc.com>
Author: jiazhai <jiazhai@users.noreply.github.com>

Reviewers: Sijie Guo <sijie@apache.org>

Closes #83 from jiazhai/BOOKKEEPER-971


Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/be99f024
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/be99f024
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/be99f024

Branch: refs/heads/master
Commit: be99f024df5d53b3988f585ab46d6b604592acf1
Parents: 4bb57ef
Author: jiazhai <jia.zhai@emc.com>
Authored: Fri Dec 16 17:43:34 2016 -0800
Committer: Sijie Guo <sijie@apache.org>
Committed: Fri Dec 16 17:43:34 2016 -0800

----------------------------------------------------------------------
 .../codahale-metrics-provider/pom.xml               | 16 ++++++++++------
 .../bookkeeper/stats/CodahaleMetricsProvider.java   |  4 ++--
 2 files changed, 12 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/be99f024/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
----------------------------------------------------------------------
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml b/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
index f372458..5623e1c 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/pom.xml
@@ -38,20 +38,24 @@
       <artifactId>bookkeeper-stats-api</artifactId>
       <version>${project.parent.version}</version>
     </dependency>
+
+    <!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core -->
     <dependency>
-      <groupId>com.codahale.metrics</groupId>
+      <groupId>io.dropwizard.metrics</groupId>
       <artifactId>metrics-core</artifactId>
-      <version>3.0.1</version>
+      <version>3.1.0</version>
     </dependency>
+    <!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-jvm -->
     <dependency>
-      <groupId>com.codahale.metrics</groupId>
+      <groupId>io.dropwizard.metrics</groupId>
       <artifactId>metrics-jvm</artifactId>
-      <version>3.0.1</version>
+      <version>3.1.0</version>
     </dependency>
+    <!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-graphite -->
     <dependency>
-      <groupId>com.codahale.metrics</groupId>
+      <groupId>io.dropwizard.metrics</groupId>
       <artifactId>metrics-graphite</artifactId>
-      <version>3.0.1</version>
+      <version>3.1.0</version>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/be99f024/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
----------------------------------------------------------------------
diff --git a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
index a434b3c..934076f 100644
--- a/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
+++ b/bookkeeper-stats-providers/codahale-metrics-provider/src/main/java/org/apache/bookkeeper/stats/CodahaleMetricsProvider.java
@@ -62,7 +62,7 @@ public class CodahaleMetricsProvider implements StatsProvider {
         }
     }
 
-    synchronized MetricRegistry getMetrics() {
+    public synchronized MetricRegistry getMetrics() {
         return metrics;
     }
 
@@ -94,7 +94,7 @@ public class CodahaleMetricsProvider implements StatsProvider {
             // 2/ the output directory must exist
             // 3/ if output files already exist they are not overwritten and there is no
metrics output
             File outdir;
-            if (Strings.isNullOrEmpty(prefix)) {
+            if (!Strings.isNullOrEmpty(prefix)) {
                 outdir = new File(csvDir, prefix);
             } else {
                 outdir = new File(csvDir);


Mime
View raw message