A platform for streaming software analytics
The project is build with SBT. To install SBT, do:
- Mac:
brew install sbt - Debian/Ubuntu:
apt-get install sbt
Run sbt. Then at the SBT console:
compileto compilerunto run the default classtestto run the testscleanto cleanscalafmtto format according to project guidelinesscalafmt::testto check if format according to project guidelines
Install the latest IntelliJ. Go to the IntelliJ preferences and install the Scala plugin. Then
- File -> New -> Project with existing sources from within IntelliJ or "Import project" from the IntelliJ splash screen
- Select the top level checkout directory for CodeFeedr.
- On the dialog that appears, select "SBT"
- Click Next and then Finish
- From the "SBT Projet Data To Import", select all modules
In order to run your application from within IntelliJ, you have to select the classpath of the 'mainRunner' module in the run/debug configurations. Simply open 'Run -> Edit configurations...' and then select 'mainRunner' from the "Use classpath of module" dropbox.
It is recommended to install the scalafmt plugin and turn on the 'Format on file save option' in the
IntelliJ preferences panel.
- MongoDB
- Kafka
The project consists of the following modules:
Consists of the engine that composes Flink topologies, and links them together over kafka. Also contains in
Engine.QueryQuery operatorsinputFor now, plugin inputs. Should be refactored.LibraryTODO: RefactoringLibrary.InternalTODO: Refactoring
Contains data objects used by the engine. This module is published to the Flink cluster along with the jobs.
Contains data objects used by the integration tests, that also need to be published to the Flink cluster. In the future maybe refactor this to an "Integration Test" plugin. For now the plugin architecture is not finished yet.
- Install docker-compose: https://docs.docker.com/compose/install/ (Docker with virtual box should come with docker-compose installed, so only relevant for linux)
- Open the docker console the root folder of the project
cd experiments/Shared/docker-compose up
- Install docker-compose: https://docs.docker.com/compose/install/ (Docker with virtual box should come with docker-compose installed, so only relevant for linux)
- Open the docker console the root folder of the project
docker-compose -f "containers/kafka/docker-compose.yml" up -dto start the clusterdocker-compose -f "containers/kafka/docker-compose.yml" stopto stop the cluster- If needed increase the memory available to the docker vm. See https://forums.docker.com/t/change-vm-specs-storage-base-on-windows-7/16584/2 for windows.
- To host kafka/zookeeper on different ips, change the docker-compose.yml and reference.conf files.
- Further docker-compose image instructions can be found at https://github.com/wurstmeister/kafka-docker
docker run --name flink -p 8081:8081 -p 6123:6123 --rm -d flink localTo run a local cluster in docker. See https://hub.docker.com/_/flink/ for documentationdocker stop flinkto stop and remove the container again- Use
docker-machine ip defaultto obtain the IP of the docker machine. Place this IP in resources/reference.config for the flink cluster.
docker network create --subnet=192.168.99.0/24 codefeednetTo create a subnet for the container to run in. (Skip this step if already performed for running kafka in docker)docker run --net codefeednet --ip 192.168.99.100 --name flink -p 8081:8081 -p 6123:6123 --rm flink localTo run a local cluster in docker. See https://hub.docker.com/_/flink/ for documentationdocker stop flinkto stop and remove the container again