Skip to content

Commit a473f4a

Browse files
committed
feat(storage:oci): format code and improve the toString
1 parent 5509753 commit a473f4a

File tree

1 file changed

+6
-5
lines changed
  • storage/oci/src/main/java/io/aiven/kafka/tieredstorage/storage/oci

1 file changed

+6
-5
lines changed

storage/oci/src/main/java/io/aiven/kafka/tieredstorage/storage/oci/OciStorage.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ OciUploadOutputStream ociOutputStream(final ObjectKey key) {
7575
@Override
7676
public void delete(final ObjectKey key) throws StorageBackendException {
7777
try {
78-
final DeleteObjectRequest deleteRequest = DeleteObjectRequest.builder()
78+
final DeleteObjectRequest deleteObjectRequest = DeleteObjectRequest.builder()
7979
.namespaceName(namespaceName)
8080
.bucketName(bucketName)
8181
.objectName(key.value())
8282
.build();
83-
objectStorageClient.deleteObject(deleteRequest);
83+
objectStorageClient.deleteObject(deleteObjectRequest);
8484
} catch (final BmcException e) {
8585
throw new StorageBackendException("Failed to delete " + key, e);
8686
}
@@ -119,13 +119,13 @@ public InputStream fetch(final ObjectKey key, final BytesRange range) throws Sto
119119
return InputStream.nullInputStream();
120120
}
121121

122-
final GetObjectRequest getRequest = GetObjectRequest.builder()
122+
final GetObjectRequest getObjectRequest = GetObjectRequest.builder()
123123
.namespaceName(namespaceName)
124124
.bucketName(bucketName)
125125
.objectName(key.value())
126126
.range(formatRange(range))
127127
.build();
128-
return objectStorageClient.getObject(getRequest).getInputStream();
128+
return objectStorageClient.getObject(getObjectRequest).getInputStream();
129129
} catch (final BmcException e) {
130130
if (e.getStatusCode() == 404) {
131131
throw new KeyNotFoundException(this, key, e);
@@ -147,7 +147,8 @@ public String toString() {
147147
return "OciStorage{"
148148
+ "namespaceName='" + namespaceName + '\''
149149
+ "bucketName='" + bucketName + '\''
150-
+ ", partSize=" + partSize
150+
+ ", partSize=" + partSize + '\''
151+
+ ", storageTier=" + storageTier
151152
+ '}';
152153
}
153154
}

0 commit comments

Comments
 (0)