예제 #1
0
 private LocatedFileStatus getLocatedFileStatus(RemoteIterator<LocatedFileStatus> iterator)
     throws IOException {
   try (TimeStat.BlockTimer timer = namenodeStats.getRemoteIteratorNext().time()) {
     return iterator.next();
   } catch (IOException | RuntimeException e) {
     namenodeStats.getRemoteIteratorNext().recordException(e);
     throw e;
   }
 }
예제 #2
0
 private RemoteIterator<LocatedFileStatus> getLocatedFileStatusRemoteIterator(Path path)
     throws IOException {
   try (TimeStat.BlockTimer timer = namenodeStats.getListLocatedStatus().time()) {
     return directoryLister.list(fileSystem, path);
   } catch (IOException | RuntimeException e) {
     namenodeStats.getListLocatedStatus().recordException(e);
     throw e;
   }
 }