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

LakeFS Java SDK compatibility with Spark #8576

Open
peter-mcclonski opened this issue Feb 1, 2025 · 0 comments
Open

LakeFS Java SDK compatibility with Spark #8576

peter-mcclonski opened this issue Feb 1, 2025 · 0 comments

Comments

@peter-mcclonski
Copy link

LakeFS Java SDK depends on okhttp 4.x. The apache spark docker image ships with okhttp 3.x. I've specifically seen this with the spark 3.5.2 image, using lakefs SDK 1.48.0

In this environment, branch creation calls fail with the following error:

 Exception in thread "main" java.lang.NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
     at io.lakefs.clients.sdk.ApiClient.serialize(ApiClient.java:955)
     at io.lakefs.clients.sdk.ApiClient.buildRequest(ApiClient.java:1211)
     at io.lakefs.clients.sdk.ApiClient.buildCall(ApiClient.java:1160)
     at io.lakefs.clients.sdk.BranchesApi.createBranchCall(BranchesApi.java:332)
     at io.lakefs.clients.sdk.BranchesApi.createBranchValidateBeforeCall(BranchesApi.java:347)
     at io.lakefs.clients.sdk.BranchesApi.createBranchWithHttpInfo(BranchesApi.java:353)
     at io.lakefs.clients.sdk.BranchesApi.access$500(BranchesApi.java:46)
     at io.lakefs.clients.sdk.BranchesApi$APIcreateBranchRequest.execute(BranchesApi.java:415)

The lakefs Hadoop fs addresses this problem by shading the okhttp dependency. The SDK should take the same path to avoid this incompatibility.

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

No branches or pull requests

2 participants