Code Review
/
nonrtric
/
plt
/
ranpm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Improve Test coverage of InfluxLogger Issue-ID: NONRTRIC-875"
[nonrtric/plt/ranpm.git]
/
datafilecollector
/
src
/
main
/
java
/
org
/
oran
/
datafile
/
datastore
/
S3ObjectStore.java
diff --git
a/datafilecollector/src/main/java/org/oran/datafile/datastore/S3ObjectStore.java
b/datafilecollector/src/main/java/org/oran/datafile/datastore/S3ObjectStore.java
index
2581735
..
5da27b0
100644
(file)
--- a/
datafilecollector/src/main/java/org/oran/datafile/datastore/S3ObjectStore.java
+++ b/
datafilecollector/src/main/java/org/oran/datafile/datastore/S3ObjectStore.java
@@
-2,7
+2,7
@@
* ========================LICENSE_START=================================
* O-RAN-SC
* %%
* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2021 Nordix Foundation
+ * Copyright (C) 2021
-2023
Nordix Foundation
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-73,6
+73,12
@@
public class S3ObjectStore implements DataStore {
getS3AsynchClient(applicationConfig);
}
getS3AsynchClient(applicationConfig);
}
+ @SuppressWarnings({"java:S3010", "java:S2209"})
+ public S3ObjectStore(AppConfig applicationConfig, S3AsyncClient s3AsynchClient) {
+ this.applicationConfig = applicationConfig;
+ this.s3AsynchClient = s3AsynchClient;
+ }
+
private static synchronized S3AsyncClient getS3AsynchClient(AppConfig applicationConfig) {
if (applicationConfig.isS3Enabled() && s3AsynchClient == null) {
s3AsynchClient = getS3AsyncClientBuilder(applicationConfig).build();
private static synchronized S3AsyncClient getS3AsynchClient(AppConfig applicationConfig) {
if (applicationConfig.isS3Enabled() && s3AsynchClient == null) {
s3AsynchClient = getS3AsyncClientBuilder(applicationConfig).build();
@@
-209,13
+215,9
@@
public class S3ObjectStore implements DataStore {
oids.add(oid);
}
oids.add(oid);
}
- Delete delete = Delete.builder() //
- .objects(oids) //
- .build();
-
DeleteObjectsRequest request = DeleteObjectsRequest.builder() //
.bucket(bucket(bucket)) //
DeleteObjectsRequest request = DeleteObjectsRequest.builder() //
.bucket(bucket(bucket)) //
- .delete(
delete) //
+ .delete(
Delete.builder().objects(oids).build()) //NOSONAR
.build();
CompletableFuture<DeleteObjectsResponse> future = s3AsynchClient.deleteObjects(request);
.build();
CompletableFuture<DeleteObjectsResponse> future = s3AsynchClient.deleteObjects(request);