REST service for Mozilla Metrics. This is an experiment of what a Scala based replacement for Bagheera might look like; using Finagle for the service framework rather than using Netty directly. Check the links below and read more about these projects before proceeding.
This code is built with the following assumptions. You may get mixed results if you deviate from these versions.
To make a jar you can do:
The jar file is then located under target.
Running an instance
Make sure your Kafka and Zookeeper servers are running first (see Kafka documentation)
In order to run baloo on another machine you will probably want to use the dist assembly like so:
The zip file now under the target directory should be deployed to BALOO_HOME on the remote server.
To run Baloo you can use bin/baloo or copy the init.d script by the same name from bin/init.d to /etc/init.d. The init script assumes an installation of baloo at /usr/lib/baloo, but this can be modified by changing the BALOO_HOME variable near the top of that script. Here is an example of using the regular baloo script:
REST Request Format
Baloo takes POST data on /namespace/id. The service sends every entry for a particular namespace to a Kafka topic. There it waits to be picked up by a consumer for further processing and/or more permanent persistence.
Here's a quick rundown of HTTP return codes that Baloo could send back (this isn't comprehensive but rather the most common ones):
- 201 Created - returned if everything was submitted successfully (default)
- 406 Not Acceptable - returned if the POST failed validation in some manner
- 500 Server Error - something went horribly wrong and you should check the logs
All aspects of this software are distributed under Apache Software License 2.0. See LICENSE file for full license text.
- Xavier Stevens (@xstevens)