public long getUsed ( ) throws IOException { long used = 0 ; FileStatus [ ] files = listStatus ( new Path ( "/" ) ) ; for ( FileStatus file : files ) { used += file . getLen ( ) ; } return used ; }
Return the total size of all files in the filesystem .