-
Notifications
You must be signed in to change notification settings - Fork 490
Azure Blob Storage Support 1311 #1941
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
base: main
Are you sure you want to change the base?
Conversation
|
@gkatzioura, you mean -> Add File System support for Azure Blob Storage? |
Fixed |
|
Just as #993 , obtainSecurityToken method is required for client to access Azure Blob Storage when read from remote |
checking the options |
|
@gkatzioura, we should make sure it works for all prefixes, like |
|
LicenseChecker fixed, and I just finished testing with all schemes. Everything works great 💪 🚀 |
|
Hi @luoyuxia I do receive the tokens when I read fluss data as a client try (LogScanner logScanner = table.newScan().createLogScanner()) {
logScanner.subscribeFromBeginning(1);
var record = logScanner.poll(Duration.ofSeconds(10));
record.forEach(r -> _ );
}Once log scanner is started the tokens start to be sent. |
Hi, the security token is not shared above fluss components. Currently, it's only used by fluss-client, fluss-client require a token to read from remote directly. |
luoyuxia
left a comment
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.
@gkatzioura Thanks for the greate work! Left minor comment
fluss-filesystems/fluss-fs-abfs/src/main/java/org/apache/fluss/fs/abfs/AzureFileSystem.java
Outdated
Show resolved
Hide resolved
...fluss-fs-abfs/src/main/java/org/apache/fluss/fs/abfs/token/AzureDelegationTokenProvider.java
Outdated
Show resolved
Hide resolved
...s/src/main/java/org/apache/fluss/fs/abfs/token/DynamicTemporaryAzureCredentialsProvider.java
Outdated
Show resolved
Hide resolved
...uss-fs-azure/src/main/java/org/apache/fluss/fs/azure/token/AzureDelegationTokenReceiver.java
Show resolved
Hide resolved
...uss-fs-azure/src/main/java/org/apache/fluss/fs/azure/token/AzureDelegationTokenReceiver.java
Show resolved
Hide resolved
|
@gkatzioura is there anything else pending here? |
leekeiabstraction
left a comment
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.
Thank you for the PR! Hope you don't mind me reviewing, left a few comments. PTAL!
...uss-fs-azure/src/main/java/org/apache/fluss/fs/azure/token/AzureDelegationTokenReceiver.java
Show resolved
Hide resolved
...fluss-fs-abfs/src/main/java/org/apache/fluss/fs/abfs/token/AzureDelegationTokenReceiver.java
Outdated
Show resolved
Hide resolved
...esystems/fluss-fs-azure/src/test/java/org/apache/fluss/fs/azure/token/AuthServerHandler.java
Outdated
Show resolved
Hide resolved
...ilesystems/fluss-fs-abfs/src/test/java/org/apache/fluss/fs/abfs/token/AuthServerHandler.java
Outdated
Show resolved
Hide resolved
...s-fs-abfs/src/test/java/org/apache/fluss/fs/abfs/token/AzureDelegationTokenProviderTest.java
Outdated
Show resolved
Hide resolved
...fs-azure/src/test/java/org/apache/fluss/fs/azure/token/AzureDelegationTokenProviderTest.java
Show resolved
Hide resolved
...s-fs-abfs/src/test/java/org/apache/fluss/fs/abfs/token/AzureDelegationTokenReceiverTest.java
Outdated
Show resolved
Hide resolved
.../test/java/org/apache/fluss/fs/azure/token/DynamicTemporaryAzureCredentialsProviderTest.java
Show resolved
Hide resolved
...c/test/java/org/apache/fluss/fs/abfs/token/DynamicTemporaryAzureCredentialsProviderTest.java
Outdated
Show resolved
Hide resolved
...stems/fluss-fs-abfs/src/test/java/org/apache/fluss/fs/abfs/AbfsFileSystemBehaviorITCase.java
Outdated
Show resolved
Hide resolved
wuchong
left a comment
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.
@gkatzioura Thanks for the contribution! The implementation looks good to me. I only have some concerns about the naming conventions used in this PR:
1. Module/Artifact Name
The current fluss-fs-abfs uses a specific scheme name ("abfs") rather than the storage service name. Since this module supports multiple schemes (abfs, abfss, wasb, wasbs), the module should be named after the storage service: fluss-fs-azure. azure is more friendly than abfs for users when picking up the filesystem jars. Flink and Hadoop also use the same naming for the modules.
2. Package Name
Same issue applies to the package org.apache.fluss.fs.abfs. It should be: org.apache.fluss.fs.azure.
3. Class Names
It's weird that WasbFileSystemPlugin extends AbfsFileSystemPlugin. We should extract the common logic of AbfsFileSystemPlugin into an abstract class AzureFileSystemPlugin. And making specific azure scheme filesystem plugins extends the AzureFileSystemPlugin. Adding more detailed comment for the abstract class
/**
* Abstract factory for creating Azure Blob Storage file systems. Supports multiple URI schemes
* (abfs, abfss, wasb, wasbs) based on Azure HDFS support in the hadoop-azure module.
*/
abstract class AzureFileSystemPlugin implements FileSystemPlugin {| This project bundles the following dependencies under the BSD license. See bundled license files for details. | ||
|
|
||
| - dnsjava:dnsjava:3.4.0 | ||
| - org.codehaus.woodstox:stax2-api:4.2.1 | ||
|
|
||
| This project bundles the following dependencies under the Go License (https://golang.org/LICENSE). See bundled license files for details. | ||
|
|
||
| - com.google.re2j:re2j:1.1 | ||
|
|
||
| This project bundles the following dependencies under dual license CDDL 1.1 / GPLv2 with Classpath Exception. | ||
| - CDDL 1.1: https://oss.oracle.com/licenses/CDDL-1.1 | ||
| - GPLv2 + CPE: https://openjdk.org/legal/gplv2+ce.html | ||
|
|
||
| - javax.xml.bind:jaxb-api:2.2.2 | ||
| - javax.xml.bind:jaxb-api:2.3.1 | ||
| - javax.activation:activation:1.1 | ||
| - com.sun.xml.bind:jaxb-impl:2.2.3-1 | ||
| - com.github.pjfanning:jersey-json:1.20 | ||
|
|
||
| This project bundles the following dependencies under the Eclipse Distribution License (EDL) 1.0 (https://www.eclipse.org/org/documents/edl-v10.php). See bundled license files for details. | ||
|
|
||
| - jakarta.activation:jakarta.activation-api:1.2.1 |
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.
This change introduces many Category B dependencies. According to Apache Software Foundation policy, all Category B dependencies require a corresponding LICENSE-xxx notice in the resource folder. These dependencies are likely pulled in because of a direct dependency on hadoop-common.
To avoid this, please try replacing the direct hadoop-common dependency with fluss-fs-hadoop-shaded. This shaded artifact should encapsulate those transitive dependencies and may eliminate the need to declare them explicitly in the NOTICE file.
...filesystems/fluss-fs-azure/src/main/java/org/apache/fluss/fs/azure/AbfsFileSystemPlugin.java
Outdated
Show resolved
Hide resolved
fluss-filesystems/fluss-fs-gs/src/test/java/org/apache/fluss/fs/gs/AuthServerHandler.java
Show resolved
Hide resolved
...esystems/fluss-fs-azure/src/test/java/org/apache/fluss/fs/azure/token/AuthServerHandler.java
Outdated
Show resolved
Hide resolved
...filesystems/fluss-fs-azure/src/main/java/org/apache/fluss/fs/azure/WasbFileSystemPlugin.java
Outdated
Show resolved
Hide resolved
...uss-fs-azure/src/main/java/org/apache/fluss/fs/azure/token/AzureDelegationTokenReceiver.java
Outdated
Show resolved
Hide resolved
...filesystems/fluss-fs-azure/src/main/java/org/apache/fluss/fs/azure/AbfsFileSystemPlugin.java
Outdated
Show resolved
Hide resolved
fluss-filesystems/fluss-fs-azure/src/main/java/org/apache/fluss/fs/azure/AzureFileSystem.java
Outdated
Show resolved
Hide resolved
|
Also, since the branch is far behind |


Purpose
Linked issue: close #1311
Add File System support for Azure Blob Storage.
Brief change log
Tests
API and Format
Documentation