title: How to get size of hdfs directory using spark
body: <p>Don`t know exactly how to start but , in my use case I am trying to get the size of my HDFS dir using Scala, can someone help here?</p>
  
  <p>I am about to reach this step, but dont know what should I do from here?</p>
  
  <pre><code>val fi = hdfs.listStatus(new Path("/path/path")
  fi.foreach(x=&gt; println(x.getPath))
  </code></pre>