'Java version compatibility with Apache Spark and Elastic search

We use Java 8, org.elasticsearch.client:elasticsearch-rest-client:7.16, org.springframework.data:spring-data-elasticsearch:4.4.0-M2 and org.apache.spark:spark-core:3.2.0.

There are vulnerabilities reported with ES 7.16 so we have to upgrade to ES 8 & spring data elasticsearch 5 in the near future

We might be forced to upgrade to java 17. Here is from readme https://github.com/spring-projects/spring-data-elasticsearch

In Elasticsearch 8, the RestHighLevelCLient has been removed. This means that a switch to this client version can only be done with the next major upgrade which will be Spring Data Elasticsearch 5, based on Spring Data 3, used by Spring Boot 3, based on Spring 6 and Java 17.

However, The latest version of Spark only supports java 11 so we can't really rely on java 17 features. I couldn't find this discussion anywhere which made me wonder if our team is the only one using this group of technologies. Any suggestions how can we keep our versions up to date with this tech stack?

EDIT: Just found out on Reddit that Java 17 is supported https://www.reddit.com/r/apachespark/comments/tkifvl/any_plans_for_spark_to_support_java_17/



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source