-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New interface & factory for AzureHTTPClient providers #1700
New interface & factory for AzureHTTPClient providers #1700
Conversation
samza-azure/src/main/java/org/apache/samza/system/azureblob/BlobClientBuilder.java
Outdated
Show resolved
Hide resolved
samza-azure/src/main/java/org/apache/samza/system/azureblob/BlobClientBuilderFactory.java
Outdated
Show resolved
Hide resolved
samza-azure/src/main/java/org/apache/samza/system/azureblob/BlobClientBuilder.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
samza-azure/src/main/java/org/apache/samza/system/azureblob/AzureBlobConfig.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LGTM 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall LGTM.
lets please update the PR desc to follow this SEP-25 guidlines https://cwiki.apache.org/confluence/display/SAMZA/SEP-25%3A+PR+Title+And+Description+Guidelines
since this is an public API change, lets also talk about the backwards and forwards compatability for this change
samza-azure/src/main/java/org/apache/samza/system/azureblob/BlobClientBuilder.java
Outdated
Show resolved
Hide resolved
The build is failing with the following checkstyle violation error. Can we please fix it?
|
Issues
The current system design does not allow users to create their own Azure client. Customers can only access behavior that has been exposed by configuration. This change adds the required interfaces, factories and configs required to allow customers to provide a client. This will allow users to access all options available in Azure SDKs without changes to samza-azure.
Changes
Addition of a new interface (BlobClientBuilder) & existing AzureBlobClientBuilder to implement the newly added interface. This is done primarily to make the code more extensible.
Addition of factory classes for creation of objects, inline with factory design pattern. Replaced direct object creation of AzureBlobClientBuilder class objects which previously used new() with get objects from factory.
Upgrade instructions: N/A
Usage Instructions: If customers want to implement their own implementation of BlobClientBuilder, they can set the value of SYSTEM_BLOB_CLIENT_BUILDER_FACTORY_CLASS_NAME_DEFAULT to point to the corresponding factory of the new implementation class.
Compatibility: The changes proposed here are both forward & backward compatible, since the default value of SYSTEM_BLOB_CLIENT_BUILDER_FACTORY_CLASS_NAME_DEFAULT points to org.apache.samza.system.azureblob.AzureBlobClientBuilderFactory which will create the object of AzureBlobClientBuilder, which aligns to the current functionality.