@Test(enabled = false) public void testListFiles() throws IOException, URISyntaxException { HDFSRoot hdfsRoot = new HDFSRoot("/tmp/ListFiles"); MetricsFileSystemInstrumentation fs = (MetricsFileSystemInstrumentation) FileSystem.get(new URI(instrumentedURI), new Configuration()); fs.listFiles(hdfsRoot.getRootPath(), true); Assert.assertEquals(fs.listFilesTimer.getCount(), 1); Assert.assertEquals(fs.listStatusTimer.getCount(), 0); hdfsRoot.cleanupRoot(); }
public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) throws FileNotFoundException, IOException { try (Closeable context = new TimerContextWithLog(this.listFilesTimer.time(), "listFiles", f, recursive)) { return super.listFiles(f, recursive); } }
MetricsFileSystemInstrumentation extends FileSystemInstrumentation { public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) throws FileNotFoundException, IOException { try (Closeable context = new TimerContextWithLog(this.listFilesTimer.time(), "listFiles", f, recursive)) { return super.listFiles(f, recursive); } } }
MetricsFileSystemInstrumentation extends FileSystemInstrumentation { public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) throws FileNotFoundException, IOException { try (Closeable context = new TimerContextWithLog(this.listFilesTimer.time(), "listFiles", f, recursive)) { return super.listFiles(f, recursive); } } MetricsFileSystemInstrumentation(FileSystem underlying); }
MetricsFileSystemInstrumentation extends FileSystemInstrumentation { public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) throws FileNotFoundException, IOException { try (Closeable context = new TimerContextWithLog(this.listFilesTimer.time(), "listFiles", f, recursive)) { return super.listFiles(f, recursive); } } MetricsFileSystemInstrumentation(FileSystem underlying); @Override void close(); boolean mkdirs(Path f, FsPermission permission); boolean rename(Path src, Path dst); boolean delete(Path f, boolean recursive); FileStatus[] listStatus(Path path); FileStatus[] globStatus(Path pathPattern); FileStatus[] globStatus(Path pathPattern, PathFilter filter); RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive); FSDataOutputStream create(Path f,
    FsPermission permission,
    boolean overwrite,
    int bufferSize,
    short replication,
    long blockSize,
    Progressable progress); FSDataInputStream open(Path f, int bufferSize); void setOwner(Path f, String user, String group); FileStatus getFileStatus(Path f); void setPermission(Path f, final FsPermission permission); void setTimes(Path f, long t, long a); FSDataOutputStream append(Path p, final int bufferSize, Progressable progress); void concat(Path trg, Path [] psrcs); }
MetricsFileSystemInstrumentation extends FileSystemInstrumentation { public RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive) throws FileNotFoundException, IOException { try (Closeable context = new TimerContextWithLog(this.listFilesTimer.time(), "listFiles", f, recursive)) { return super.listFiles(f, recursive); } } MetricsFileSystemInstrumentation(FileSystem underlying); @Override void close(); boolean mkdirs(Path f, FsPermission permission); boolean rename(Path src, Path dst); boolean delete(Path f, boolean recursive); FileStatus[] listStatus(Path path); FileStatus[] globStatus(Path pathPattern); FileStatus[] globStatus(Path pathPattern, PathFilter filter); RemoteIterator<LocatedFileStatus> listFiles(Path f, boolean recursive); FSDataOutputStream create(Path f,
    FsPermission permission,
    boolean overwrite,
    int bufferSize,
    short replication,
    long blockSize,
    Progressable progress); FSDataInputStream open(Path f, int bufferSize); void setOwner(Path f, String user, String group); FileStatus getFileStatus(Path f); void setPermission(Path f, final FsPermission permission); void setTimes(Path f, long t, long a); FSDataOutputStream append(Path p, final int bufferSize, Progressable progress); void concat(Path trg, Path [] psrcs);  }