|
@@ -16,13 +16,17 @@ package org.apache.hadoop.fs;
|
|
* See the License for the specific language governing permissions and
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
* limitations under the License.
|
|
*/
|
|
*/
|
|
|
|
+import java.io.FileNotFoundException;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
|
|
+import java.net.URI;
|
|
import java.net.URISyntaxException;
|
|
import java.net.URISyntaxException;
|
|
import java.util.EnumSet;
|
|
import java.util.EnumSet;
|
|
|
|
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
import org.apache.hadoop.classification.InterfaceAudience;
|
|
import org.apache.hadoop.classification.InterfaceStability;
|
|
import org.apache.hadoop.classification.InterfaceStability;
|
|
|
|
+import org.apache.hadoop.fs.FileSystem.Statistics;
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
import org.apache.hadoop.fs.permission.FsPermission;
|
|
|
|
+import org.apache.hadoop.security.AccessControlException;
|
|
import org.apache.hadoop.util.Progressable;
|
|
import org.apache.hadoop.util.Progressable;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -51,11 +55,21 @@ public abstract class FilterFs extends AbstractFileSystem {
|
|
myFs = fs;
|
|
myFs = fs;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected Statistics getStatistics() {
|
|
|
|
+ return myFs.getStatistics();
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected Path getInitialWorkingDirectory() {
|
|
protected Path getInitialWorkingDirectory() {
|
|
return myFs.getInitialWorkingDirectory();
|
|
return myFs.getInitialWorkingDirectory();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected Path getHomeDirectory() {
|
|
|
|
+ return myFs.getHomeDirectory();
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected FSDataOutputStream createInternal(Path f,
|
|
protected FSDataOutputStream createInternal(Path f,
|
|
EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize,
|
|
EnumSet<CreateFlag> flag, FsPermission absolutePermission, int bufferSize,
|
|
@@ -102,6 +116,12 @@ public abstract class FilterFs extends AbstractFileSystem {
|
|
return myFs.getFileLinkStatus(f);
|
|
return myFs.getFileLinkStatus(f);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected FsStatus getFsStatus(final Path f) throws AccessControlException,
|
|
|
|
+ FileNotFoundException, UnresolvedLinkException, IOException {
|
|
|
|
+ return myFs.getFsStatus(f);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected FsStatus getFsStatus() throws IOException {
|
|
protected FsStatus getFsStatus() throws IOException {
|
|
return myFs.getFsStatus();
|
|
return myFs.getFsStatus();
|
|
@@ -117,6 +137,21 @@ public abstract class FilterFs extends AbstractFileSystem {
|
|
return myFs.getUriDefaultPort();
|
|
return myFs.getUriDefaultPort();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected URI getUri() {
|
|
|
|
+ return myFs.getUri();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected void checkPath(Path path) {
|
|
|
|
+ myFs.checkPath(path);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected String getUriPath(final Path p) {
|
|
|
|
+ return myFs.getUriPath(p);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected FileStatus[] listStatus(Path f)
|
|
protected FileStatus[] listStatus(Path f)
|
|
throws IOException, UnresolvedLinkException {
|
|
throws IOException, UnresolvedLinkException {
|
|
@@ -132,6 +167,13 @@ public abstract class FilterFs extends AbstractFileSystem {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected FSDataInputStream open(final Path f) throws AccessControlException,
|
|
|
|
+ FileNotFoundException, UnresolvedLinkException, IOException {
|
|
|
|
+ checkPath(f);
|
|
|
|
+ return myFs.open(f);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected FSDataInputStream open(Path f, int bufferSize)
|
|
protected FSDataInputStream open(Path f, int bufferSize)
|
|
throws IOException, UnresolvedLinkException {
|
|
throws IOException, UnresolvedLinkException {
|
|
@@ -147,6 +189,14 @@ public abstract class FilterFs extends AbstractFileSystem {
|
|
myFs.rename(src, dst, Options.Rename.NONE);
|
|
myFs.rename(src, dst, Options.Rename.NONE);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ protected void renameInternal(final Path src, final Path dst,
|
|
|
|
+ boolean overwrite) throws AccessControlException,
|
|
|
|
+ FileAlreadyExistsException, FileNotFoundException,
|
|
|
|
+ ParentNotDirectoryException, UnresolvedLinkException, IOException {
|
|
|
|
+ myFs.renameInternal(src, dst, overwrite);
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
protected void setOwner(Path f, String username, String groupname)
|
|
protected void setOwner(Path f, String username, String groupname)
|
|
throws IOException, UnresolvedLinkException {
|
|
throws IOException, UnresolvedLinkException {
|