Apache Spark Integration for Metrics

A java custom receiver for Apache Spark Streaming which reads a stream of measurements from an application using the library Metrics of Dropwizard.

License

License

Categories

Categories

Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

fr.ippon.spark.metrics
ArtifactId

ArtifactId

metrics-spark-receiver
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

Apache Spark Integration for Metrics
A java custom receiver for Apache Spark Streaming which reads a stream of measurements from an application using the library Metrics of Dropwizard.
Project URL

Project URL

https://github.com/ippontech/metrics-spark-receiver
Source Code Management

Source Code Management

https://github.com/ippontech/metrics-spark-receiver

Download metrics-spark-receiver

How to add to project

<!-- https://jarcasting.com/artifacts/fr.ippon.spark.metrics/metrics-spark-receiver/ -->
<dependency>
    <groupId>fr.ippon.spark.metrics</groupId>
    <artifactId>metrics-spark-receiver</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/fr.ippon.spark.metrics/metrics-spark-receiver/
implementation 'fr.ippon.spark.metrics:metrics-spark-receiver:1.1'
// https://jarcasting.com/artifacts/fr.ippon.spark.metrics/metrics-spark-receiver/
implementation ("fr.ippon.spark.metrics:metrics-spark-receiver:1.1")
'fr.ippon.spark.metrics:metrics-spark-receiver:jar:1.1'
<dependency org="fr.ippon.spark.metrics" name="metrics-spark-receiver" rev="1.1">
  <artifact name="metrics-spark-receiver" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.ippon.spark.metrics', module='metrics-spark-receiver', version='1.1')
)
libraryDependencies += "fr.ippon.spark.metrics" % "metrics-spark-receiver" % "1.1"
[fr.ippon.spark.metrics/metrics-spark-receiver "1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.spark : spark-core_2.11 jar 1.2.0
org.apache.spark : spark-streaming_2.11 jar 1.2.0
com.fasterxml.jackson.core : jackson-databind jar 2.4.4

Project Modules

There are no modules declared in this project.

metrics-spark-receiver

Apache Spark Streaming receiver for metrics-spark-reporter

A java custom receiver of Apache Spark Streaming for the repo [metrics-spark-reporter] (https://github.com/ippontech/metrics-spark-reporter).

Configuration

In order to receive some metrics in your Spark application, you need to add the dependency :

<dependency>
  <groupId>fr.ippon.spark.metrics</groupId>
  <artifactId>metrics-spark-receiver</artifactId>
  <version>1.1</version>
</dependency>

Then you can read the stream of metrics by using the method JavaStreamingContext.receiverStream() with the custom receiver created :

ssc.receiverStream(new MetricsReceiver(9999));

Test

There is two ways to test this Receiver :

A [JHipster] (http://jhipster.github.io/) app is available in the [metrics-spark-reporter] (https://github.com/ippontech/metrics-spark-reporter) repo which report to the metrics-spark app.

Send data by launching the JHipster sample with the Maven command :

$ mvn spring-boot:run

Display metrics received by launching one of those two classes of metrics-spark :

  • MetricsToConsole to display data in the console.
  • MetricsToES to send data to an ElasticSearch server via Spark in order to use Kibana.
fr.ippon.spark.metrics

Ippon Technologies

We deliver great apps with Java and Agile expertise

Versions

Version
1.1