Repository: bookkeeper Updated Branches: refs/heads/branch-4.3 669a91054 -> b93ff769b
BOOKKEEPER-805: NullPointException in bookie server when using twitter-ostrich-provider (Youngjoon Kim via sijie) Project: http://git-wip-us.apache.org/repos/asf/bookkeeper/repo Commit: http://git-wip-us.apache.org/repos/asf/bookkeeper/commit/b93ff769 Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/b93ff769 Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/b93ff769 Branch: refs/heads/branch-4.3 Commit: b93ff769bf1df352e3faf1ea7b7f7a68d695f32c Parents: 669a910 Author: Sijie Guo <[email protected]> Authored: Fri Dec 5 21:59:46 2014 -0800 Committer: Sijie Guo <[email protected]> Committed: Fri Dec 5 21:59:46 2014 -0800 ---------------------------------------------------------------------- .../bookkeeper/stats/twitter/ostrich/OstrichProvider.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/b93ff769/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java ---------------------------------------------------------------------- diff --git a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java index 62246cf..35f1cd0 100644 --- a/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java +++ b/bookkeeper-stats-providers/twitter-ostrich-provider/src/main/java/org/apache/bookkeeper/stats/twitter/ostrich/OstrichProvider.java @@ -18,6 +18,7 @@ package org.apache.bookkeeper.stats.twitter.ostrich; import com.twitter.ostrich.admin.CustomHttpHandler; import com.twitter.ostrich.admin.RuntimeEnvironment; +import com.twitter.ostrich.admin.StatsFactory; import com.twitter.util.Duration; import org.apache.bookkeeper.stats.StatsLogger; import org.apache.bookkeeper.stats.StatsProvider; @@ -28,6 +29,7 @@ import scala.collection.immutable.List; import scala.collection.immutable.List$; import scala.collection.immutable.Map; import scala.collection.immutable.Map$; +import scala.util.matching.Regex; import java.util.concurrent.TimeUnit; @@ -55,13 +57,10 @@ public class OstrichProvider implements StatsProvider { public void start(Configuration conf) { if (conf.getBoolean(STATS_EXPORT, false)) { statsExporter = new com.twitter.ostrich.admin.AdminServiceFactory( - conf.getInt(STATS_HTTP_PORT, 9002), 20, null, Some.apply(""), null, + conf.getInt(STATS_HTTP_PORT, 9002), 20, List$.MODULE$.<StatsFactory>empty(), Some.apply(""), List$.MODULE$.<Regex>empty(), OstrichProvider.<String, CustomHttpHandler>emptyMap(), list(Duration.apply(1, TimeUnit.MINUTES)) ).apply(RuntimeEnvironment.apply(this, new String[0])); } - if (null != statsExporter) { - statsExporter.start(); - } } @Override
