From dev-return-16638-archive-asf-public=cust-asf.ponee.io@reef.apache.org Thu Jun 7 23:31:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id AF8D6180663 for ; Thu, 7 Jun 2018 23:31:06 +0200 (CEST) Received: (qmail 38484 invoked by uid 500); 7 Jun 2018 21:31:05 -0000 Mailing-List: contact dev-help@reef.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@reef.apache.org Delivered-To: mailing list dev@reef.apache.org Received: (qmail 38472 invoked by uid 99); 7 Jun 2018 21:31:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2018 21:31:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 490C61A3997 for ; Thu, 7 Jun 2018 21:31:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ZQIo5ryxCvEp for ; Thu, 7 Jun 2018 21:31:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D13945F5FC for ; Thu, 7 Jun 2018 21:31:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 96A96E0F99 for ; Thu, 7 Jun 2018 21:31:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A01C221207 for ; Thu, 7 Jun 2018 21:31:00 +0000 (UTC) Date: Thu, 7 Jun 2018 21:31:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@reef.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (REEF-2022) AzureBlockBlobFileSystem (REEF) - GetChildren does not work for containers MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/REEF-2022?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16505= 317#comment-16505317 ]=20 ASF GitHub Bot commented on REEF-2022: -------------------------------------- tyclintw commented on a change in pull request #1464: [REEF-2022] Fixed Azu= reBlockBlobFileSystem.GetChildren api and unit tests URL: https://github.com/apache/reef/pull/1464#discussion_r190330416 =20 =20 ########## File path: lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2= E.cs ########## @@ -138,6 +139,54 @@ public void TestDeleteE2E() Assert.False(CheckBlobExists(blob)); } =20 + [Fact(Skip =3D SkipMessage)] + public void TestGetChildBlobsInContainerE2E() + { + // setup + string[] parentFileNames =3D new string[] { "sample1", "sample= 2", "sample3" }; + string[] folderfileNames =3D new string[] { "folder1/sample4",= "folder1/sample5" }; + string[] parentListNames =3D new string[] { "sample1", "sample= 2", "sample3", "folder1/" }; + + foreach (string uploadedBlobName in parentFileNames.Concat(fol= derfileNames)) + { + CloudBlockBlob blob =3D _container.GetBlockBlobReference(u= ploadedBlobName); + UploadFromString(blob, "hello"); + } + + // List files in the root level in container + ValidateChildenWithBlobs(_container.Uri, parentListNames); + + // List files only in the sub-folder in the container + Uri folderUri =3D _container.GetDirectoryReference("folder1").= Uri; + ValidateChildenWithBlobs(folderUri, folderfileNames); + } + + [Fact(Skip =3D SkipMessage)] + public void TestGetChildContainerInStorageAccountE2E() + { + // List containers in the storage account + Uri rootUri =3D _fileSystem.CreateUriForPath(string.Empty); + ValidateChildrenWithContainers(rootUri, new string[] { _contai= ner.Name }); + } + + public void ValidateChildenWithBlobs(Uri storageBlobUri, IEnumerab= le expectedChildBlobNames) + { + IEnumerable blobs =3D _fileSystem.GetChildren(storageBlob= Uri).ToList(); + IEnumerable blobNames =3D blobs.Select(b =3D> b.LocalP= ath.Replace("/" + _container.Name + "/", string.Empty)); + + Assert.True(expectedChildBlobNames.All(blobName =3D> blobNames= .Contains(blobName)), "blobNames has elements that are not in expectedChild= BlobNames"); + Assert.Equal(expectedChildBlobNames.Count(), blobNames.Count()= ); =20 Review comment: Unnecessary if CollectionAssert is used. #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. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > AzureBlockBlobFileSystem (REEF) - GetChildren does not work for container= s > -------------------------------------------------------------------------= - > > 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.bl= ob.core.windows.net/testcontainer/ > 2. Call AzureBlockBlobFileSystem.GetChildren("https://tyclintwscratchstg.= blob.core.windows.net/testcontainer/"); > =C2=A0 > Actual result: > Throws the exception "The remote server returned an error: (404) Not Foun= d." > =C2=A0 > Expected result: > The files are properly listed. -- This message was sent by Atlassian JIRA (v7.6.3#76005)