org.apache.hadoop.hdfs.server.namenode.snapshot

## Class DirectoryWithSnapshotFeature.DirectoryDiff

- java.lang.Object
- - org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.DirectoryDiff

- All Implemented Interfaces:
    Comparable<Integer>
  Enclosing class:
    org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature

      public static class DirectoryWithSnapshotFeature.DirectoryDiff
      extends Object

  The difference of an `INodeDirectory` between two snapshots.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirectoryDiff(int snapshotId, INodeDirectory dir, org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff diff)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(Integer that)` Compare diffs with snapshot ID.
    `org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff` | `getChildrenDiff()`
    `int` | `getSnapshotId()`
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### DirectoryDiff

          public DirectoryDiff(int snapshotId,
                               INodeDirectory dir,
                               org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff diff)

  - ### Method Detail

    - #### getChildrenDiff

          public org.apache.hadoop.hdfs.server.namenode.snapshot.DirectoryWithSnapshotFeature.ChildrenDiff getChildrenDiff()

    - #### toString

          public String toString()

    - #### compareTo

          public final int compareTo(Integer that)

      Compare diffs with snapshot ID.
      Specified by:
        `compareTo` in interface `Comparable<Integer>`

    - #### getSnapshotId

          public final int getSnapshotId()

      Returns:
        the snapshot object of this diff.

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.