internal static Org.Apache.Hadoop.Hdfs.Server.Namenode.INodesInPath FromINode(INode inode) { int depth = 0; int index; INode tmp = inode; while (tmp != null) { depth++; tmp = tmp.GetParent(); } byte[][] path = new byte[depth][]; INode[] inodes = new INode[depth]; tmp = inode; index = depth; while (tmp != null) { index--; path[index] = tmp.GetKey(); inodes[index] = tmp; tmp = tmp.GetParent(); } return(new Org.Apache.Hadoop.Hdfs.Server.Namenode.INodesInPath(inodes, path)); }