use of org.javaswift.joss.model.PaginationMap in project alluxio by Alluxio.
the class SwiftUnderFileSystem method getObjectListingChunk.
@Override
protected ObjectListingChunk getObjectListingChunk(String key, boolean recursive) throws IOException {
Container container = mAccount.getContainer(mContainerName);
String prefix = PathUtils.normalizePath(key, PATH_SEPARATOR);
// In case key is root (empty string) do not normalize prefix
prefix = prefix.equals(PATH_SEPARATOR) ? "" : prefix;
PaginationMap paginationMap = container.getPaginationMap(prefix, getListingChunkLength());
if (paginationMap != null && paginationMap.getNumberOfPages() > 0) {
return new SwiftObjectListingChunk(paginationMap, 0, recursive);
}
return null;
}
Aggregations