Twister2

Twister2

  • Getting Started
  • Docs
  • Tutorial
  • AI
  • Examples
  • Contribute
  • Download
  • Configurations
  • Java Docs
  • GitHub
  • Blog

›Compiling

Compiling

  • Overview
  • Linux
  • MacOS
  • Maven Artifacts

App Development

  • API Overview
  • Developing Applications
  • Streaming Jobs
  • Batch Jobs

APIs

  • Worker API
  • Data API
  • Compute API
  • Operator API
  • Windowing API
  • Storm API
  • Apache Beam
  • Python API

Deployment

  • Job Submit
  • Standalone
  • Docker
  • Kubernetes
  • Minikube
  • Mesos
  • Nomad
  • Slurm
  • Dashboard
  • Logging
  • Configurations

Concepts

  • Overview
  • Architecture
  • Operators
  • Task System
  • Data Access

Resources

  • Publications

MacOS

Prerequisites

Twister2 build needs several software installed on your system.

  1. Operating System

    • Twister2 is tested and known to work on,
      • MacOS High Sierra (10.13.6)
  2. Java

    • Download Oracle JDK 8 from http://www.oracle.com/technetwork/java/javase/downloads/index.html

    • Install Oracle JDK 8 using jdk-8uxxx-macosx-x64.dmg

    • Set the following environment variables.

      JAVA_HOME=$(/usr/libexec/java_home)
      export JAVA_HOME
      

You can check weather Java is installed correctly

which java
  1. Install Homebrew
   /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  1. Installing maven :
  brew install maven
  1. Install bazel 1.1.0

       wget https://github.com/bazelbuild/bazel/releases/download/1.1.0/bazel-1.1.0-installer-darwin-x86_64.sh
       chmod +x bazel-1.1.0-installer-darwin-x86_64.sh
       ./bazel-1.1.0-installer-darwin-x86_64.sh --user
    

    Make sure to add the bazel bin to PATH. You can add the following line to ~/.bash_profile file.

    export PATH="$PATH:$HOME/bin"
    

Now you check with the following command to check weather bazel is install.

souce ~/.bash_profile 

bazel version

It will give the following output

Build label: 1.1.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 19 15:19:51 2019 (1563549591)
Build timestamp: 1563549591
Build timestamp as int: 1563549591
  1. Install python3
brew install python3

Make sure python3 is installed

python3 --version

Okay now you are ready to compile Twister2.

Compiling Twister2

Now lets get a clone of the source code.

git clone https://github.com/DSC-SPIDAL/twister2.git

You can compile the Twister2 distribution by using the bazel target as below.

cd twister2
bazel build --config=darwin scripts/package:tarpkgs --action_env=JAVA_HOME

This will build twister2 distribution in the file

bazel-bin/scripts/package/twister2-0.4.0.tar.gz

If you would like to compile the twister2 without building the distribution packages use the command

bazel build --config=darwin twister2/... --action_env=JAVA_HOME

For compiling a specific target such as communications

bazel build --config=darwin twister2/comms/src/java:comms-java --action_env=JAVA_HOME

Twister2 Distribution

After you've build the Twister2 distribution, you can extract it and use it to submit jobs.

cd bazel-bin/scripts/package/
tar -xvf twister2-0.4.0.tar.gz
← LinuxMaven Artifacts →
  • Prerequisites
  • Compiling Twister2
  • Twister2 Distribution
Twister2
Docs
Getting Started (Quickstart)Guides (Programming Guides)
Community
Stack OverflowProject Chat
More
BlogGitHubStar
Copyright © 2020 Indiana University