Package org.apache.hadoop.fs.shell

Examples of org.apache.hadoop.fs.shell.PathData


   
    FileStatus fourDaysStat = mock(FileStatus.class);
    when(fourDaysStat.getAccessTime()).thenReturn(NOW - (4l * DAY));
    when(fourDaysStat.toString()).thenReturn("fourDays");
    fs.setFileStatus("fourDays", fourDaysStat);
    fourDays = new PathData("fourDays", conf);

    FileStatus fiveDaysStat = mock(FileStatus.class);
    when(fiveDaysStat.getAccessTime()).thenReturn(NOW - (5l * DAY));
    when(fiveDaysStat.toString()).thenReturn("fiveDays");
    fs.setFileStatus("fiveDays", fiveDaysStat);
    fiveDays = new PathData("fiveDays", conf);

    FileStatus fiveDaysMinus1Stat = mock(FileStatus.class);
    when(fiveDaysMinus1Stat.getAccessTime()).thenReturn(NOW - ((5l * DAY) - 1));
    when(fiveDaysMinus1Stat.toString()).thenReturn("fiveDaysMinus");
    fs.setFileStatus("fiveDaysMinus", fiveDaysMinus1Stat);
    fiveDaysMinus = new PathData("fiveDaysMinus", conf);

    FileStatus sixDaysStat = mock(FileStatus.class);
    when(sixDaysStat.getAccessTime()).thenReturn(NOW - (6l * DAY));
    when(sixDaysStat.toString()).thenReturn("sixDays");
    fs.setFileStatus("sixDays", sixDaysStat);
    sixDays = new PathData("sixDays", conf);

    FileStatus sixDaysMinus1Stat = mock(FileStatus.class);
    when(sixDaysMinus1Stat.getAccessTime()).thenReturn(NOW - ((6l * DAY) - 1));
    when(sixDaysMinus1Stat.toString()).thenReturn("fiveDaysPlus");
    fs.setFileStatus("fiveDaysPlus", sixDaysMinus1Stat);
    fiveDaysPlus = new PathData("fiveDaysPlus", conf);

  }
View Full Code Here


    MockFileSystem.reset();
    fs = new MockFileSystem();
    conf = fs.getConf();
    fileStatus = mock(FileStatus.class);
    fs.setFileStatus("test", fileStatus);
    item = new PathData("/one/two/test", conf);

    nogroup = new Nogroup();
    nogroup.initialise(new FindOptions());
  }
View Full Code Here

  @Test
  public void testPass()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.PASS);
   
    Expression second = mock(Expression.class);
View Full Code Here

  @Test
  public void testFailFirst()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.FAIL);
   
    Expression second = mock(Expression.class);
View Full Code Here

  @Test
  public void testFailSecond()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.PASS);
   
    Expression second = mock(Expression.class);
View Full Code Here

  }
  @Test
  public void testFailBoth()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.FAIL);
   
    Expression second = mock(Expression.class);
View Full Code Here

  @Test
  public void testStopFirst()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.STOP);
   
    Expression second = mock(Expression.class);
View Full Code Here

  @Test
  public void testStopSecond()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.PASS);
   
    Expression second = mock(Expression.class);
View Full Code Here

  @Test
  public void testStopFail()  throws IOException {
    Or or = new Or();
   
    PathData pathData = mock(PathData.class);
   
    Expression first = mock(Expression.class);
    when(first.apply(pathData)).thenReturn(Result.FAIL);
   
    Expression second = mock(Expression.class);
View Full Code Here

    MockFileSystem.reset();
    fs = new MockFileSystem();
    conf = fs.getConf();
    fileStatus = mock(FileStatus.class);
    fs.setFileStatus("test", fileStatus);
    item = new PathData("/one/two/test", conf);

    nouser = new Nouser();
    nouser.initialise(new FindOptions());
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.shell.PathData

Copyright © 2018 www.massapicom. 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.