@Test public void listStatusRecursive() throws Exception { mFs.listStatus(DIR, LIST_STATUS_OPTIONS.toBuilder().setRecursive(true).build()); verifyListStatusThroughRPC(DIR, 1); mFs.listStatus(DIR, LIST_STATUS_OPTIONS.toBuilder().setRecursive(true).build()); verifyListStatusThroughRPC(DIR, 2); }
@Override public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException { checkUri(path); if (options.getRecursive()) { return super.listStatus(path, options); } List<URIStatus> statuses = mMetadataCache.listStatus(path); if (statuses == null) { statuses = super.listStatus(path, options); mMetadataCache.put(path, statuses); } return statuses; }
MetadataCachingBaseFileSystem extends BaseFileSystem { @Override public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException { checkUri(path); if (options.getRecursive()) { return super.listStatus(path, options); } List<URIStatus> statuses = mMetadataCache.listStatus(path); if (statuses == null) { statuses = super.listStatus(path, options); mMetadataCache.put(path, statuses); } return statuses; } }
MetadataCachingBaseFileSystem extends BaseFileSystem { @Override public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException { checkUri(path); if (options.getRecursive()) { return super.listStatus(path, options); } List<URIStatus> statuses = mMetadataCache.listStatus(path); if (statuses == null) { statuses = super.listStatus(path, options); mMetadataCache.put(path, statuses); } return statuses; } MetadataCachingBaseFileSystem(FileSystemContext context); }
MetadataCachingBaseFileSystem extends BaseFileSystem { @Override public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException { checkUri(path); if (options.getRecursive()) { return super.listStatus(path, options); } List<URIStatus> statuses = mMetadataCache.listStatus(path); if (statuses == null) { statuses = super.listStatus(path, options); mMetadataCache.put(path, statuses); } return statuses; } MetadataCachingBaseFileSystem(FileSystemContext context); @Override URIStatus getStatus(AlluxioURI path, GetStatusPOptions options); @Override List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options); @VisibleForTesting void asyncUpdateFileAccessTime(AlluxioURI path); @Override synchronized void close(); }
MetadataCachingBaseFileSystem extends BaseFileSystem { @Override public List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options) throws FileDoesNotExistException, IOException, AlluxioException { checkUri(path); if (options.getRecursive()) { return super.listStatus(path, options); } List<URIStatus> statuses = mMetadataCache.listStatus(path); if (statuses == null) { statuses = super.listStatus(path, options); mMetadataCache.put(path, statuses); } return statuses; } MetadataCachingBaseFileSystem(FileSystemContext context); @Override URIStatus getStatus(AlluxioURI path, GetStatusPOptions options); @Override List<URIStatus> listStatus(AlluxioURI path, ListStatusPOptions options); @VisibleForTesting void asyncUpdateFileAccessTime(AlluxioURI path); @Override synchronized void close();  }