Page tree
Skip to end of metadata
Go to start of metadata


You have compiled REEF locally and set the JAVA_HOME environment variable.

Running your first REEF program: Hello, REEF! (Java)

The module REEF Examples in the folder reef-examples contains several simple programs built on REEF to help you get started with development. As always, the simplest of those is our "Hello World": Hello REEF. Upon launch, it grabs a single Evaluator and submits a single Task to it. That Actvity, fittingly, prints 'Hello REEF!' to stdout. To launch it, navigate to REEF_HOME and use the following command (put the correct number of your REEF version in {$REEF_VERSION}:


This invokes the shaded jar within the target directory and launches HelloREEF on the local runtime of REEF. During the run, you will see something similar to this output:


Where's the output?

The local runtime simulates a cluster of machines: It executes each Evaluator in a separate process on your machine. Hence, the Evaluator that printed "Hello, REEF" is not executed in the same process as the program you launched above. So, how do you get to the output of the Evaluator? The local runtime creates one folder per job it executes in REEF_LOCAL_RUNTIME:


The job folder names are comprised of the job's name (here, HelloREEF) and the time stamp of its submission (here, 1444603999205). If you submit the same job multiple times, you will get multiple folders here. Let's move on:


Inside of the job's folder, you will find one folder for the job's Driver (named driver) and one per Evaluator. Their name comprises of the virtual node simulated by the local runtime (here, Node-2) followed by the time stamp of when this Evaluator was allocated on that node, here 1444604000469. As the HelloREEF example program only allocated one Evaluator, we only see one of these folders here. Let's peek inside:


evaluator.stderr contains the output on stderr of this Evaluator, which mostly consists of logs helpful in debugging. evaluator.stdout contains the output on stdout. And, sure enough, this is where you find the "Hello, REEF!" message.



  • No labels