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;
   }
 }
 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;
   }
 }