Package org.apache.druid.data.input.impl
Class CloudObjectLocation
- java.lang.Object
-
- org.apache.druid.data.input.impl.CloudObjectLocation
-
public class CloudObjectLocation extends Object
Common type for 'bucket' and 'path' concept of cloud objects to allow code sharing between cloud specific implementations.bucket
andpath
should NOT be URL encoded. The intention is that this is used as a common representation for storage objects as an alternative to dealing inURI
directly, but still provide a mechanism to round-trip with a URI. In common clouds, bucket names must be dns compliant: https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata https://cloud.google.com/storage/docs/naming The constructor ensures that bucket names are DNS compliant by checking that the URL encoded form of the bucket matches the supplied value. Technically it should probably confirm that the bucket is also all lower-case, but S3 has a legacy mode where buckets did not have to be compliant so we can't enforce that here unfortunately.
-
-
Constructor Summary
Constructors Constructor Description CloudObjectLocation(String bucket, String path)
CloudObjectLocation(URI uri)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getBucket()
String
getPath()
int
hashCode()
String
toString()
URI
toUri(String scheme)
static URI
validateUriScheme(String scheme, URI uri)
-