Skip to content

linkernetworks/linkerProcessorSample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linkerProcessorSample Intro

Build Status

A sample code for processing infomation from Kafka and store to Cassandra using Apache Spark

Tag introductions

###tag v0.1 realizations: 2. collect info from kafka topic 3. calculate cpu total usage as well as each cpu usage 4. save cpu usage to cassandra 5. test successfully on Mesos cluster with Spark client mode

###tag v0.2

  1. the same as v0.1
  2. calculate cpu_all usage

###tag v0.3

  1. the same as v0.1
  2. realize calculating muli-machine cpu usage
  3. build spark driver image and executor image for Mesos Cluster

Usage

Prerequisite

First, you should set up zookeeper, cassandra and kafka broker. Then create kafka topic and cassandra keyspace

Second:

  1. download Apache Spark
  2. run linkerConnector
  3. git clone linkerProcessSample(https://github.com/adolphlwq/linkerProcessorSample.git)

submit code to Spark

Please refer Here for detail

Reference

TODOs

  • collect info from kafka
  • save processes info to cassandra
  • save machine info to cassandra
  • save kafka message to cassandra directly
  • overall cpu usage from linkerConnector (via Kafka)
    • calculate cpu usage and save to cassandra
    • calculate cpu usage from multi machine
  • Mesos agent usage from linkerConnector (via Kafka)
  • build Mesos Spark executor docker image for testing code on Mesos cluster
  • research Spark streaming's "window" and improve code