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

Package org.apache.hadoop.hdfs.protocol

# Class SnapshotDiffReport

java.lang.Object
org.apache.hadoop.hdfs.protocol.SnapshotDiffReport

public class SnapshotDiffReport extends Object
This class represents to end users the difference between two snapshots of the same directory, or the difference between a snapshot of the directory and its current state. Instead of capturing all the details of the diff, this class only lists where the changes happened and their types.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `SnapshotDiffReport.DiffReportEntry`
  Representing the full path and diff type of a file/directory where changes have happened.
  `static class`
  `SnapshotDiffReport.DiffStats`
  Records the stats related to Snapshot diff operation.
  `static enum`
  `SnapshotDiffReport.DiffType`
  Types of the difference, which include CREATE, MODIFY, DELETE, and RENAME.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SnapshotDiffReport(String snapshotRoot, String fromSnapshot, String toSnapshot, List<SnapshotDiffReport.DiffReportEntry> entryList)`
  `SnapshotDiffReport(String snapshotRoot, String fromSnapshot, String toSnapshot, SnapshotDiffReport.DiffStats dStat, List<SnapshotDiffReport.DiffReportEntry> entryList)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<SnapshotDiffReport.DiffReportEntry>`
  `getDiffList()`
  `String`
  `getFromSnapshot()`
  `String`
  `getLaterSnapshotName()`
  `String`
  `getSnapshotRoot()`
  `SnapshotDiffReport.DiffStats`
  `getStats()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### SnapshotDiffReport

    public SnapshotDiffReport(String snapshotRoot, String fromSnapshot, String toSnapshot, List<SnapshotDiffReport.DiffReportEntry> entryList)

  - ### SnapshotDiffReport

    public SnapshotDiffReport(String snapshotRoot, String fromSnapshot, String toSnapshot, SnapshotDiffReport.DiffStats dStat, List<SnapshotDiffReport.DiffReportEntry> entryList)

- ## Method Details

  - ### getSnapshotRoot

    public String getSnapshotRoot()
    Returns:
      `snapshotRoot`

  - ### getFromSnapshot

    public String getFromSnapshot()
    Returns:
      `fromSnapshot`

  - ### getLaterSnapshotName

    public String getLaterSnapshotName()
    Returns:
      `toSnapshot`

  - ### getStats

    public SnapshotDiffReport.DiffStats getStats()

  - ### getDiffList

    public List<SnapshotDiffReport.DiffReportEntry> getDiffList()
    Returns:
      `diffList`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`