Giter VIP home page Giter VIP logo

spark-hawkular-demo's Introduction

spark-hawkular-demo

Build Status

Assumptions

This application assumes that the Cassandra is up and running on localhost and listening on default ports. Also that the hawkular-services was run together with the agent that was collecting some metrics and stored them into Cassandra.

Running

./sbt run

What it does

It's a simple application written in Scala that shows how to connect to the Cassandra and do some data analysis. It reads the metric data from the SST table called data in the hawkular_metrics keyspace. It creates two RDDs from the table naively by filtering the rows based on the metric id and feed id.

In my environment the RDDs contained ~3000 measurements. The first RDD represents the data points for the "Total Memory" metric (a constant value) and the second one the "Available Memory". Based on those two RDDs the third one is calculated by zipping the datapoints into tupples and substracting the second one from the first one, this will intuitively create the used memory RDD.

Then for the demonstration purposes the correlation (Pearson's r) between used memory and available memory is calculated. No surprises here, the result is the total negative correlation -0.99999....

Last step is running another method from the MLlib package that does the clustering on the data. We say to the learning algorithm that we want to end up with three clusters and run the training.

spark-hawkular-demo's People

Contributors

jkremser avatar

Stargazers

 avatar

Watchers

 avatar

spark-hawkular-demo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.