Nemo Runtime Master

The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users.

License

License

GroupId

GroupId

org.apache.nemo
ArtifactId

ArtifactId

nemo-runtime-master
Last Version

Last Version

0.3
Release Date

Release Date

Type

Type

jar
Description

Description

Nemo Runtime Master
The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users.
Project Organization

Project Organization

The Apache Software Foundation

Download nemo-runtime-master

How to add to project

<!-- https://jarcasting.com/artifacts/org.apache.nemo/nemo-runtime-master/ -->
<dependency>
    <groupId>org.apache.nemo</groupId>
    <artifactId>nemo-runtime-master</artifactId>
    <version>0.3</version>
</dependency>
// https://jarcasting.com/artifacts/org.apache.nemo/nemo-runtime-master/
implementation 'org.apache.nemo:nemo-runtime-master:0.3'
// https://jarcasting.com/artifacts/org.apache.nemo/nemo-runtime-master/
implementation ("org.apache.nemo:nemo-runtime-master:0.3")
'org.apache.nemo:nemo-runtime-master:jar:0.3'
<dependency org="org.apache.nemo" name="nemo-runtime-master" rev="0.3">
  <artifact name="nemo-runtime-master" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.apache.nemo', module='nemo-runtime-master', version='0.3')
)
libraryDependencies += "org.apache.nemo" % "nemo-runtime-master" % "0.3"
[org.apache.nemo/nemo-runtime-master "0.3"]

Dependencies

compile (12)

Group / Artifact Type Version
org.apache.nemo : nemo-common jar 0.3
org.apache.nemo : nemo-runtime-common jar 0.3
org.apache.nemo : nemo-runtime-test jar 0.3
org.eclipse.jetty : jetty-server jar 9.4.10.v20180503
org.eclipse.jetty : jetty-servlet jar 9.4.10.v20180503
org.eclipse.jetty.websocket : websocket-api jar 9.4.10.v20180503
org.eclipse.jetty.websocket : websocket-server jar 9.4.10.v20180503
com.fasterxml.jackson.core : jackson-core jar 2.10.2
com.fasterxml.jackson.core : jackson-databind jar 2.10.2
org.xerial : sqlite-jdbc jar 3.30.1
com.google.protobuf : protobuf-java jar 2.5.0
org.xerial.snappy : snappy-java jar 1.1.1.3

test (5)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.6.2
junit : junit jar 4.13
org.mockito : mockito-core jar 3.2.4
org.powermock : powermock-module-junit4 jar 2.0.4
org.powermock : powermock-api-mockito2 jar 2.0.4

Project Modules

There are no modules declared in this project.

Nemo

Build Status Quality Gate Status

A Data Processing System for Flexible Employment With Different Deployment Characteristics.

Online Documentation

Details about Nemo and its development can be found in:

Please refer to the Contribution guideline to contribute to our project.

Nemo prerequisites and setup

Prerequisites

  • Java 8 or later (tested on Java 8 and Java 11)
  • Maven
  • YARN settings
  • Protobuf 2.5.0
    • On Ubuntu 14.04 LTS and its point releases:

      $ sudo apt-get install protobuf-compiler
    • On Ubuntu 16.04 LTS and its point releases:

      $ sudo add-apt-repository ppa:snuspl/protobuf-250
      $ sudo apt update
      $ sudo apt install protobuf-compiler=2.5.0-9xenial1
    • On macOS:

      $ wget https://github.com/google/protobuf/releases/download/v2.5.0/protobuf-2.5.0.tar.bz2
      $ tar xvf protobuf-2.5.0.tar.bz2
      $ pushd protobuf-2.5.0
      $ ./configure CC=clang CXX=clang++ CXXFLAGS='-std=c++11 -stdlib=libc++ -O3 -g' LDFLAGS='-stdlib=libc++' LIBS="-lc++ -lc++abi"
      $ make -j 4
      $ sudo make install
      $ popd
    • Or build from source:

    • To check for a successful installation of version 2.5.0, run $ protoc --version

Installing Nemo

  • Run all tests and install: $ mvn clean install -T 2C
  • Run only unit tests and install: $ mvn clean install -DskipITs -T 2C

Running Beam applications

Apache Nemo is an official runner of Apache Beam, and it can be executed from Beam, using NemoRunner, as well as directly from the Nemo project. The details of using NemoRunner from Beam is shown on the NemoRunner page of the Apache Beam website. Below describes how Beam applications can be run directly on Nemo.

Configurable options

  • -job_id: ID of the Beam job
  • -user_main: Canonical name of the Beam application
  • -user_args: Arguments that the Beam application accepts
  • -optimization_policy: Canonical name of the optimization policy to apply to a job DAG in Nemo Compiler
  • -deploy_mode: yarn is supported(default value is local)

Examples

## WordCount example from the Beam website (Count words from a document)
$ ./bin/run_beam.sh \
    -job_id beam_wordcount \
    -optimization_policy org.apache.nemo.compiler.optimizer.policy.DefaultPolicy \
    -user_main org.apache.nemo.examples.beam.BeamWordCount \
    -user_args "--runner=NemoRunner --inputFile=`pwd`/examples/resources/inputs/test_input_wordcount --output=`pwd`/outputs/wordcount"
$ less `pwd`/outputs/wordcount*

## MapReduce WordCount example (Count words from the Wikipedia dataset)
$ ./bin/run_beam.sh \
    -job_id mr_default \
    -executor_json `pwd`/examples/resources/executors/beam_test_executor_resources.json \
    -optimization_policy org.apache.nemo.compiler.optimizer.policy.DefaultPolicy \
    -user_main org.apache.nemo.examples.beam.WordCount \
    -user_args "`pwd`/examples/resources/inputs/test_input_wordcount `pwd`/outputs/wordcount"
$ less `pwd`/outputs/wordcount*

## YARN cluster example
$ ./bin/run_beam.sh \
    -deploy_mode yarn \
    -job_id mr_transient \
    -executor_json `pwd`/examples/resources/executors/beam_test_executor_resources.json \
    -user_main org.apache.nemo.examples.beam.WordCount \
    -optimization_policy org.apache.nemo.compiler.optimizer.policy.TransientResourcePolicy \
    -user_args "hdfs://v-m:9000/test_input_wordcount hdfs://v-m:9000/test_output_wordcount"

## NEXMark streaming Q0 (query0) example
$ ./bin/run_nexmark.sh \
    -job_id nexmark-Q0 \
    -executor_json `pwd`/examples/resources/executors/beam_test_executor_resources.json \
    -user_main org.apache.beam.sdk.nexmark.Main \
    -optimization_policy org.apache.nemo.compiler.optimizer.policy.StreamingPolicy \
    -scheduler_impl_class_name org.apache.nemo.runtime.master.scheduler.StreamingScheduler \
    -user_args "--runner=NemoRunner --streaming=true --query=0 --numEventGenerators=1"

Resource Configuration

-executor_json command line option can be used to provide a path to the JSON file that describes resource configuration for executors. Its default value is config/default.json, which initializes one of each Transient, Reserved, and Compute executor, each of which has one core and 1024MB memory.

Configurable options

  • num (optional): Number of containers. Default value is 1
  • type: Three container types are supported:
    • Transient : Containers that store eviction-prone resources. When batch jobs use idle resources in Transient containers, they can be arbitrarily evicted when latency-critical jobs attempt to use the resources.
    • Reserved : Containers that store eviction-free resources. Reserved containers are used to reliably store intermediate data which have high eviction cost.
    • Compute : Containers that are mainly used for computation.
  • memory_mb: Memory size in MB
  • capacity: Number of Tasks that can be run in an executor. Set this value to be the same as the number of CPU cores of the container.

Examples

[
  {
    "num": 12,
    "type": "Transient",
    "memory_mb": 1024,
    "capacity": 4
  },
  {
    "type": "Reserved",
    "memory_mb": 1024,
    "capacity": 2
  }
]

This example configuration specifies

  • 12 transient containers with 4 cores and 1024MB memory each
  • 1 reserved container with 2 cores and 1024MB memory

Monitoring your job using Web UI

Please refer to the instructions at web-ui/README.md to run the frontend.

Visualizing metric on run-time

While Nemo driver is alive, it can post runtime metrics through websocket. At your frontend, add websocket endpoint

ws://<DRIVER>:10101/api/websocket

where <DRIVER> is the hostname that Nemo driver runs.

OR, you can directly run the WebUI on the driver using bin/run_webserver.sh, where it looks for the websocket on its local machine, which, by default, provides the address at

http://<DRIVER>:3333

Post-job analysis

On job completion, the Nemo driver creates metric.json at the directory specified by -dag_dir option. At your frontend, add the JSON file to do post-job analysis.

Other JSON files are for legacy Web UI, hosted here. It uses Graphviz to visualize IR DAGs and execution plans.

Examples

$ ./bin/run_beam.sh \
    -job_id als \
    -executor_json `pwd`/examples/resources/executors/beam_test_executor_resources.json \
    -user_main org.apache.nemo.examples.beam.AlternatingLeastSquare \
    -optimization_policy org.apache.nemo.compiler.optimizer.policy.TransientResourcePolicy \
    -dag_dir "./dag/als" \
    -user_args "`pwd`/examples/resources/inputs/test_input_als 10 3"

Options for writing metric results to databases.

  • -db_enabled: Whether or not to turn on the DB (true or false).
  • -db_address: Address of the DB. (ex. PostgreSQL DB starts with jdbc:postgresql://...)
  • -db_id : ID of the DB from the given address.
  • -db_password: Credentials for the DB from the given address.

Speeding up builds

  • To exclude Spark related packages: mvn clean install -T 2C -DskipTests -pl \!compiler/frontend/spark,\!examples/spark
  • To exclude Beam related packages: mvn clean install -T 2C -DskipTests -pl \!compiler/frontend/beam,\!examples/beam
  • To exclude NEXMark related packages: mvn clean install -T 2C -DskipTests -pl \!examples/nexmark
org.apache.nemo

The Apache Software Foundation

Versions

Version
0.3
0.1