zachjsh commented on code in PR #15630:
URL: https://github.com/apache/druid/pull/15630#discussion_r1463976456
##########
extensions-core/azure-extensions/src/main/java/org/apache/druid/data/input/azure/AzureEntity.java:
##########
@@ -40,21 +42,32 @@ public class AzureEntity extends RetryingInputEntity
{
private final CloudObjectLocation location;
private final AzureByteSource byteSource;
+ private final String scheme;
@AssistedInject
AzureEntity(
@Nonnull @Assisted CloudObjectLocation location,
+ @Nonnull @Assisted AzureStorage azureStorage,
+ @Nonnull @Assisted String scheme,
@Nonnull AzureByteSourceFactory byteSourceFactory
+
)
{
this.location = location;
- this.byteSource = byteSourceFactory.create(location.getBucket(),
location.getPath());
+ this.scheme = scheme;
+ // If scheme is azureStorage, containerName is the first prefix in the
path, otherwise containerName is the bucket
+ if (AzureStorageAccountInputSource.SCHEME.equals(this.scheme)) {
+ Pair<String, String> locationInfo =
AzureStorageAccountInputSource.getContainerAndPathFromObjectLocation(location);
Review Comment:
Should the returned locationInfo be validated in anyway? What if the
containerName or blobPath are missing? Or is this previously validated an an
earlier point in the chain?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]