-
Notifications
You must be signed in to change notification settings - Fork 35
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
Dynamically invoking withSpark in dockerized Ktor web app throws UnsupportedFileSystemException #219
Comments
For comparison, I created an equivalent dockerized Spring Boot app here. In the Spring Boot version, it seems that Spark creates a local temporary directory as part of the preparation of the Spark session before it invokes the broadcast function:
It seems the exception is thrown in the Ktor app roughly at the point where the temporary directory would have been created:
|
Like I responded on slack: The file reading exception print happens when the DECIMAL encoder is pre-loaded by the Kotlin Spark API Encoders file. Can you try to instantiate the same encoder in the non-kotlin spark project to see what happens? In the spark 3.4+ branch of the project the encoding part is completely overhauled, so this issue won't be there anymore. But it's still a WIP. Your program still executes fine. It's a caught exception that's just logged to the output. |
Thank you so much for pinpointing the source of the exception. I'm glad to know it's not because of an error on my part. |
When
withSpark
is invoked dynamically in a dockerized Ktor web app, anUnsupportedFileSystemException
is thrown.Expected behavior: No exception is thrown.
A GitHub repo is here.
Broadcast.kt (from kotlin-spark-api example)
Routing.kt
Dockerfile
compose.yaml
In a shell, run:
Then, open http://localhost:8888 in a browser.
An
org.apache.hadoop.fs.UnsupportedFileSystemException
will be thrown:The text was updated successfully, but these errors were encountered: