Skip to content

Commit fe2037e

Browse files
Merge pull request #216 from skyflowapi/v3-release/25.9.2
SK-2274 release/25.9.2
2 parents ffcacfa + 8e0fbba commit fe2037e

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

common/src/main/java/com/skyflow/logs/InfoLogs.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public enum InfoLogs {
9292
VALIDATE_GET_DETECT_RUN_REQUEST("Validating get detect run request."),
9393
REIDENTIFY_TEXT_SUCCESS("Text data re-identified."),
9494

95-
PROCESSING_BATCHES("Processing batch")
95+
PROCESSING_BATCHES("Processing batch"),
9696
;
9797

9898

common/src/main/java/com/skyflow/logs/WarningLogs.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
public enum WarningLogs {
44
INVALID_BATCH_SIZE_PROVIDED("Invalid value for batch size provided, switching to default value."),
55
INVALID_CONCURRENCY_LIMIT_PROVIDED("Invalid value for concurrency limit provided, switching to default value."),
6+
BATCH_SIZE_EXCEEDS_MAX_LIMIT("Provided batch size exceeds the maximum limit, switching to max limit."),
7+
CONCURRENCY_EXCEEDS_MAX_LIMIT("Provided concurrency limit exceeds the maximum limit, switching to max limit.")
68
;
79

810
private final String log;

v2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<dependency>
2525
<groupId>com.skyflow</groupId>
2626
<artifactId>common</artifactId>
27-
<version>1.0.0</version>
27+
<version>1.0.1</version>
2828
</dependency>
2929

3030
</dependencies>

v3/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</parent>
1212

1313
<artifactId>skyflow-java</artifactId>
14-
<version>3.0.0-beta.2</version>
14+
<version>3.0.0-beta.2-dev.dca75d0</version>
1515
<packaging>jar</packaging>
1616
<name>${project.groupId}:${project.artifactId}</name>
1717
<description>Skyflow V3 SDK for the Java programming language</description>

v3/src/main/java/com/skyflow/utils/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
public final class Constants extends BaseConstants {
44
public static final String SDK_NAME = "Skyflow Java SDK ";
5-
public static final String SDK_VERSION = "3.0.0-beta.2";
5+
public static final String SDK_VERSION = "3.0.0-beta.3";
66
public static final String VAULT_DOMAIN = ".skyvault.";
77
public static final String SDK_PREFIX = SDK_NAME + SDK_VERSION;
88
public static final Integer INSERT_BATCH_SIZE = 50;

v3/src/main/java/com/skyflow/vault/controller/VaultController.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public com.skyflow.vault.data.InsertResponse bulkInsert(InsertRequest insertRequ
4949
LogUtil.printInfoLog(InfoLogs.VALIDATE_INSERT_REQUEST.getLog());
5050
Validations.validateInsertRequest(insertRequest);
5151
configureInsertConcurrencyAndBatchSize(insertRequest.getValues().size());
52+
5253
setBearerToken();
5354
com.skyflow.generated.rest.resources.recordservice.requests.InsertRequest request = super.getBulkInsertRequestBody(insertRequest, super.getVaultConfig());
5455

@@ -70,6 +71,7 @@ public CompletableFuture<com.skyflow.vault.data.InsertResponse> bulkInsertAsync(
7071
LogUtil.printInfoLog(InfoLogs.VALIDATE_INSERT_REQUEST.getLog());
7172
Validations.validateInsertRequest(insertRequest);
7273
configureInsertConcurrencyAndBatchSize(insertRequest.getValues().size());
74+
7375
setBearerToken();
7476
com.skyflow.generated.rest.resources.recordservice.requests.InsertRequest request = super.getBulkInsertRequestBody(insertRequest, super.getVaultConfig());
7577
List<ErrorRecord> errorRecords = Collections.synchronizedList(new ArrayList<>());
@@ -306,6 +308,9 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
306308
if (userProvidedBatchSize != null) {
307309
try {
308310
int batchSize = Integer.parseInt(userProvidedBatchSize);
311+
if (batchSize > Constants.MAX_INSERT_BATCH_SIZE) {
312+
LogUtil.printWarningLog(WarningLogs.BATCH_SIZE_EXCEEDS_MAX_LIMIT.getLog());
313+
}
309314
int maxBatchSize = Math.min(batchSize, Constants.MAX_INSERT_BATCH_SIZE);
310315
if (maxBatchSize > 0) {
311316
this.insertBatchSize = maxBatchSize;
@@ -326,7 +331,9 @@ private void configureInsertConcurrencyAndBatchSize(int totalRequests) {
326331
try {
327332
int concurrencyLimit = Integer.parseInt(userProvidedConcurrencyLimit);
328333
int maxConcurrencyLimit = Math.min(concurrencyLimit, Constants.MAX_INSERT_CONCURRENCY_LIMIT);
329-
334+
if (concurrencyLimit > Constants.MAX_INSERT_CONCURRENCY_LIMIT) {
335+
LogUtil.printWarningLog(WarningLogs.CONCURRENCY_EXCEEDS_MAX_LIMIT.getLog());
336+
}
330337
if (maxConcurrencyLimit > 0) {
331338
this.insertConcurrencyLimit = Math.min(maxConcurrencyLimit, maxConcurrencyNeeded);
332339
} else {
@@ -357,6 +364,9 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
357364
if (userProvidedBatchSize != null) {
358365
try {
359366
int batchSize = Integer.parseInt(userProvidedBatchSize);
367+
if (batchSize > Constants.MAX_DETOKENIZE_BATCH_SIZE) {
368+
LogUtil.printWarningLog(WarningLogs.BATCH_SIZE_EXCEEDS_MAX_LIMIT.getLog());
369+
}
360370
int maxBatchSize = Math.min(batchSize, Constants.MAX_DETOKENIZE_BATCH_SIZE);
361371
if (maxBatchSize > 0) {
362372
this.detokenizeBatchSize = maxBatchSize;
@@ -376,6 +386,9 @@ private void configureDetokenizeConcurrencyAndBatchSize(int totalRequests) {
376386
if (userProvidedConcurrencyLimit != null) {
377387
try {
378388
int concurrencyLimit = Integer.parseInt(userProvidedConcurrencyLimit);
389+
if (concurrencyLimit > Constants.MAX_DETOKENIZE_CONCURRENCY_LIMIT) {
390+
LogUtil.printWarningLog(WarningLogs.CONCURRENCY_EXCEEDS_MAX_LIMIT.getLog());
391+
}
379392
int maxConcurrencyLimit = Math.min(concurrencyLimit, Constants.MAX_DETOKENIZE_CONCURRENCY_LIMIT);
380393

381394
if (maxConcurrencyLimit > 0) {

0 commit comments

Comments
 (0)