It turns out that I am not able to run any transformations in my pipeline presumably because Cloud Dataflow currently runs only Java 7. All my pre-existing code that runs in my pipeline relies on Java 8 (can only be built with the Java 8 compiler). Is there any way around it? I saw the Java 7 restriction clearly stated here: https://cloud.google.com/dataflow/faq, but I'm hoping there's some hacky way I could get around it.
Asked
Active
Viewed 413 times
1
-
possible duplicate of [Can Java 8 code be compiled to run on Java 7 jvm?](http://stackoverflow.com/questions/16143684/can-java-8-code-be-compiled-to-run-on-java-7-jvm) – M.P. Korstanje Feb 01 '15 at 20:26
-
No. While Java 8 uses the same byte codes as Java 7 the verifier will puke because there are different structures (e.g. interfaces having methods). – M.P. Korstanje Feb 01 '15 at 20:27
-
1That said. You might have some luck rewriting to Java 7 using Guava libraries. It has filters, transformations for collections and function composition. They can act as really poor substitute for map-reduce and functional programming. – M.P. Korstanje Feb 01 '15 at 20:32
3 Answers
4
Google Cloud Dataflow now supports the Java 8 runtime: https://cloud.google.com/dataflow/release-notes/service
Happy hacking!

rf-
- 1,443
- 10
- 15
2
Java 8 support is on our roadmap, we will update this thread as soon as we have more information.

Tudor Marian
- 239
- 1
- 4
0
Apache beam is working with Java8 Documentation for reference : https://beam.apache.org/documentation/sdks/java/ https://beam.apache.org/documentation/sdks/java/euphoria/

Sneha Mule
- 641
- 8
- 6