Java Code Examples for org.apache.hadoop.hdfs.protocol.HdfsFileStatus#makeQualified()
The following examples show how to use
org.apache.hadoop.hdfs.protocol.HdfsFileStatus#makeQualified() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DistributedFileSystem.java From hadoop with Apache License 2.0 | 6 votes |
@Override @SuppressWarnings("unchecked") public boolean hasNext() throws IOException { while (curStat == null && hasNextNoFilter()) { T next; HdfsFileStatus fileStat = thisListing.getPartialListing()[i++]; if (needLocation) { next = (T)((HdfsLocatedFileStatus)fileStat) .makeQualifiedLocated(getUri(), p); } else { next = (T)fileStat.makeQualified(getUri(), p); } // apply filter if not null if (filter == null || filter.accept(next.getPath())) { curStat = next; } } return curStat != null; }
Example 2
Source File: DistributedFileSystem.java From big-c with Apache License 2.0 | 6 votes |
@Override @SuppressWarnings("unchecked") public boolean hasNext() throws IOException { while (curStat == null && hasNextNoFilter()) { T next; HdfsFileStatus fileStat = thisListing.getPartialListing()[i++]; if (needLocation) { next = (T)((HdfsLocatedFileStatus)fileStat) .makeQualifiedLocated(getUri(), p); } else { next = (T)fileStat.makeQualified(getUri(), p); } // apply filter if not null if (filter == null || filter.accept(next.getPath())) { curStat = next; } } return curStat != null; }
Example 3
Source File: Hdfs.java From hadoop with Apache License 2.0 | 5 votes |
@Override public FileStatus getFileStatus(Path f) throws IOException, UnresolvedLinkException { HdfsFileStatus fi = dfs.getFileInfo(getUriPath(f)); if (fi != null) { return fi.makeQualified(getUri(), f); } else { throw new FileNotFoundException("File does not exist: " + f.toString()); } }
Example 4
Source File: Hdfs.java From hadoop with Apache License 2.0 | 5 votes |
@Override public FileStatus getFileLinkStatus(Path f) throws IOException, UnresolvedLinkException { HdfsFileStatus fi = dfs.getFileLinkInfo(getUriPath(f)); if (fi != null) { return fi.makeQualified(getUri(), f); } else { throw new FileNotFoundException("File does not exist: " + f); } }
Example 5
Source File: Hdfs.java From big-c with Apache License 2.0 | 5 votes |
@Override public FileStatus getFileStatus(Path f) throws IOException, UnresolvedLinkException { HdfsFileStatus fi = dfs.getFileInfo(getUriPath(f)); if (fi != null) { return fi.makeQualified(getUri(), f); } else { throw new FileNotFoundException("File does not exist: " + f.toString()); } }
Example 6
Source File: Hdfs.java From big-c with Apache License 2.0 | 5 votes |
@Override public FileStatus getFileLinkStatus(Path f) throws IOException, UnresolvedLinkException { HdfsFileStatus fi = dfs.getFileLinkInfo(getUriPath(f)); if (fi != null) { return fi.makeQualified(getUri(), f); } else { throw new FileNotFoundException("File does not exist: " + f); } }