title: Hdfs blocksize defaults to 128 mb when using java api
body: <p>I wonder is the following behaviour is as it should be (hadoop 2.1.0-beta):</p>
  
  <p>I changed the dfs.blocksize to 64m in hdfs-site.xml. If I upload a file via <code>hdfs dfs -put src dst</code> the blocksize is correctly shown as 64mb (in the webinterface). However, if I use the java api (here via scala), the blocksize for the file is 128mb (default).</p>
  
  <p>I don't have the configuration files in the classpath of my application, because I expected that the namenode should be aware of it's blocksize. Here is how I use the java api:</p>
  
  <pre><code>val hdfsConf = new Configuration()
  hdfsConf.set("fs.defaultFS", hdfsAddress)
  FileSystem.get(hdfsConf)
  ...
  val delSource = false; val overWrite = false
  fs.copyFromLocalFile(delSource, overWrite, new Path(localPath), new Path(destinationPath))
  </code></pre>
  
  <p>Is my namenode configured wrongly, so that it does not apply the correct blocksize? Or is this expected behaviour?</p>
  
  <p>Addition: This is how I start my namenode:</p>
  
  <pre><code>hadoop-2.1.0-beta/sbin/hadoop-daemon.sh --config /home/andre/experiments/suts/hadoop-2.1.0-beta/conf --script hdfs start namenod
  </code></pre>
  
  <p>The hdfs-site.xml is in the specified folder and has this property in it:</p>
  
  <pre><code>&lt;property&gt;
    &lt;name&gt;dfs.blocksize&lt;/name&gt;
    &lt;value&gt;64m&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>I didn't specify $HADOOP_CONF_DIR, because I switch between multiple hadoop installations on this machine (and I hope and don't think it is necessary).</p>