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

Spark runs on Java 8/11/17, Scala 2.12/2.13, Python 3.7+ and R 3.5+. the library only support Java 11 #186

Closed
etika-garry opened this issue Nov 25, 2022 · 8 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@etika-garry
Copy link

Hi

As the title states apache spark supports various runtimes but most notably the runtime for java is 8/11/17. Unfortunately in many places you are stuck with a specific version of java runtime, in my case 8. This produces obviously the below error:

Execution failed for task ':compileKotlin'.
> Error while evaluating property 'filteredArgumentsMap' of task ':compileKotlin'
   > Could not resolve all files for configuration ':compileClasspath'.
      > Could not resolve org.jetbrains.kotlinx.spark:kotlin-spark-api_3.3.0_2.12:1.2.1.
        Required by:
            project :
         > No matching variant of org.jetbrains.kotlinx.spark:kotlin-spark-api_3.3.0_2.12:1.2.1 was found. The consumer was configured to find an API of a library compatible with Java 8, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' but:
             - Variant 'apiElements' capability org.jetbrains.kotlinx.spark:kotlin-spark-api_3.3.0_2.12:1.2.1 declares an API of a library, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
                 - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
             - Variant 'runtimeElements' capability org.jetbrains.kotlinx.spark:kotlin-spark-api_3.3.0_2.12:1.2.1 declares a runtime of a library, packaged as a jar, preferably optimized for standard JVMs, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
                 - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
@Jolanrensen Jolanrensen added the good first issue Good for newcomers label Nov 25, 2022
@Jolanrensen
Copy link
Collaborator

I've made attempts to run the Kotlin Spark API with java 8: #183
However, unfortunately, we have too many dependencies that break on java 8.
If you or someone can make it work for java8 I'd gladly add it, since indeed, many Spark applications require 8, however no luck thus far (my attempt: https://github.com/Kotlin/kotlin-spark-api/tree/java8).

Java 17 should be possible in the future for sure!

@etika-garry
Copy link
Author

Hi Jolan,

Thank you for your attempt. I would be more than happy to introduce J8 compatibility but unfortunately as I just started in a new role where "python" is the main solution I cannot invest the time.

It may be something I look at when I have a little down time.

Even so this should probably be under a feature request as I do not think J8 support will drop at any time. Further, as you have ambitions to have the kotlin-spark-api as core feature in spark it would have to support j8.

Thanks

Garry

@Jolanrensen
Copy link
Collaborator

While the tests still don't work, you can try to take this branch https://github.com/Kotlin/kotlin-spark-api/tree/java8 as is, set the scala/spark version you want in gradle.properties and then publishToMavenLocal. In theory, it should work with java 8. Let me know if it does!
In the meantime I'll try to fix Kotest...

@Jolanrensen
Copy link
Collaborator

I managed to work around the testing issues! See #189. Will soon merge and a dev version will be built to test.

@Jolanrensen
Copy link
Collaborator

https://github.com/orgs/Kotlin/packages?tab=packages&q=kotlin-spark-api 1.2.3-SNAPSHOT can be found here with java 8 support :) Feel free to try!

@Jolanrensen Jolanrensen added this to the 1.2.3 milestone Jan 4, 2023
@Jolanrensen
Copy link
Collaborator

@etika-garry
Copy link
Author

etika-garry commented Jan 17, 2023 via email

@Jolanrensen
Copy link
Collaborator

Let me know if it now works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants