mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
feat(s3tables): expose bucket storage class configuration (#8524)
Co-authored-by: Andre Kurait <AndreKurait@gmail.com>
This commit is contained in:
1 parent
63124253f2
commit
dc7948013d
11 files changed
+353
-58
No files matched your search
@@ -68,6 +68,14 @@ public class S3TablesController {
|
||||
return Response.noContent().build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("/buckets/{tableBucketARN}/storage-class")
|
||||
public Response getTableBucketStorageClass(@Context HttpHeaders headers,
|
||||
@Encoded @PathParam("tableBucketARN") String tableBucketArn) {
|
||||
return Response.ok(Map.of("storageClassConfiguration",
|
||||
service.getTableBucketStorageClass(decode(tableBucketArn), region(headers)))).build();
|
||||
}
|
||||
|
||||
@PUT
|
||||
@Path("/buckets/{tableBucketARN}/policy")
|
||||
public Response putTableBucketPolicy(@Context HttpHeaders headers, @Encoded @PathParam("tableBucketARN") String tableBucketArn,
|
||||
|
||||
@@ -82,6 +82,11 @@ public class S3TablesService {
|
||||
store.delete(storageKey(region, bucket.getName()));
|
||||
}
|
||||
|
||||
public synchronized Object getTableBucketStorageClass(String tableBucketArn, String region) {
|
||||
Object configuration = getTableBucket(tableBucketArn, region).getStorageClassConfiguration();
|
||||
return configuration == null ? Map.of("storageClass", "STANDARD") : configuration;
|
||||
}
|
||||
|
||||
public synchronized Namespace createNamespace(String tableBucketArn, List<String> namespace, String region) {
|
||||
String namespaceName = namespaceName(namespace);
|
||||
TableBucket bucket = getTableBucket(tableBucketArn, region);
|
||||
|
||||
Reference in new issue
Block a user