Skip to content
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

[FLINK-18562] Support for Hadoop ABFS for Azure Datalake Gen2 accounts #16559

Merged
merged 2 commits into from
Aug 11, 2021

Conversation

srinipunuru
Copy link
Contributor

@srinipunuru srinipunuru commented Jul 21, 2021

What is the purpose of the change

This pull request adds support for abfs to talk to ADLS Gen2 (Azure DataLake Gen2) storage accounts. These are newer storage account types that hierarchical namespaces, abfs takes advantage of this newer capability. Azure recommends using abfs for reading/writing to these newer storage accounts.

Brief change log

  • Upgrade the hadoop version to latest. Existing version that flink depends on doesn't have hadoop abfs implementation.
  • Added support for two new schemes (abfs:// and abfss://)
  • Added english documentation.

Verifying this change

  • Ran existing tests to make sure there are no regressions
  • Added few trivial unit tests. File system implementations are really hard to test using unit tests. Existing filesystems unit tests seems to be super thin.
  • Tested abfs, abfss manually using a flink clusters on AKS using the instructions here

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (yes / no)
  • The serializers: (yes / no / don't know)
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know)
  • The S3 file system connector: (yes / no / don't know) - Because of the upgrade of the hadoop version

Documentation

  • Does this pull request introduce a new feature? (yes / no)
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) - Yes (English version)

@flinkbot
Copy link
Collaborator

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit 7b469bc (Wed Jul 21 21:13:00 UTC 2021)

Warnings:

  • 1 pom.xml files were touched: Check for build and licensing issues.
  • Documentation files were touched, but no docs/content.zh/ files: Update Chinese documentation or file Jira ticket.
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented Jul 21, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@srinipunuru
Copy link
Contributor Author

@flinkbot run azure

@srinipunuru
Copy link
Contributor Author

Tagging @AHeise who is helping review this one.

Copy link
Contributor

@AHeise AHeise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for contributing! The code looks quite good already. I made a suggestion to disentangle the abstract factory from the specific factories.
Please double-check the licenses - two new modules are added; just to be safe.

Concerning testing your changes (and actually also the existing FS): there is now azurite available which we could use inside a testcontainer to have an ad-hoc blob storage. It would be a blast if you could add respective ITCases. I can give more detailed pointers or we create a follow-up task.

Copy link

@izzyacademy izzyacademy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srinipunuru I want to thank you very much for taking the time to work on this implementation. I am going to review the changes in more detail and I can work with you to update the Flink Documentation as soon as this PR is merged.

I will be reviewing your changes in this PR shortly.

Thanks again.

org.apache.hadoop.fs.FileSystem azureFS = new NativeAzureFileSystem();
azureFS.initialize(fsUri, hadoopConfig);
return azureFS;
} else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check if the scheme prefix starts with "abfs" here to cover both the secure and none secure schemes without including other schemes that are non Azure file systems?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, But anyway this code is going to get refactored and this if else condition will go away.

@srinipunuru
Copy link
Contributor Author

Thank you very much for contributing! The code looks quite good already. I made a suggestion to disentangle the abstract factory from the specific factories.
Please double-check the licenses - two new modules are added; just to be safe.

Concerning testing your changes (and actually also the existing FS): there is now azurite available which we could use inside a testcontainer to have an ad-hoc blob storage. It would be a blast if you could add respective ITCases. I can give more detailed pointers or we create a follow-up task.

Thanks for the Pointers @AHeise, I did some digging last few days on the azurite. There is good news and bad news, Good news is, It looks like we could use that for testing with Azure storage with wasb:// (which is the legacy hdfs driver). It doesn't yet support the abfs and ADLS Gen2 Azure/Azurite#553.

I could add a follow up task to add a end to end test with Azurite for wasb. What do you think?

@AHeise
Copy link
Contributor

AHeise commented Aug 5, 2021

Thanks for the Pointers @AHeise, I did some digging last few days on the azurite. There is good news and bad news, Good news is, It looks like we could use that for testing with Azure storage with wasb:// (which is the legacy hdfs driver). It doesn't yet support the abfs and ADLS Gen2 Azure/Azurite#553.

I could add a follow up task to add a end to end test with Azurite for wasb. What do you think?
Thank you for investigating. I agree that a follow-up ticket is sufficient in this case as we cannot test the new features anyways. It would give us a bit more reassurance concerning the refactoring but I see it as an independent effort.

I suggest that once the commits are finished, you could do a final manual test with all 4 schemes and briefly mention it here.

@srinipunuru
Copy link
Contributor Author

Thanks a lot for reviewing this @AHeise. I updated the PR and I think i have addressed all of the comments. I verified the latest PR with all wasb/wasbss and abfs/abfss end to end. Please let me know if there is anything else pending to merge this PR. Thanks for your help.

@AHeise
Copy link
Contributor

AHeise commented Aug 10, 2021

Thanks a lot for reviewing this @AHeise. I updated the PR and I think i have addressed all of the comments. I verified the latest PR with all wasb/wasbss and abfs/abfss end to end. Please let me know if there is anything else pending to merge this PR. Thanks for your help.

Thank you again for your contribution and the quick responses. Except for the smaller suggestion of @izzyacademy , everything looks good. Could you please prefix all commits with [FLINK-18562][fs]? Then it's easier to see what the commits are about when they are merged into master.

@srinipunuru srinipunuru force-pushed the abfs branch 3 times, most recently from 08e8313 to 8149b8c Compare August 10, 2021 22:17
@srinipunuru
Copy link
Contributor Author

Thanks a lot for reviewing this @AHeise. I updated the PR and I think i have addressed all of the comments. I verified the latest PR with all wasb/wasbss and abfs/abfss end to end. Please let me know if there is anything else pending to merge this PR. Thanks for your help.

Thank you again for your contribution and the quick responses. Except for the smaller suggestion of @izzyacademy , everything looks good. Could you please prefix all commits with [FLINK-18562][fs]? Then it's easier to see what the commits are about when they are merged into master.

Thanks @AHeise I have addressed the comments and also updated the commit messages according to the convention followed. Thanks again for taking time to review this :)

Copy link
Contributor

@AHeise AHeise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you very much for the contribution. I'm merging now.

@AHeise AHeise merged commit 0acac53 into apache:master Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants