]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Hadoop: Throws IOException -> return null; interface requirement.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 6 Aug 2009 23:29:50 +0000 (16:29 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 7 Aug 2009 22:05:43 +0000 (15:05 -0700)
setReplicationRaw is an old method name, and it doesn't need to be overridden.
getReplication was deprecated and no longer exists.

src/client/hadoop/ceph/CephFileSystem.java

index 326dd16be06fc11e1a76e7cca2463377e2500abf..ae64d8c1e6f5d5ab46b0b4ed76996b8a4bce08cb 100644 (file)
@@ -403,7 +403,7 @@ public class CephFileSystem extends FileSystem {
     Path abs_path = makeAbsolute(file.getPath());
     int fh = ceph_open_for_read(abs_path.toString());
     if (fh < 0) {
-      throw new IOException ("could not open file " + abs_path.toString());
+      return null;
     }
     //get the block size
     long blockSize = ceph_getblocksize(abs_path.toString());
@@ -478,23 +478,11 @@ public class CephFileSystem extends FileSystem {
   /**
    * User-defined replication is not supported for Ceph file systems at the moment.
    */
-  @Deprecated
-    public short getReplication(Path path) throws IOException {
-    return 1;
-  }
-
   @Override
     public short getDefaultReplication() {
     return 1;
   }
   
-  /**
-   * User-defined replication is not supported for Ceph file systems at the moment.
-   */
-  public boolean setReplicationRaw(Path path, short replication) throws IOException {
-    return true;
-  }
-
   /**
    * You need to guarantee the path exists before calling this method, for now.
    */