reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-2022) AzureBlockBlobFileSystem (REEF) - GetChildren does not work for containers
Date Thu, 07 Jun 2018 21:31:00 GMT

    [ https://issues.apache.org/jira/browse/REEF-2022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505316#comment-16505316
] 

ASF GitHub Bot commented on REEF-2022:
--------------------------------------

tyclintw commented on a change in pull request #1464: [REEF-2022] Fixed AzureBlockBlobFileSystem.GetChildren
api and unit tests
URL: https://github.com/apache/reef/pull/1464#discussion_r190344273
 
 

 ##########
 File path: lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
 ##########
 @@ -138,6 +139,54 @@ public void TestDeleteE2E()
             Assert.False(CheckBlobExists(blob));
         }
 
+        [Fact(Skip = SkipMessage)]
+        public void TestGetChildBlobsInContainerE2E()
+        {
+            // setup
+            string[] parentFileNames = new string[] { "sample1", "sample2", "sample3" };
+            string[] folderfileNames = new string[] { "folder1/sample4", "folder1/sample5"
};
+            string[] parentListNames = new string[] { "sample1", "sample2", "sample3", "folder1/"
};
 
 Review comment:
   These three arrays and their naming conventions make if very difficult to follow your logic.
Can this be simplified with one list and the use of select statements? Something like the
following. At the very least change parentFileNames to a concrete list so the concat at 150
isn't necessary. 
   ```csharp
   string[] fileNames = new string[] { "sample1", "sample2", "sample3", "folder1/sample4",
"folder1/sample5" };
   
   var rootFilenames = fileNames.GroupBy(f => f.Split('/')[0]).Select(g => g.Key);
   ValidateChildenWithBlobs(_container.Uri, rootFilenames);
   
   var folderBlobs = fileNames.Where(f => f.StartsWith("folder1");
   ValidateChildenWithBlobs(folderUri, folderBlobs);
   ```
   OR
   ```csharp
   string[] fileNames = new string[] { "sample1", "sample2", "sample3","folder1/sample4",
"folder1/sample5" };
   string[] expectedFolderChildren = new string[] { "folder1/sample4", "folder1/sample5" };
   string[] expectedRootChildren = new string[] { "sample1", "sample2", "sample3", "folder1/"
};
   ``` #Closed

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> AzureBlockBlobFileSystem (REEF) - GetChildren does not work for containers
> --------------------------------------------------------------------------
>
>                 Key: REEF-2022
>                 URL: https://issues.apache.org/jira/browse/REEF-2022
>             Project: REEF
>          Issue Type: Bug
>          Components: REEF.NET IO
>    Affects Versions: 0.16
>            Reporter: Sharath Malladi
>            Assignee: Sharath Malladi
>            Priority: Major
>
> Repro steps:
> 1. Created a container with multiple files. https://tyclintwscratchstg.blob.core.windows.net/testcontainer/
> 2. Call AzureBlockBlobFileSystem.GetChildren("https://tyclintwscratchstg.blob.core.windows.net/testcontainer/");
>  
> Actual result:
> Throws the exception "The remote server returned an error: (404) Not Found."
>  
> Expected result:
> The files are properly listed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message