Added more metrics to Flume IgniteSink.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/6045a246 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/6045a246 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/6045a246 Branch: refs/heads/ignite-comm-balance-master Commit: 6045a2469a4d2e23cad918b44e002c7de237abcb Parents: e304b48 Author: shroman <rsht...@yahoo.com> Authored: Sat Jan 14 21:14:34 2017 +0900 Committer: shroman <rsht...@yahoo.com> Committed: Sat Jan 14 21:14:34 2017 +0900 ---------------------------------------------------------------------- .../main/java/org/apache/ignite/stream/flume/IgniteSink.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/6045a246/modules/flume/src/main/java/org/apache/ignite/stream/flume/IgniteSink.java ---------------------------------------------------------------------- diff --git a/modules/flume/src/main/java/org/apache/ignite/stream/flume/IgniteSink.java b/modules/flume/src/main/java/org/apache/ignite/stream/flume/IgniteSink.java index e6e7e90..083e833 100644 --- a/modules/flume/src/main/java/org/apache/ignite/stream/flume/IgniteSink.java +++ b/modules/flume/src/main/java/org/apache/ignite/stream/flume/IgniteSink.java @@ -85,7 +85,7 @@ public class IgniteSink extends AbstractSink implements Configurable { } /** - * Starts a grid and initializes na event transformer. + * Starts a grid and initializes an event transformer. */ @SuppressWarnings("unchecked") @Override synchronized public void start() { @@ -109,9 +109,13 @@ public class IgniteSink extends AbstractSink implements Configurable { catch (Exception e) { log.error("Failed to start grid", e); + sinkCounter.incrementConnectionFailedCount(); + throw new FlumeException("Failed to start grid", e); } + sinkCounter.incrementConnectionCreatedCount(); + super.start(); } @@ -122,6 +126,7 @@ public class IgniteSink extends AbstractSink implements Configurable { if (ignite != null) ignite.close(); + sinkCounter.incrementConnectionClosedCount(); sinkCounter.stop(); super.stop();