Giuseppe Barbieri
02/14/2024, 11:23 AMExpected URL scheme 'http' or 'https' but no scheme was found for /api/v...
Giuseppe Barbieri
02/14/2024, 11:25 AMval defaultClient = Configuration.getDefaultApiClient()
defaultClient.setBasePath("/api/v1")
// Configure HTTP basic authorization: basic_auth
val basic_auth = defaultClient.getAuthentication("basic_auth") as HttpBasicAuth
basic_auth.username = "AKIAIOSFOLQUICKSTART"
basic_auth.password = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
val apiInstance = ActionsApi(defaultClient)
val repository = "quickstart"
val runId = "runId_example"
try {
val result = apiInstance.getRun(repository, runId)
.execute()
println(result)
} catch (e: ApiException) {
System.err.println("Exception when calling ActionsApi#getRun")
System.err.println("Status code: " + e.code)
System.err.println("Reason: " + e.responseBody)
System.err.println("Response headers: " + e.responseHeaders)
e.printStackTrace()
}
I have no idea what runId
is supposed to be
the repo "quickstart"
is the one from the LakeFS --quickstart
mode
I also don't know where I shall put the url to connect to, Barak mentioned "as part of each API constructor", but I couldn't figure it out what he meant specificallyAriel Shaqed (Scolnicov)
02/14/2024, 11:36 AMdefaultClient.setBasePath("/api/v1")
Ariel Shaqed (Scolnicov)
02/14/2024, 11:37 AMdefaultClient.setBasePath("<http://localhost:8000/api/v1>")
?Ariel Shaqed (Scolnicov)
02/14/2024, 11:37 AMclients/hadoopfs
.Giuseppe Barbieri
02/14/2024, 12:54 PMException when calling ActionsApi#getRun
Status code: 404
Reason: {"message":"not found: not found"}
Response headers: {content-length=[35], content-type=[application/json], date=[Wed, 14 Feb 2024 125320 GMT], x-content-type-options=[nosniff], x-request-id=[79c62be2-5501-484d-b901-c4d0e9d4b690]}
io.lakefs.clients.sdk.ApiException: Message: Not Found
HTTP response code: 404
HTTP response body: {"message":"not found: not found"}
HTTP response headers: {content-length=[35], content-type=[application/json], date=[Wed, 14 Feb 2024 125320 GMT], x-content-type-options=[nosniff], x-request-id=[79c62be2-5501-484d-b901-c4d0e9d4b690]}
at io.lakefs.clients.sdk.ApiClient.handleResponse(ApiClient.java:1138)
at io.lakefs.clients.sdk.ApiClient.execute(ApiClient.java:1051)
at io.lakefs.clients.sdk.ActionsApi.getRunWithHttpInfo(ActionsApi.java:145)
at io.lakefs.clients.sdk.ActionsApi.access$100(ActionsApi.java:42)
at io.lakefs.clients.sdk.ActionsApi$APIgetRunRequest.execute(ActionsApi.java:199)
at com.example.ApplicationKt$configureRouting$1$1.invokeSuspend(Application.kt:77)
at com.example.ApplicationKt$configureRouting$1$1.invoke(Application.kt)
Ariel Shaqed (Scolnicov)
02/14/2024, 12:56 PMGiuseppe Barbieri
02/14/2024, 12:56 PMrunId
?Ariel Shaqed (Scolnicov)
02/14/2024, 1:54 PMGiuseppe Barbieri
02/14/2024, 1:58 PMapiInstance::getRun
, I was just eager to get anything running
I'd be more than happy if I can get somehow this on the Java client
for change in client.diff(repo, from_ref, target_branch, prefix=prefix):
ApiClient
seems to have no diff
or similar method availableAriel Shaqed (Scolnicov)
02/14/2024, 2:05 PMGiuseppe Barbieri
02/14/2024, 2:10 PMGET /repositories/{repository}/branches/{branch}/diff diff branchDo you mean I shall manually create an Http GET to get the info I'd like to have?
Ariel Shaqed (Scolnicov)
02/14/2024, 2:25 PMAriel Shaqed (Scolnicov)
02/14/2024, 3:45 PMGiuseppe Barbieri
02/16/2024, 8:50 AMval api = BranchesApi(defaultClient)
val diffList = api.diffBranch(schema.repositoryId, schema.branchId).execute()
where schema
is the parsed class from the received text (I'm posting for others looking at the same problem)Giuseppe Barbieri
02/16/2024, 8:55 AMGiuseppe Barbieri
02/16/2024, 8:57 AMLakeFSFileSystem
class, which looks interesting, comment says
> * A dummy implementation of the core lakeFS Filesystem.
> * This class implements a {@link LakeFSFileSystem} that can be registered to
> * Spark and support limited write and read actions.
but I cant see anything for readingAriel Shaqed (Scolnicov)
02/16/2024, 9:00 AMGiuseppe Barbieri
02/16/2024, 9:01 AMAriel Shaqed (Scolnicov)
02/16/2024, 9:13 AMAriel Shaqed (Scolnicov)
02/16/2024, 9:14 AMGiuseppe Barbieri
02/16/2024, 10:34 AMval objectsApi = ObjectsApi(defaultClient)
val objectStatsList = objectsApi.listObjects("quickstart", "main").execute()
println(objectStatsList)
val readme = objectStatsList.results.first { it.path == "README.md" }
val readme2 = objectsApi.getObject("quickstart", "main", "README.md").execute()
println(Path(readme.physicalAddress.substringAfter("local://")).readText())
println(readme2.readText())
Giuseppe Barbieri
02/16/2024, 10:35 AMquickstart
mode? Would it work the same in production with MinIO behind?Elad Lachmi
02/16/2024, 10:48 AMGiuseppe Barbieri
02/19/2024, 10:12 AMInternalApi(defaultClient).lakeFSVersion
is marked as deprecate, what shall it be substituted with? Everything I can find still points to InternalApi
Ariel Shaqed (Scolnicov)
02/19/2024, 10:52 AMAriel Shaqed (Scolnicov)
02/19/2024, 10:53 AMGiuseppe Barbieri
02/19/2024, 10:55 AMGiuseppe Barbieri
02/19/2024, 11:01 AM@Deprecated
is the wrong annotation
you should probably create one specific called, for example, @Internal
Ariel Shaqed (Scolnicov)
02/19/2024, 11:03 AMAriel Shaqed (Scolnicov)
02/19/2024, 11:04 AMI'm working with the client java api for our internal researchers and on the side, I'm trying to develop some sort of high level wrapper, counterpart of the python one already existingIf so, I would recommend sticking to supported APIs.