Hi, For my use case I’m using Spark on Scala and I...
# help
a
Hi, For my use case I’m using Spark on Scala and I’m using the
LakeFSClient
class. I’ve noticed that while on python client the commits api are exposed, this doesn’t happen on the Java counterpart. Is this something missing or is there a reason for the CommitsApi not being exposed there?
b
Hi @Alessandro Mangone yes, it looks like missing functionality in the client helper.
I'll open a bug and make sure it will be fixed for the next release of lakeFS.
For now you can instance ApiClient and use the ref api directly
👍 1
I'll paste an example
Copy code
ApiClient client = new ApiClient();
        client.setBasePath("<lakefs endpoint>/api/v1");
        client.setUsername("<key>");
        client.setPassword("<secret>");

        CommitsApi api = new CommitsApi(client);
        Commit response = api.commit("repo", "main", new CommitCreation().message("message"), "");
@Alessandro Mangone it looks I had it wrong the LakeFSClient.java you reference is part of our HadoopFS implementation.
This is the main reason why it doesn't include any reference to CommitsApi - currently it doesn't use it.
The Java SDK generated client code found in package io.lakefs.clients.api;
The above sample code is the way to use it. So, I'm not creating an issue for now.
a
Ok, so for java I should instantiate the apiclient and all the apis individually, got it
b
Exactly - it is autogenerated based on the lakeFS OpenAPI spec - https://github.com/treeverse/lakeFS/blob/master/api/swagger.yml
👍 1
a
Ok, thanks!