Skip to content

Commit 2e4f3e5

Browse files
authored
modify registry.db s3 object initialization to work in S3 subdirectory with Java Feast Server (feast-dev#2259)
Signed-off-by: NalinGHub <nalinm01@gmail.com>
1 parent 895589a commit 2e4f3e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/serving/src/main/java/feast/serving/registry/S3RegistryFile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public S3RegistryFile(AmazonS3 s3Client, String url) {
3333
this.s3Client = s3Client;
3434

3535
String[] split = url.replace("s3://", "").split("/");
36-
this.s3Object = this.s3Client.getObject(split[0], split[1]);
36+
String objectPath = String.join("/", java.util.Arrays.copyOfRange(split, 1, split.length));
37+
this.s3Object = this.s3Client.getObject(split[0], objectPath);
3738
}
3839

3940
@Override

0 commit comments

Comments
 (0)