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

HADOOP-19208: [Backport to 3.4][ABFS] Fixing logic to determine HNS nature of account to avoid extra getAcl() calls #6946

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

anujmodi2021
Copy link
Contributor

Jira: https://issues.apache.org/jira/browse/HADOOP-19208
PR merged to trunk: #6893

Original Description of PR

ABFS driver needs to know the type of account being used. It relies on the user to inform the account type using the config fs.azure.account.hns.enabled. If not configured, driver makes a GetAcl Head Call call to determine the account type.
Expectation is getAcl() will fail with 400 Bad Request if made on the FNS Account.
If succeeded or fails with any other error code, it means it's an HNS Account.

Current Implementation:

Today when someone tries to create a new file system, getAcl is called to determine HNS/FNS account. This call fails with 404 as file system is not yet created. Then another getAcl is needed to determine HNS/FNS post filesystem creation. Leading to redundant getAcl calls.

New Implementation

  1. If getAcl fails with 400 then only we will determine the account as HNS disabled. For any other error code including 404, we will infer the account as HNS enabled. getAcl call will continue to throw exception in cases where it fails with non 400 error code as earlier.
  2. In case of 404, getAcl() will still fail as always but store will capture the HNS enabled/disabled to avoid further calls. File system init will not fail for 404 as per the design.
  3. In case of error apart from 400, 404 like 5xx or others, getAcl() will still fail leading to file system initialization failure. Any inference made on account type here won't be used further.

This PR also fixes a test case failing on trunk. testGetAclCallOnHnsConfigAbsence(org.apache.hadoop.fs.azurebfs.ITestAzureBlobFileSystemInitAndCreate)

How was this patch tested?

New test around the production code changes, and existing test suite ran to validate the patch.

Test Suite Results

Metric related tests are fixed in the the #6847

@anujmodi2021
Copy link
Contributor Author


:::: AGGREGATED TEST RESULT ::::

============================================================
HNS-OAuth

[WARNING] Tests run: 141, Failures: 0, Errors: 0, Skipped: 2
[WARNING] Tests run: 623, Failures: 0, Errors: 0, Skipped: 76
[WARNING] Tests run: 414, Failures: 0, Errors: 0, Skipped: 57

============================================================
HNS-SharedKey

[WARNING] Tests run: 141, Failures: 0, Errors: 0, Skipped: 3
[WARNING] Tests run: 623, Failures: 0, Errors: 0, Skipped: 28
[WARNING] Tests run: 414, Failures: 0, Errors: 0, Skipped: 44

============================================================
NonHNS-SharedKey

[WARNING] Tests run: 141, Failures: 0, Errors: 0, Skipped: 9
[WARNING] Tests run: 607, Failures: 0, Errors: 0, Skipped: 268
[WARNING] Tests run: 414, Failures: 0, Errors: 0, Skipped: 47

============================================================
AppendBlob-HNS-OAuth

[WARNING] Tests run: 141, Failures: 0, Errors: 0, Skipped: 2
[WARNING] Tests run: 623, Failures: 0, Errors: 0, Skipped: 78
[WARNING] Tests run: 414, Failures: 0, Errors: 0, Skipped: 81

Time taken: 56 mins 45 secs.

@anujmodi2021 anujmodi2021 marked this pull request as ready for review July 17, 2024 05:56
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 7m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 2 new or modified test files.
_ branch-3.4 Compile Tests _
+1 💚 mvninstall 34m 7s branch-3.4 passed
+1 💚 compile 0m 25s branch-3.4 passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 compile 0m 18s branch-3.4 passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 checkstyle 0m 16s branch-3.4 passed
+1 💚 mvnsite 0m 28s branch-3.4 passed
+1 💚 javadoc 0m 24s branch-3.4 passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 0m 20s branch-3.4 passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 0m 43s branch-3.4 passed
+1 💚 shadedclient 20m 46s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 17s the patch passed
+1 💚 compile 0m 17s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javac 0m 17s the patch passed
+1 💚 compile 0m 15s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 javac 0m 15s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 11s the patch passed
+1 💚 mvnsite 0m 20s the patch passed
+1 💚 javadoc 0m 16s the patch passed with JDK Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2
+1 💚 javadoc 0m 16s the patch passed with JDK Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
+1 💚 spotbugs 0m 42s the patch passed
+1 💚 shadedclient 22m 52s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 1m 52s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 22s The patch does not generate ASF License warnings.
93m 32s
Subsystem Report/Notes
Docker ClientAPI=1.46 ServerAPI=1.46 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6946/1/artifact/out/Dockerfile
GITHUB PR #6946
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux d79aeadf5017 5.15.0-106-generic #116-Ubuntu SMP Wed Apr 17 09:17:56 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / 596fa98
Default Java Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.23+9-post-Ubuntu-1ubuntu120.04.2 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_412-8u412-ga-1~20.04.1-b08
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6946/1/testReport/
Max. process+thread count 553 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6946/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@rakeshadr rakeshadr left a comment

Choose a reason for hiding this comment

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

Thanks @anujmodi2021 for 3.4 patch. +1 LGTM

@rakeshadr rakeshadr merged commit 5f0b151 into apache:branch-3.4 Jul 17, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants