From: Greg Farnum Date: Thu, 6 Aug 2009 23:29:50 +0000 (-0700) Subject: Hadoop: Throws IOException -> return null; interface requirement. X-Git-Tag: v0.13~119 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=700c2764e257ca4042afa4e48ef3c9a9b8a81af4;p=ceph.git Hadoop: Throws IOException -> return null; interface requirement. setReplicationRaw is an old method name, and it doesn't need to be overridden. getReplication was deprecated and no longer exists. --- diff --git a/src/client/hadoop/ceph/CephFileSystem.java b/src/client/hadoop/ceph/CephFileSystem.java index 326dd16be06f..ae64d8c1e6f5 100644 --- a/src/client/hadoop/ceph/CephFileSystem.java +++ b/src/client/hadoop/ceph/CephFileSystem.java @@ -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. */