HBASE-23314 Make HBaseObjectStoreSemantics FilterFileSystem (#11)

Signed-off-by: Andrew Putell <apurtell@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
diff --git a/hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java b/hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java
index 11bf9b8..572c43e 100644
--- a/hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java
+++ b/hbase-oss/src/main/java/org/apache/hadoop/hbase/oss/HBaseObjectStoreSemantics.java
@@ -35,6 +35,7 @@
 import org.apache.hadoop.fs.FileChecksum;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FilterFileSystem;
 import org.apache.hadoop.fs.FsServerDefaults;
 import org.apache.hadoop.fs.FsStatus;
 import org.apache.hadoop.fs.LocatedFileStatus;
@@ -93,12 +94,10 @@
  */
 @InterfaceAudience.LimitedPrivate(HBaseInterfaceAudience.CONFIG)
 @InterfaceStability.Unstable
-public class HBaseObjectStoreSemantics extends FileSystem {
+public class HBaseObjectStoreSemantics extends FilterFileSystem {
   private static final Logger LOG =
         LoggerFactory.getLogger(HBaseObjectStoreSemantics.class);
 
-  private FileSystem fs;
-
   private TreeLockManager sync;
 
   public void initialize(URI name, Configuration conf) throws IOException {
@@ -131,10 +130,6 @@
     return fs.getScheme();
   }
 
-  public URI getUri() {
-    return fs.getUri();
-  }
-
   @Override
   public String getCanonicalServiceName() {
     return fs.getCanonicalServiceName();
@@ -145,10 +140,6 @@
     return fs.getName();
   }
 
-  public Path makeQualified(Path path) {
-    return fs.makeQualified(path);
-  }
-
   public BlockLocation[] getFileBlockLocations(FileStatus file,
                                                long start, long len) throws IOException {
     try (AutoLock l = sync.lock(file.getPath())) {
@@ -163,19 +154,6 @@
     }
   }
 
-  @Deprecated
-  public FsServerDefaults getServerDefaults() throws IOException {
-    return fs.getServerDefaults();
-  }
-
-  public FsServerDefaults getServerDefaults(Path p) throws IOException {
-    return fs.getServerDefaults(p);
-  }
-
-  public Path resolvePath(final Path p) throws IOException {
-    return fs.resolvePath(p);
-  }
-
   public FSDataInputStream open(Path f, int bufferSize)
         throws IOException {
     try (AutoLock l = sync.lock(f)) {
@@ -616,18 +594,6 @@
     }
   }
 
-  public Path getHomeDirectory() {
-    return fs.getHomeDirectory();
-  }
-
-  public void setWorkingDirectory(Path newDir) {
-    fs.setWorkingDirectory(newDir);
-  }
-
-  public Path getWorkingDirectory() {
-    return fs.getWorkingDirectory();
-  }
-
   public boolean mkdirs(Path f) throws IOException {
     // TODO this has implications for the parent dirs too
     try (AutoLock l = sync.lock(f)) {
@@ -731,10 +697,6 @@
     sync.close();
   }
 
-  public long getUsed() throws IOException {
-    return fs.getUsed();
-  }
-
   @Deprecated
   public long getBlockSize(Path f) throws IOException {
     try (AutoLock l = sync.lock(f)) {
@@ -742,24 +704,6 @@
     }
   }
 
-  @Deprecated
-  public long getDefaultBlockSize() {
-    return fs.getDefaultBlockSize();
-  }
-
-  public long getDefaultBlockSize(Path f) {
-    return fs.getDefaultBlockSize(f);
-  }
-
-  @Deprecated
-  public short getDefaultReplication() {
-    return fs.getDefaultReplication();
-  }
-
-  public short getDefaultReplication(Path path) {
-    return fs.getDefaultReplication(path);
-  }
-
   public FileStatus getFileStatus(Path f) throws IOException {
     try (AutoLock l = sync.lock(f)) {
       return fs.getFileStatus(f);