Package dev.frostlake.config
Class S3PathResolver
java.lang.Object
dev.frostlake.config.S3PathResolver
Resolves Snowflake-style S3 URLs (
s3://bucket/key) to a local filesystem path, so files that
live in S3 in production — most usefully the JAR(s) named in a UDF/procedure IMPORTS clause —
can be served from local disk in the local/CI testing the engine targets. Driven by two engine settings:
stage.s3.localMappings— explicit prefix overrides,';'-separateds3prefix=localdirpairs, e.g."s3://prod-bucket/lib/=/opt/jars; s3://data/=/srv/data". The longest matching prefix wins, and the remainder of the URL is appended to the mapped directory.stage.s3.localRoot— the fallback base; an unmappeds3://bucket/keyresolves to<localRoot>/bucket/key. Defaults to~/.frostlake_stages/s3.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTrue ifurlis ans3://…reference.toLocalPath(String s3Url) Map ans3://bucket/keyURL to its local filesystem path.
-
Constructor Details
-
S3PathResolver
-
-
Method Details
-
isS3Url
True ifurlis ans3://…reference. -
toLocalPath
Map ans3://bucket/keyURL to its local filesystem path. An explicitstage.s3.localMappingsentry wins (longest matching prefix); with no match the key is placed under the configured local root (s3://bucket/key→<localRoot>/bucket/key).- Throws:
IllegalArgumentException- ifs3Urlis not ans3://URL
-