code: void dus(String src) throws IOException {
      Path srcPath = new Path(src);
      FileSystem srcFs = srcPath.getFileSystem(getConf());
      FileStatus status[] = srcFs.globStatus(new Path(src));
      if (status==null || status.length==0) {
        throw new FileNotFoundException("Cannot access " + src + 
            ": No such file or directory.");
      }
      for(int i=0; i<status.length; i++) {
        long totalSize = srcFs.getContentSummary(status[i].getPath()).getLength();
        String pathStr = status[i].getPath().toString();
        System.out.println(("".equals(pathStr)?".":pathStr) + "\t" + totalSize);
      }
    }
docs: Show the summary disk usage of each dir/file
  that matches the file pattern <i>src</i>
  @param src a file pattern specifying source files
  @throws IOException
  @see org.apache.hadoop.fs.FileSystem#globStatus(Path)