]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Hadoop: getDefaultBlockSize() now actually looks it up instead of guessing.
authorGreg Farnum <gregf@hq.newdream.net>
Thu, 27 Aug 2009 23:50:23 +0000 (16:50 -0700)
committerGreg Farnum <gregf@hq.newdream.net>
Fri, 28 Aug 2009 23:04:28 +0000 (16:04 -0700)
src/client/hadoop/ceph/CephFileSystem.java

index 60f59ef4fefec1e641bb471af07d04f412c101bb..b18030d8eaf9a8f92a119178742d28aa80537c2d 100644 (file)
@@ -49,7 +49,6 @@ import org.apache.hadoop.fs.FileStatus;
  */
 public class CephFileSystem extends FileSystem {
 
-  private static final long DEFAULT_BLOCK_SIZE = 4 * 1024 * 1024;
   private static final int EEXIST = 17;
 
   private URI uri;
@@ -775,8 +774,7 @@ public class CephFileSystem extends FileSystem {
    */
   @Override
   public long getDefaultBlockSize() {
-    return DEFAULT_BLOCK_SIZE;
-    //return getConf().getLong("fs.ceph.block.size", DEFAULT_BLOCK_SIZE);
+    return ceph_getblocksize("/");
   }
 
   // Makes a Path absolute. In a cheap, dirty hack, we're