[
https://issues.apache.org/jira/browse/HADOOP-19766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18050294#comment-18050294
]
ASF GitHub Bot commented on HADOOP-19766:
-----------------------------------------
manika137 commented on code in PR #8152:
URL: https://github.com/apache/hadoop/pull/8152#discussion_r2667306940
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemInitAndCreate.java:
##########
@@ -160,4 +164,53 @@ public void
testFileSystemInitFailsIfNotAbleToDetermineAccountType() throws Exce
FS_AZURE_ACCOUNT_IS_HNS_ENABLED, () ->
mockedFs.initialize(fs.getUri(), getRawConfiguration()));
}
+
+ /**
+ * Test to verify that the fnsEndptConvertedIndicator ("T") is present in
the tracing header
+ * after endpoint conversion during AzureBlobFileSystem initialization.
+ *
+ * @throws Exception if any error occurs during the test
+ */
+ @Test
+ public void testFNSEndptConvertedIndicatorInHeader() throws Exception {
+ assumeHnsDisabled();
+ String scheme = "abfs";
+ String dfsDomain = "dfs.core.windows.net";
+ String endptConversionIndicatorInTc = "T";
+ Configuration conf = new Configuration(getRawConfiguration());
+ conf.setBoolean(AZURE_CREATE_REMOTE_FILESYSTEM_DURING_INITIALIZATION,
true);
+
+ String dfsUri = String.format("%s://%s@%s.%s/",
+ scheme, getFileSystemName(),
+ getAccountName().substring(0, getAccountName().indexOf(DOT)),
+ dfsDomain);
+
+ // Initialize filesystem with DFS endpoint
+ AzureBlobFileSystem fs =
Review Comment:
taken
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestAbfsClient.java:
##########
@@ -850,6 +831,39 @@ public void testAuthTypeProviderSetup(AuthType authType)
throws Exception {
fs.close();
}
+ /**
+ * Test to verify that when initializing a filesystem with a DFS endpoint
for a FNS account,
+ * we force to Blob endpoint internally.
+ *
+ * @throws Exception if the test fails
+ */
+ @Test
+ public void testFNSDfsUsesBlobInstance() throws Exception {
Review Comment:
added
> ABFS: Endpoint Conversion to Blob for FNS Accounts
> --------------------------------------------------
>
> Key: HADOOP-19766
> URL: https://issues.apache.org/jira/browse/HADOOP-19766
> Project: Hadoop Common
> Issue Type: Task
> Components: fs/azure
> Affects Versions: 3.4.1, 3.4.2
> Reporter: Manika Joshi
> Assignee: Manika Joshi
> Priority: Major
> Labels: pull-request-available
>
> We have observed cases of ABFS driver being initialised with DFS for FNS
> accounts which is not a recommended endpoint by the service.
> To prevent this, we’re normalizing endpoint to Blob for FNS accounts even if
> they were initialized with DFS endpoint.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]