OpenFilesIterator (Apache Hadoop HDFS Client 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.protocol, class: OpenFilesIterator

Package org.apache.hadoop.hdfs.protocol

# Class OpenFilesIterator

java.lang.Object
org.apache.hadoop.fs.BatchedRemoteIterator<Long,OpenFileEntry>
org.apache.hadoop.hdfs.protocol.OpenFilesIterator

All Implemented Interfaces:
  `org.apache.hadoop.fs.RemoteIterator<OpenFileEntry>`

@Private @Evolving public class OpenFilesIterator extends org.apache.hadoop.fs.BatchedRemoteIterator<Long,OpenFileEntry>
OpenFilesIterator is a remote iterator that iterates over the open files list managed by the NameNode. Since the list is retrieved in batches, it does not represent a consistent view of all open files.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `OpenFilesIterator.OpenFilesType`
  Open file types to filter the results.

  ## Nested classes/interfaces inherited from class org.apache.hadoop.fs.BatchedRemoteIterator

  `org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<E extends Object>, org.apache.hadoop.fs.BatchedRemoteIterator.BatchedListEntries<E extends Object>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `FILTER_PATH_DEFAULT`
  No path to be filtered by default.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenFilesIterator(ClientProtocol namenode, org.apache.hadoop.tracing.Tracer tracer, EnumSet<OpenFilesIterator.OpenFilesType> types, String path)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Long`
  `elementToPrevKey(OpenFileEntry entry)`
  `org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<OpenFileEntry>`
  `makeRequest(Long prevId)`

  ### Methods inherited from class org.apache.hadoop.fs.BatchedRemoteIterator

  `hasNext, next`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FILTER_PATH_DEFAULT

    public static final String FILTER_PATH_DEFAULT
    No path to be filtered by default.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### OpenFilesIterator

    public OpenFilesIterator(ClientProtocol namenode, org.apache.hadoop.tracing.Tracer tracer, EnumSet<OpenFilesIterator.OpenFilesType> types, String path)

- ## Method Details

  - ### makeRequest

    public org.apache.hadoop.fs.BatchedRemoteIterator.BatchedEntries<OpenFileEntry> makeRequest(Long prevId) throws IOException
    Specified by:
      `makeRequest` in class `org.apache.hadoop.fs.BatchedRemoteIterator<Long,OpenFileEntry>`
    Throws:
      `IOException`

  - ### elementToPrevKey

    public Long elementToPrevKey(OpenFileEntry entry)
    Specified by:
      `elementToPrevKey` in class `org.apache.hadoop.fs.BatchedRemoteIterator<Long,OpenFileEntry>`