// Permissions /// <summary>Extract CachePool permissions stored in the fsimage file.</summary> /// <param name="in">Datastream to process</param> /// <param name="v">Visitor to walk over inodes</param> /// <exception cref="System.IO.IOException"/> private void ProcessCachePoolPermission(DataInputStream @in, ImageVisitor v) { v.VisitEnclosingElement(ImageVisitor.ImageElement.Permissions); v.Visit(ImageVisitor.ImageElement.CachePoolOwnerName, Text.ReadString(@in)); v.Visit(ImageVisitor.ImageElement.CachePoolGroupName, Text.ReadString(@in)); FsPermission fsp = new FsPermission(@in.ReadShort()); v.Visit(ImageVisitor.ImageElement.CachePoolPermissionString, fsp.ToString()); v.LeaveEnclosingElement(); }
/// <exception cref="System.IO.IOException"/> protected internal override void CreateDir(Path dirPath, FsPermission perms, bool createParent, string owner) { // WSCE requires dirs to be 750, not 710 as DCE. // This is similar to how LCE creates dirs // perms = new FsPermission(DirPerm); if (Log.IsDebugEnabled()) { Log.Debug(string.Format("createDir: %s perm:%s owner:%s", dirPath.ToString(), perms .ToString(), owner)); } base.CreateDir(dirPath, perms, createParent, owner); lfs.SetOwner(dirPath, owner, nodeManagerGroup); }