Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

learning+website: add FlattenWith and Tee to Playground and Transform Catalog [WIP] #32945

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

mohamedawnallah
Copy link
Contributor

@mohamedawnallah mohamedawnallah commented Oct 25, 2024

Description

Python SDK

  • Add FlattenWith to Playground
  • Add FlattenWith to Transform Catalog
  • Add Tee to Playground
  • Add Tee to Transform Catalog

Java SDK

  • Add FlattenWith to Playground
  • Add FlattenWith to Transform Catalog
  • Add Tee to Playground
  • Add Tee to Transform Catalog

Fixes #32840


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@mohamedawnallah mohamedawnallah changed the title learning+website: add FlattenWith to Playground and Transform Catalog learning+website: add FlattenWith and Tee to Playground and Transform Catalog Oct 25, 2024
@mohamedawnallah mohamedawnallah changed the title learning+website: add FlattenWith and Tee to Playground and Transform Catalog learning+website: add FlattenWith and Tee to Playground and Transform Catalog [WIP] Oct 25, 2024
@mohamedawnallah
Copy link
Contributor Author

mohamedawnallah commented Oct 25, 2024

Hi @liferoad and @robertwb,

Is there a convenient way to resolve the following java dependency issues that I'm encountering? 🙏

I'm new to Java development and have recently worked with the FlattenWith feature introduced in Apache Beam 2.61.0. However, the current katas learning Java code uses Apache Beam 2.38.0 (link to the code). To align the versions, I compiled a JAR file for Apache Beam Java core from source using gradle build. The following files were generated in build/libs:

beam-sdks-java-core-2.61.0-SNAPSHOT-tests-unshaded.jar
beam-sdks-java-core-2.61.0-SNAPSHOT-tests.jar
beam-sdks-java-core-2.61.0-SNAPSHOT-unshaded.jar
beam-sdks-java-core-2.61.0-SNAPSHOT.jar

Next, I copied beam-sdks-java-core-2.61.0-SNAPSHOT-unshaded.jar into the katas learning Java modules in IntelliJ, and it recognized the FlattenWith operations. However, when I tried to run it, I encountered dependency issues, specifically:

Caused by: java.lang.ClassNotFoundException: org.apache.beam.vendor.guava.v32_1_2_jre.com.google.common.collect.SortedSetMultimap

I’ve found myself in dependency hell and am unsure if this is the right approach. Any help you can provide would be greatly appreciated! Thank you!

@robertwb
Copy link
Contributor

Thanks for doing this!

You probably need to update guava (and the other files) to the versions Beam uses, which can be found at https://github.com/apache/beam/blob/release-2.60.0/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy#L616

I'm not sure how to depend on a pre-release version of beam (other than copying java files as you did for testing). That's a downside for having this be in a separate repository.

@robertwb
Copy link
Contributor

robertwb commented Dec 6, 2024

Perhaps this'll be easier now that this is in the official release.

@mohamedawnallah
Copy link
Contributor Author

Hi @robertwb,

Apologies for the delayed response to this PR. I've been finishing up my current internship but will address the feedback over the weekend. 🙏

@mohamedawnallah mohamedawnallah force-pushed the addFlattenWithAndTeeToPlaygroundAndCatalog branch 2 times, most recently from 10f492b to bcd038f Compare December 10, 2024 22:08
@github-actions github-actions bot added the java label Dec 10, 2024
@mohamedawnallah mohamedawnallah force-pushed the addFlattenWithAndTeeToPlaygroundAndCatalog branch 2 times, most recently from 38eefce to 292aeff Compare December 10, 2024 23:21
@mohamedawnallah mohamedawnallah force-pushed the addFlattenWithAndTeeToPlaygroundAndCatalog branch from 292aeff to 6f9a184 Compare December 11, 2024 01:59
@mohamedawnallah
Copy link
Contributor Author

Hi @robertwb, I think the PR is now ready for review. I would love to receive any feedback! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add examples of FlattenWith and Tee to the playground and transform catalog.
2 participants