示例#1
0
 public virtual string GetPath(int pos)
 {
     return(DFSUtil.ByteArray2PathString(path, 0, pos));
 }
示例#2
0
        private string ToString(bool vaildateObject)
        {
            if (vaildateObject)
            {
                Validate();
            }
            StringBuilder b = new StringBuilder(GetType().Name).Append(": path = ").Append(DFSUtil
                                                                                           .ByteArray2PathString(path)).Append("\n  inodes = ");

            if (inodes == null)
            {
                b.Append("null");
            }
            else
            {
                if (inodes.Length == 0)
                {
                    b.Append("[]");
                }
                else
                {
                    b.Append("[").Append(ToString(inodes[0]));
                    for (int i = 1; i < inodes.Length; i++)
                    {
                        b.Append(", ").Append(ToString(inodes[i]));
                    }
                    b.Append("], length=").Append(inodes.Length);
                }
            }
            b.Append("\n  isSnapshot        = ").Append(isSnapshot).Append("\n  snapshotId        = "
                                                                           ).Append(snapshotId);
            return(b.ToString());
        }
示例#3
0
 /// <returns>the full path in string form</returns>
 public virtual string GetPath()
 {
     return(DFSUtil.ByteArray2PathString(path));
 }