]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Hadoop: cleanup compile bugs from previous cleanup work.
authorGreg Farnum <gregf@hq.newdream.net>
Mon, 17 Aug 2009 19:38:00 +0000 (12:38 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Mon, 17 Aug 2009 19:38:00 +0000 (12:38 -0700)
src/client/hadoop/ceph/CephFileSystem.java

index 8eff5cfa7407358bf09b0ccb39c3c63e5afbe74b..4286717f37a7425da56ad8ce5ffd83e4d05c74aa 100644 (file)
@@ -489,7 +489,7 @@ public class CephFileSystem extends FileSystem {
     // Step 2: create any nonexistent directories in the path
     Path parent =  abs_path.getParent();
     if (parent != null) { // if parent is root, we're done
-      int r = mkdirs(parent);
+      int r = ceph_mkdirs(parent.toString(), permission.toShort());
       if (!(r==0 || r==-EEXIST))
        throw new IOException ("Error creating parent directory; code: " + r);
     }
@@ -537,7 +537,9 @@ public class CephFileSystem extends FileSystem {
     if (fh < 0) {
       throw new IOException("open: Failed to open file " + abs_path.toString());
     }
-    long size = ceph_getfilesize(abs_path.toString());
+    Stat lstat = new Stat();
+    ceph_stat(abs_path.toString(), lstat);
+    long size = lstat.size;
     if (size < 0) {
       throw new IOException("Failed to get file size for file " + abs_path.toString() + 
                            " but succeeded in opening file. Something bizarre is going on.");