Skip to content

Conversation

@james-deee
Copy link
Contributor

@james-deee james-deee commented Aug 18, 2022

Issues: The current Samza Project does not support running in a Java 11 runtime environment. It will continue to build this project with Java 8, however.

Changes:

  1. Update the README to accurately reflect how this project now operates with Java 8 and Java 11.
  2. Changes some required things to the run-class to get it to run in a Java 11 environment.
  3. Adds a new samza-yarn3 and samza-shell-yarn3 project to support people wanting to run in Java 11 environments with the required Yarn version of 3.3.+ (which is when Yarn started supporting Java 11).
  4. Upgrades Gradle to V6, everything seems to work fine with the upgrade
  5. Various import changes moving to org.apache.commons.lang3

Tests:

  1. Ran all tests in this project using both Java 11 and Java 8.
  2. Locally published these changes and ran with the updated Hello Samza application with both Java 8 and Java 11 using Yarn 3.3.4 and the samza-yarn3 module.

API Changes: None

Upgrade Instructions: All current users of Samza should be able to continue using Samza as usual, there is nothing required for upgrading to this new version.

Usage Instructions: If you want to use Java 11, then you should make use of the samza-yarn3 and samza-shell-yarn3 modules. The following modules do NOT support Yarn 3:

  • samza-test
  • samza-hdfs
  • samza-yarn

@james-deee james-deee changed the title Get Samza to work with Java 11 (still works with Java 8) SAMZA-2757 : Make Samza Compatible with Java 11 Aug 19, 2022
@james-deee
Copy link
Contributor Author

@xinyuiscool Sorry to tag you, but I see you were the last one to merge something to this project. Would you be able to take a look at this PR, and the corresponding hello samza one? apache/samza-hello-samza#87

…james-deee/samza into jtd/get-samza-to-build-with-java11-real
Make changes for some failing issues in tests with Java 11
@james-deee james-deee closed this Sep 21, 2022
@james-deee james-deee reopened this Sep 21, 2022
james-deee and others added 3 commits September 21, 2022 10:37
Issues: Upgrade dependencies for security fixes and enhancements for jetty and jackson
In current dependencies there are security vulnerabilities
Jackson: https://security.snyk.io/package/maven/com.fasterxml.jackson.core:jackson-databind/2.12.2
Jetty: https://security.snyk.io/package/maven/org.eclipse.jetty:jetty-server/9.4.38.v20210224
Upgrade Jackson to version: 2.13.3
Upgrade Jetty to 9.4.48.v20220622
…pache#1627)

Issues:
Currently, StreamAppender is not extensible in terms of setting systemProducer and exposing sendEventToSystemProducer to child classes. It also makes it hard for child classes out of package to unit test any logic related to systemProducer

Changes: Make StreamAppender extensible
1. Change method sendEventToSystemProducer from private to protected
2. Change member variable systemProducer from private to protected
@james-deee james-deee force-pushed the jtd/get-samza-to-build-with-java11-real branch from 0d9bc04 to 8058a51 Compare September 21, 2022 15:38
Copy link
Contributor

@nickpan47 nickpan47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly lgtm. Please address the few minor comments. Thanks a lot!

@nickpan47 nickpan47 self-requested a review October 5, 2022 18:38
Copy link
Contributor

@nickpan47 nickpan47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding samza-shell-yarn3 module does not yield a tgz under samza-shell-yarn3/build/distribution directory. Please see my review comments.

build.gradle Outdated
task shellTarGz(type: Tar) {
compression = Compression.GZIP
classifier = 'dist'
from 'src/main/bash'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that this works? I pulled down the PR and built locally. Only found that the corresponding samza-shell-yarn3 build does not yield any tgz file as output in build/distribution, since there is no separate samza-shell-yarn3/src in the source repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the following change here and the build command successfully generates the samza-shell-yarn3 .tgz file:

`

  • from 'src/main/bash'
  • from 'src/main/resources'
  • from 'src/main/visualizer'
  • from(project(":samza-shell").file("./src/main/bash"))
  • from(project(":samza-shell").file("./src/main/resources"))
  • from(project(":samza-shell").file("./src/main/visualizer"))
    `

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh jeez. what a dummy i am. Should probably make sure the actual distribution get's build 🤦 .

Thanks! I updated it.

@james-deee james-deee changed the title SAMZA-2757 : Make Samza Compatible with Java 11 SAMZA-2757: Make Samza Compatible with Java 11 Oct 7, 2022
@nickpan47 nickpan47 self-requested a review October 8, 2022 04:58
Copy link
Contributor

@nickpan47 nickpan47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution!

@nickpan47 nickpan47 merged commit 5580bcf into apache:master Oct 10, 2022
ehoner pushed a commit to ehoner/samza that referenced this pull request Apr 11, 2023
Feature: Make Samza build artifacts runnable in JDK11

Changes:
   - introduced new build modules samza-yarn3 and samza-shell-yarn3 to build Samza w/ YARN 3.3.4, which is runtime compatible w/ JDK11


Tests:
   - local test and hello-samza succeeded with Java11
ehoner pushed a commit to ehoner/samza that referenced this pull request Apr 11, 2023
ehoner pushed a commit to ehoner/samza that referenced this pull request Apr 11, 2023
Feature: Make Samza build artifacts runnable in JDK11

Changes:
   - introduced new build modules samza-yarn3 and samza-shell-yarn3 to build Samza w/ YARN 3.3.4, which is runtime compatible w/ JDK11


Tests:
   - local test and hello-samza succeeded with Java11
ehoner pushed a commit to ehoner/samza that referenced this pull request Apr 11, 2023
This reverts commit 5580bcf.

RB=3722433
G=stream-processing-reviewers
A=xiliu,alazhang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants