-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-18408. ABFS: Setting correct value of requireRenameResilience for nonHNS configuration #4758
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
Conversation
:::: AGGREGATED TEST RESULT :::: HNS-OAuth[INFO] Results: HNS-SharedKey[INFO] Results: NonHNS-SharedKey[INFO] Results: AppendBlob-HNS-OAuth[INFO] Results: Time taken: 60 mins 59 secs. |
...op-azure/src/test/java/org/apache/hadoop/fs/azurebfs/commit/ITestAbfsRenameStageFailure.java
Outdated
Show resolved
Hide resolved
...t/java/org/apache/hadoop/mapreduce/lib/output/committer/manifest/TestRenameStageFailure.java
Outdated
Show resolved
Hide resolved
The latest commit passes the testResilienceAsExpected test in ITestAbfsRenameStageFailure. The requireRenameResilience value is correctly set to False for a nonHNS account, instead of True. This is valid, as etags are not being preserved for nonHNS accounts, it is expected that resilient commits would not be possible. Hence, the requirement is changed to False. |
🎊 +1 overall
This message was automatically generated. |
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.
Changes look good. Congratulations on your first PR :)
Do get the minor extra space in setup method fixed before resolving the respective comment.
...op-azure/src/test/java/org/apache/hadoop/fs/azurebfs/commit/ITestAbfsRenameStageFailure.java
Outdated
Show resolved
Hide resolved
...op-azure/src/test/java/org/apache/hadoop/fs/azurebfs/commit/ITestAbfsRenameStageFailure.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
@steveloughran can you please take a look at this PR? Here is the corresponding JIRA. |
🎊 +1 overall
This message was automatically generated. |
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.
reviewed. the other tests actually interrogate the FS; this is the best way to do it as it guarantees correctness. yes, it's a bit more complicated but it makes for an adaptive test.
@@ -41,6 +42,12 @@ public ITestAbfsRenameStageFailure() throws Exception { | |||
binding = new ABFSContractTestBinding(); | |||
} | |||
|
|||
protected boolean isNamespaceEnabled() { | |||
FileSystem fs = getFileSystem(); | |||
String namespaceEnabled = fs.getConf().get("fs.azure.test.namespace.enabled"); |
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.
there's a Configuration.getBoolean(key, defval) which should be used for evaluating true/false. it knows about trimming strings, case independence etc. have a look at the class and see what else it can do. using the basic get() without a default is generally a rare action.
better.
return conf.getBoolean("fs.azure.test.namespace.enabled", false)
- other tests, specificlly everything under
AbstractAbfsIntegrationTest
, probe the fs for having ACLs and use that to dynamically determine fs capabilities. seegetIsNamespaceEnabled()
for how it is done.
i would prefer you copy the AbstractAbfsIntegrationTest algorithm as it is based on the actual FS capabilities
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.
Have made changes accordingly in the latest commit (picking up file capabilities dynamically instead of from the test config). Can you please take a look at it? Thank you!
...op-azure/src/test/java/org/apache/hadoop/fs/azurebfs/commit/ITestAbfsRenameStageFailure.java
Outdated
Show resolved
Hide resolved
looks good. have you tested it with a hierachical fs to make sure all is good there? |
🎊 +1 overall
This message was automatically generated. |
@steveloughran Yes, tested and it passes for HNS settings too. |
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.
+1
…onfiguration (#4758) ITestAbfsManifestCommitProtocol to set requireRenameResilience to false for nonHNS configuration Contributed by Sree Bhattacharyya
…onfiguration (apache#4758) ITestAbfsManifestCommitProtocol to set requireRenameResilience to false for nonHNS configuration (apache#4758) Contributed by Sree Bhattacharyya
This commit ignores the testResilienceAsExpected test in ITestAbfsRenameStageFailure.
ITestAbfsRenameStageFailure fails for the NonHNS SharedKey configuration -
[ERROR] ITestAbfsRenameStageFailure>TestRenameStageFailure.testResilienceAsExpected:126 [resilient commit support] expected:<[tru]e> but was:<[fals]e>
The check for whether ResilientCommits are possible depends on whether etags are preserved in rename or not. If not, an exception is thrown which leads the ResilientCommitByRename flag to remain set to
null
and ultimately causes the test failure.In case of nonHNS accounts, as etags are not preserved in rename, the test run is not valid. Hence for this particular configuration the test has been ignored.