From e125ced7c8c5ad581f539534be1863da2c572f46 Mon Sep 17 00:00:00 2001 From: NalinGHub Date: Sat, 29 Jan 2022 15:41:02 -0500 Subject: [PATCH] modify registry.db s3 object initialization to work in S3 subdirectory with Java Feast Server Signed-off-by: NalinGHub --- .../src/main/java/feast/serving/registry/S3RegistryFile.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/java/serving/src/main/java/feast/serving/registry/S3RegistryFile.java b/java/serving/src/main/java/feast/serving/registry/S3RegistryFile.java index 486e2ca39c..4b122a5de0 100644 --- a/java/serving/src/main/java/feast/serving/registry/S3RegistryFile.java +++ b/java/serving/src/main/java/feast/serving/registry/S3RegistryFile.java @@ -33,7 +33,8 @@ public S3RegistryFile(AmazonS3 s3Client, String url) { this.s3Client = s3Client; String[] split = url.replace("s3://", "").split("/"); - this.s3Object = this.s3Client.getObject(split[0], split[1]); + String objectPath = String.join("/", java.util.Arrays.copyOfRange(split, 1, split.length)); + this.s3Object = this.s3Client.getObject(split[0], objectPath); } @Override