public static DirectoryListing convert(DirectoryListingProto dl) { if (dl == null) return null; List<HdfsFileStatusProto> partList = dl.getPartialListingList(); return new DirectoryListing( partList.isEmpty() ? new HdfsLocatedFileStatus[0] : PBHelper.convert( partList.toArray(new HdfsFileStatusProto[partList.size()])), dl.getRemainingEntries()); }
public static DirectoryListingProto convert(DirectoryListing d) { if (d == null) return null; return DirectoryListingProto.newBuilder(). addAllPartialListing(Arrays.asList( PBHelper.convert(d.getPartialListing()))). setRemainingEntries(d.getRemainingEntries()). build(); }
public static DirectoryListing convert(DirectoryListingProto dl) { if (dl == null) return null; List<HdfsFileStatusProto> partList = dl.getPartialListingList(); return new DirectoryListing(partList.isEmpty() ? new HdfsLocatedFileStatus[0] : convert(partList.toArray(new HdfsFileStatusProto[partList.size()])), dl.getRemainingEntries()); }
public static DirectoryListingProto convert(DirectoryListing d) { if (d == null) return null; return DirectoryListingProto.newBuilder(). addAllPartialListing(Arrays.asList( convert(d.getPartialListing()))). setRemainingEntries(d.getRemainingEntries()). build(); }
public static DirectoryListing convert(DirectoryListingProto dl) throws IOException { if (dl == null) { return null; } List<HdfsFileStatusProto> partList = dl.getPartialListingList(); return new DirectoryListing( partList.isEmpty() ? new HdfsLocatedFileStatus[0] : PBHelper.convert( partList.toArray(new HdfsFileStatusProto[partList.size()])), dl.getRemainingEntries()); }
public static DirectoryListingProto convert(DirectoryListing d) { if (d == null) { return null; } return DirectoryListingProto.newBuilder(). addAllPartialListing( Arrays.asList(PBHelper.convert(d.getPartialListing()))). setRemainingEntries(d.getRemainingEntries()). build(); }