Package org.apache.hadoop.fs.shell.find

Examples of org.apache.hadoop.fs.shell.find.Empty.apply()


    PathData item = new PathData("emptyFile", fs.getConf());
   
    Empty empty = new Empty();
    empty.initialise(new FindOptions());

    assertEquals(Result.PASS, empty.apply(item));
  }
 
  @Test
  public void applyNotEmptyFile() throws IOException {
    FileStatus fileStatus = mock(FileStatus.class);
View Full Code Here


    PathData item = new PathData("notEmptyFile", fs.getConf());
   
    Empty empty = new Empty();
    empty.initialise(new FindOptions());

    assertEquals(Result.FAIL, empty.apply(item));
  }

  @Test
  public void applyEmptyDirectory() throws IOException {
    FileStatus fileStatus = mock(FileStatus.class);
View Full Code Here

    PathData item = new PathData("emptyDirectory", fs.getConf());
   
    Empty empty = new Empty();
    empty.initialise(new FindOptions());

    assertEquals(Result.PASS, empty.apply(item));
  }

  @Test
  public void applyNotEmptyDirectory() throws IOException {
    FileStatus fileStatus = mock(FileStatus.class);
View Full Code Here

    PathData item = new PathData("notEmptyDirectory", fs.getConf());
   
    Empty empty = new Empty();
    empty.initialise(new FindOptions());

    assertEquals(Result.PASS, empty.apply(item));
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.