Snapshot implements Comparable<byte[]> { Snapshot(long id, String name, INodeDirectorySnapshottable dir) { this(id, dir, dir); this.root.setLocalName(DFSUtil.string2Bytes(name)); } Snapshot(long id, String name, INodeDirectorySnapshottable dir);   Snapshot(long id, INodeDirectory dir, INodeDirectorySnapshottable parent); static String generateDefaultSnapshotName(); static String getSnapshotPath(String snapshottableDir,
      String snapshotRelativePath); static long getSnapshotId(Snapshot s); static long findLatestSnapshot(INode inode, final long anchor); long getId(); Root getRoot(); @Override int compareTo(byte[] bytes); @Override boolean equals(Object that); @Override int hashCode(); @Override String toString(); static final long CURRENT_STATE_ID; static final long NO_SNAPSHOT_ID; static final Comparator<Snapshot> ID_COMPARATOR; static final Comparator<Integer> ID_INTEGER_COMPARATOR; static final Comparator<Long> ID_LONG_COMPARATOR; }
@Test public void testSnapshot() throws Throwable { try { runTestSnapshot(SNAPSHOT_ITERATION_NUMBER); } catch(Throwable t) { SnapshotTestHelper.LOG.info("FAILED", t); SnapshotTestHelper.dumpTree("FAILED", cluster); throw t; } }