private long waitForFileSavedAndReturnLength(String path){
  return getLength(path);
}

private long waitForFileSavedAndReturnLength ( String path ) { return getLength ( path ) ; }
there is some wired bug in webhdfs , which happens for big files . just after saving such file it is not possible to immediately set xattr . calling getfilestatus seems to introduce some synchronization point , so it should be used just after saving file .
