Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Update website for java 11 #3462

Merged
merged 1 commit into from
Feb 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions website2/docs/compiling-code-organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ The primary programming languages for Heron are C++, Java, and Python.
[Topology Master](heron-architecture#topology-master), and
[Stream Manager](heron-architecture#stream-manager).

* **Java 8** is used primarily for Heron's [topology
* **Java 11** is used primarily for Heron's [topology
API](heron-topology-concepts), and [Heron Instance](heron-architecture#heron-instance).
It is currently the only language in which topologies can be written. Instructions can be found
in [Building Topologies](../../developers/java/topologies), while documentation for the Java
API can be found [here](/api/org/apache/heron/api/topology/package-summary.html). Please note that Heron topologies do not
require Java 8 and can be written in Java 7 or later.
API can be found [here](/api/org/apache/heron/api/topology/package-summary.html). Please note that Heron topologies do not require Java 11 and can be written in Java 7 or later.

* **Python 2** (specifically 2.7) is used primarily for Heron's [CLI interface](user-manuals-heron-cli) and UI components such as [Heron UI](user-manuals-heron-ui) and the [Heron Tracker](user-manuals-heron-tracker-runbook).

Expand Down
9 changes: 4 additions & 5 deletions website2/docs/compiling-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ RUN apt-get update && apt-get -y install \
wget
```

### Step 4 --- An installation script for Java 8 and a `JAVA_HOME` environment variable
### Step 4 --- An installation script for Java 11 and a `JAVA_HOME` environment variable

Here's an example:

Expand All @@ -178,11 +178,10 @@ RUN \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
apt-get update && \
apt-get install -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
apt-get install -y openjdk-11-jdk-headless && \
rm -rf /var/lib/apt/lists/*

ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
```

#### Step 5 - An installation script for [Bazel](http://bazel.io/) version {{% bazelVersion %}} or above.
Expand Down
48 changes: 10 additions & 38 deletions website2/docs/compiling-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ sidebar_label: Compiling on Linux

Heron can currently be built on the following Linux platforms:

* [Ubuntu 14.04](#building-on-ubuntu-14.04)
* [Ubuntu 14.04](#building-on-ubuntu-18.04)
* [CentOS 7](#building-on-centos-7)

## Building on Ubuntu 14.04

To build Heron on a fresh Ubuntu 14.04 installation:
To build Heron on a fresh Ubuntu 18.04 installation:

### Step 1 --- Update Ubuntu

Expand All @@ -50,19 +50,19 @@ export CC=/usr/bin/gcc
export CCX=/usr/bin/g++
```

### Step 4 --- Install JDK 8 and set JAVA_HOME
### Step 4 --- Install JDK 11 and set JAVA_HOME

```bash
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update -y
$ sudo apt-get install oracle-java8-installer -y
$ export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
$ sudo apt-get install openjdk-11-jdk-headless -y
$ export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
```

#### Step 5 - Install Bazel {{% bazelVersion %}}

```bash
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-installer-linux-x86_64.sh
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.26.0/bazel-0.26.0-installer-linux-x86_64.sh
chmod +x /tmp/bazel.sh
/tmp/bazel.sh --user
```
Expand Down Expand Up @@ -175,45 +175,17 @@ $ export CC=/usr/bin/gcc
$ export CCX=/usr/bin/g++
```

### Step 4 --- Install JDK 8
### Step 4 --- Install JDK 11

```bash
$ cd /opt/
$ sudo wget --no-cookies --no-check-certificate \
--header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz"
$ sudo tar xzf jdk-8u91-linux-x64.tar.gz
```

Use `alternatives` to configure the Java version:

```bash
$ sudo cd /opt/jdk1.8.0_91/
$ sudo alternatives --install /usr/bin/java java /opt/jdk1.8.0_91/bin/java 2
$ sudo alternatives --config java
```

Set the `javac` and `jar` commands:

```bash
$ sudo alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_91/bin/jar 2
$ sudo alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_91/bin/javac 2
$ sudo alternatives --set jar /opt/jdk1.8.0_91/bin/jar
$ sudo alternatives --set javac /opt/jdk1.8.0_91/bin/javac
```

Export Java-related environment variables:

```bash
export JAVA_HOME=/opt/jdk1.8.0_91
export JRE_HOME=/opt/jdk1.8.0_91/jre
export PATH=$PATH:/opt/jdk1.8.0_91/bin:/opt/jdk1.8.0_91/jre/bin
$ sudo yum install java-11-openjdk java-11-openjdk-devel
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
```

#### Step 5 - Install Bazel {{% bazelVersion %}}

```bash
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.23.2/bazel-0.23.2-installer-linux-x86_64.sh
wget -O /tmp/bazel.sh https://github.com/bazelbuild/bazel/releases/download/0.26.0/bazel-0.26.0-installer-linux-x86_64.sh
chmod +x /tmp/bazel.sh
/tmp/bazel.sh --user
```
Expand Down
4 changes: 2 additions & 2 deletions website2/docs/compiling-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ You must have the following installed to compile Heron:
* [Bazel](http://bazel.io/docs/install.html) = {{% bazelVersion %}}. Later
versions might work but have not been tested. See [Installing Bazel]({{< ref
"#installing-bazel" >}}) below.
* [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
* [Java 11](https://www.oracle.com/java/technologies/javase-jdk11-downloads.html)
is required by Bazel and Heron;
[topologies](../../../concepts/topologies) can be written in Java 7 or above
, but Heron jars are required to run with a Java 8 JRE.
, but Heron jars are required to run with a Java 11 JRE.
* [Autoconf](http://www.gnu.org/software/autoconf/autoconf.html) >=
2.6.3
* [Automake](https://www.gnu.org/software/automake/) >= 1.11.1
Expand Down
2 changes: 1 addition & 1 deletion website2/docs/heron-streamlet-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ config.setNumContainers(2);
new Runner("IntegerProcessingGraph", config, builder).run();
```

As you can see, the Java code for the example streamlet processing graph requires very little boilerplate and is heavily indebted to Java 8 [lambda](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html) patterns.
As you can see, the Java code for the example streamlet processing graph requires very little boilerplate and is heavily indebted to Java [lambda](https://docs.oracle.com/javase/tutorial/java/javaOO/lambdaexpressions.html) patterns.

## Streamlet operations

Expand Down
4 changes: 2 additions & 2 deletions website2/website/scripts/Dockerfile.ubuntu18.04
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ RUN apt-get update && apt-get -y install \
unzip \
git \
curl \
openjdk-8-jdk-headless \
openjdk-11-jdk-headless \
tree \
python-setuptools \
python-dev \
Expand All @@ -50,7 +50,7 @@ RUN curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -

RUN apt-get update && apt-get install -y nodejs

ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64

ARG UNAME
ARG UID
Expand Down