/** * Given an INode get all the path complents leading to it from the root. * If an Inode corresponding to C is given in /A/B/C, the returned * patch components will be {root, A, B, C}. * Note that this method cannot handle scenarios where the inode is in a * snapshot. */ public static byte[][] getPathComponents(INode inode) { List<byte[]> components = new ArrayList<byte[]>(); components.add(0, inode.getLocalNameBytes()); while(inode.getParent() != null) { components.add(0, inode.getParent().getLocalNameBytes()); inode = inode.getParent(); } return components.toArray(new byte[components.size()][]); }
allComponentList.add(subINodePath.get(i).getLocalNameBytes());
dir.getFsPermission(), EnumSet.noneOf(HdfsFileStatus.Flags.class), dir.getUserName(), dir.getGroupName(), dir.getLocalNameBytes(), dir.getId(), dir.getChildrenNum(Snapshot.CURRENT_STATE_ID), dir.getDirectorySnapshottableFeature().getNumSnapshots(),
/** * Given an INode get all the path complents leading to it from the root. * If an Inode corresponding to C is given in /A/B/C, the returned * patch components will be {root, A, B, C}. * Note that this method cannot handle scenarios where the inode is in a * snapshot. */ public static byte[][] getPathComponents(INode inode) { List<byte[]> components = new ArrayList<byte[]>(); components.add(0, inode.getLocalNameBytes()); while(inode.getParent() != null) { components.add(0, inode.getParent().getLocalNameBytes()); inode = inode.getParent(); } return components.toArray(new byte[components.size()][]); }
/** * Given an INode get all the path complents leading to it from the root. * If an Inode corresponding to C is given in /A/B/C, the returned * patch components will be {root, A, B, C}. * Note that this method cannot handle scenarios where the inode is in a * snapshot. */ public static byte[][] getPathComponents(INode inode) { List<byte[]> components = new ArrayList<byte[]>(); components.add(0, inode.getLocalNameBytes()); while(inode.getParent() != null) { components.add(0, inode.getParent().getLocalNameBytes()); inode = inode.getParent(); } return components.toArray(new byte[components.size()][]); }
dir.getModificationTime(), dir.getAccessTime(), dir.getFsPermission(), dir.getUserName(), dir.getGroupName(), dir.getLocalNameBytes(), dir.getId(), dir.getChildrenNum(Snapshot.CURRENT_STATE_ID), dir.getDirectorySnapshottableFeature().getNumSnapshots(),
dir.getModificationTime(), dir.getAccessTime(), dir.getFsPermission(), dir.getUserName(), dir.getGroupName(), dir.getLocalNameBytes(), dir.getId(), dir.getChildrenNum(Snapshot.CURRENT_STATE_ID), dir.getDirectorySnapshottableFeature().getNumSnapshots(),