Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>skyflow-java</artifactId>
<version>3.0.0-beta.6-dev.4dec765</version>
<version>2.0.1-dev.9bce8f2</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>Skyflow V3 SDK for the Java programming language</description>
Expand Down
13 changes: 11 additions & 2 deletions v3/src/main/java/com/skyflow/vault/controller/VaultController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.skyflow.VaultClient;
import com.skyflow.config.Credentials;
import com.skyflow.config.VaultConfig;
import com.skyflow.errors.SkyflowException;
import com.skyflow.generated.rest.core.ApiClientApiException;
import com.skyflow.generated.rest.core.RequestOptions;
import com.skyflow.generated.rest.types.InsertRecordData;
import com.skyflow.generated.rest.types.InsertResponse;
import com.skyflow.generated.rest.types.Upsert;
Expand All @@ -31,6 +33,7 @@

public final class VaultController extends VaultClient {
private static final Gson gson = new GsonBuilder().serializeNulls().create();
private JsonObject metrics = Utils.getMetrics();
private int insertBatchSize;
private int insertConcurrencyLimit;
private int detokenizeBatchSize;
Expand Down Expand Up @@ -262,7 +265,10 @@ private List<CompletableFuture<DetokenizeResponse>> detokenizeBatchFutures(Execu
}

private com.skyflow.generated.rest.types.DetokenizeResponse processDetokenizeBatch(com.skyflow.generated.rest.resources.recordservice.requests.DetokenizeRequest batch) {
return this.getRecordsApi().detokenize(batch);
RequestOptions requestOptions = RequestOptions.builder()
.addHeader(Constants.SDK_METRICS_HEADER_KEY, metrics.toString())
.build();
return this.getRecordsApi().detokenize(batch, requestOptions);
}

private List<CompletableFuture<com.skyflow.vault.data.InsertResponse>>
Expand Down Expand Up @@ -305,7 +311,10 @@ private InsertResponse insertBatch(List<InsertRecordData> batch, String tableNam
req.tableName(tableName);
}
com.skyflow.generated.rest.resources.recordservice.requests.InsertRequest request = req.build();
return this.getRecordsApi().insert(request);
RequestOptions requestOptions = RequestOptions.builder()
.addHeader(Constants.SDK_METRICS_HEADER_KEY, metrics.toString())
.build();
return this.getRecordsApi().insert(request, requestOptions);
}

private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
Expand Down
Loading