Example #1
0
 /// <exception cref="Org.Apache.Hadoop.Hdfs.Protocol.SnapshotException"/>
 private void CheckNestedSnapshottable(INodeDirectory dir, string path)
 {
     if (allowNestedSnapshots)
     {
         return;
     }
     foreach (INodeDirectory s in snapshottables.Values)
     {
         if (s.IsAncestorDirectory(dir))
         {
             throw new SnapshotException("Nested snapshottable directories not allowed: path="
                                         + path + ", the subdirectory " + s.GetFullPathName() + " is already a snapshottable directory."
                                         );
         }
         if (dir.IsAncestorDirectory(s))
         {
             throw new SnapshotException("Nested snapshottable directories not allowed: path="
                                         + path + ", the ancestor " + s.GetFullPathName() + " is already a snapshottable directory."
                                         );
         }
     }
 }