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