private void getSizeInfo(AlluxioURI path, List<URIStatus> statuses,
      boolean readable, boolean summarize, boolean addMemory) {
    if (summarize) {
      long totalSize = 0;
      long sizeInAlluxio = 0;
      long sizeInMem = 0;
      for (URIStatus status : statuses) {
        if (!status.isFolder()) {
          long size = status.getLength();
          totalSize += size;
          sizeInMem += size * status.getInMemoryPercentage();
          sizeInAlluxio += size * status.getInMemoryPercentage();
        }
      }
      String sizeMessage = readable ? FormatUtils.getSizeFromBytes(totalSize)
          : String.valueOf(totalSize);
      String inAlluxioMessage = getFormattedValues(readable, sizeInAlluxio / 100, totalSize);
      String inMemMessage = addMemory
          ? getFormattedValues(readable, sizeInMem / 100, totalSize) : "";
      printInfo(sizeMessage, inAlluxioMessage, inMemMessage, path.toString());
    } else {
      for (URIStatus status : statuses) {
        if (!status.isFolder()) {
          long totalSize = status.getLength();
          String sizeMessage = readable ? FormatUtils.getSizeFromBytes(totalSize)
              : String.valueOf(totalSize);
          String inAlluxioMessage = getFormattedValues(readable,
              status.getInAlluxioPercentage() * totalSize / 100, totalSize);
          String inMemMessage = addMemory ? getFormattedValues(readable,
              status.getInMemoryPercentage() * totalSize / 100, totalSize) : "";
          printInfo(sizeMessage, inAlluxioMessage, inMemMessage, status.getPath());
        }
      }
    }
  }
private void getSizeInfo ( AlluxioURI path , List < URIStatus > statuses , boolean readable , boolean summarize , boolean addMemory ) { if ( summarize ) { long totalSize = 0 ; long sizeInAlluxio = 0 ; long sizeInMem = 0 ; for ( URIStatus status : statuses ) { if ( ! status . isFolder ( ) ) { long size = status . getLength ( ) ; totalSize += size ; sizeInMem += size * status . getInMemoryPercentage ( ) ; sizeInAlluxio += size * status . getInMemoryPercentage ( ) ; } } String sizeMessage = readable ? FormatUtils . getSizeFromBytes ( totalSize ) : String . valueOf ( totalSize ) ; String inAlluxioMessage = getFormattedValues ( readable , sizeInAlluxio / 100 , totalSize ) ; String inMemMessage = addMemory ? getFormattedValues ( readable , sizeInMem / 100 , totalSize ) : "" ; printInfo ( sizeMessage , inAlluxioMessage , inMemMessage , path . toString ( ) ) ; } else { for ( URIStatus status : statuses ) { if ( ! status . isFolder ( ) ) { long totalSize = status . getLength ( ) ; String sizeMessage = readable ? FormatUtils . getSizeFromBytes ( totalSize ) : String . valueOf ( totalSize ) ; String inAlluxioMessage = getFormattedValues ( readable , status . getInAlluxioPercentage ( ) * totalSize / 100 , totalSize ) ; String inMemMessage = addMemory ? getFormattedValues ( readable , status . getInMemoryPercentage ( ) * totalSize / 100 , totalSize ) : "" ; printInfo ( sizeMessage , inAlluxioMessage , inMemMessage , status . getPath ( ) ) ; } } } }
Gets and prints the size information of the input path according to options.

@param path the path to get size info of
@param statuses the statuses of files and folders
@param readable whether to print info of human readable format
@param summarize whether to display the aggregate summary lengths
@param addMemory whether to display the memory size and percentage information