]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Hadoop: Return a couple of unecessary isX calls.
authorGreg Farnum <gregf@hq.newdream.net>
Tue, 8 Sep 2009 05:28:12 +0000 (22:28 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Tue, 8 Sep 2009 19:23:38 +0000 (12:23 -0700)
src/client/hadoop/ceph/CephFileSystem.java

index 8987e155201b934efa3e23803c5b396e04823651..9b285e77675253953f130da81f0159495712ae46 100644 (file)
@@ -247,7 +247,7 @@ public class CephFileSystem extends FileSystem {
     boolean path_exists = false;
     try {
       isDir = isDirectory(abs_path);
-      path_exists = exists(abs_path);
+      if (!isDir) path_exists = exists(abs_path);
     }
 
     catch (IOException e) {
@@ -428,10 +428,7 @@ public class CephFileSystem extends FileSystem {
       debug("listStatus:exit");
       return statuses;
     }
-    if (isFile(abs_path)) return null;
-
-    //shouldn't get here
-    throw new FileNotFoundException("listStatus found no such file " + path);
+    return null; //it's a file, or DNE
   }
 
   @Override