Beispiel #1
0
 public virtual void DumpTreeRecursively(INodeDirectory snapshotRoot, PrintWriter
                                         @out, StringBuilder prefix, int snapshot)
 {
     if (snapshot == Org.Apache.Hadoop.Hdfs.Server.Namenode.Snapshot.Snapshot.CurrentStateId)
     {
         @out.WriteLine();
         @out.Write(prefix);
         @out.Write("Snapshot of ");
         string name = snapshotRoot.GetLocalName();
         @out.Write(name.IsEmpty() ? "/" : name);
         @out.Write(": quota=");
         @out.Write(GetSnapshotQuota());
         int n = 0;
         foreach (DirectoryWithSnapshotFeature.DirectoryDiff diff in GetDiffs())
         {
             if (diff.IsSnapshotRoot())
             {
                 n++;
             }
         }
         Preconditions.CheckState(n == snapshotsByNames.Count, "#n=" + n + ", snapshotsByNames.size()="
                                  + snapshotsByNames.Count);
         @out.Write(", #snapshot=");
         @out.WriteLine(n);
         INodeDirectory.DumpTreeRecursively(@out, prefix, new _IEnumerable_416(this));
     }
 }