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

ASF GitHub Bot commented on TWILL-208:
--------------------------------------

Github user anew commented on a diff in the pull request:

    https://github.com/apache/twill/pull/26#discussion_r97880251
  
    --- Diff: 
twill-yarn/src/test/java/org/apache/twill/filesystem/HDFSLocationTest.java ---
    @@ -55,11 +55,19 @@ protected LocationFactory createLocationFactory(String 
pathBase) throws Exceptio
     
       // TODO (TWILL-209): figure out how to make MiniDFSCluster enforce 
permissions
       @Ignore
    -  @Test(expected = Exception.class)
       public void testPermissions() throws IOException {
         // create a directory that does not permit anything
         dfsCluster.getFileSystem().mkdir(new Path("/a"), 
FsPermission.valueOf("----------"));
    -    // creating a subdir should fail because even the owner has no write 
permission
    -    dfsCluster.getFileSystem().mkdir(new Path("/a/b"), 
FsPermission.valueOf("----------"));
    +    boolean succeeded = false;
    +    try {
    +      // creating a subdir should fail because even the owner has no write 
permission
    +      dfsCluster.getFileSystem().mkdir(new Path("/a/b"), 
FsPermission.valueOf("----------"));
    +      succeeded = true;
    +    } catch (Exception e) {
    +      // expected; TODO: figure out which exception should the expected 
here, it's not documented
    +    }
    +    if (succeeded) {
    --- End diff --
    
    no I can't because line 66 would catch it.  


> Location should have a way to set permissions when creating directories
> -----------------------------------------------------------------------
>
>                 Key: TWILL-208
>                 URL: https://issues.apache.org/jira/browse/TWILL-208
>             Project: Apache Twill
>          Issue Type: Bug
>            Reporter: Andreas Neumann
>            Assignee: Andreas Neumann
>             Fix For: 0.10.0
>
>
> That is, we need to introduce a method
> {code}
> boolean mkdirs(String permissions);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to