src/main/java/org/apache/hadoop/hdfs/server/namenode/AbstractQueryEngine.java
@Override // QueryEngine
  public Long sum(Collection<INode> inodes, String sum) {
    long startTime = System.currentTimeMillis();
    try {
      Function<Collection<INode>, Long> sumFunction = getSumFunctionForCollection(sum);
      return sumFunction.apply(inodes);
    } finally {
      long endTime = System.currentTimeMillis();
      LOG.info("Performing sum: {} took: {} ms.", sum, (endTime - startTime));
    }
  }
/**
   * Performs a summation against a collection of INodes.
   *
   * @param inodes the inodes to sum on
   * @param sum the type of summation to perform
   * @return the resulting sum as a long
   */
Performs a summation against a collection of INodes.
@param inodes the inodes to sum on
@param sum the type of summation to perform
@return the resulting sum as a long
Performs a summation against a collection of INodes . @param inodes the inodes to sum on @param sum the type of summation to perform @return the resulting sum as a long
@Override 
  public Long sum(Collection<INode> inodes, String sum) {
    long startTime = System.currentTimeMillis();
    try {
      Function<Collection<INode>, Long> sumFunction = getSumFunctionForCollection(sum);
      return sumFunction.apply(inodes);
    } finally {
      long endTime = System.currentTimeMillis();
      LOG.info("Performing sum: {} took: {} ms.", sum, (endTime - startTime));
    }
  }
@ Override public Long sum ( Collection < INode > inodes , String sum ) { long startTime = System . currentTimeMillis ( ) ; try { Function < Collection < INode > , Long > sumFunction = getSumFunctionForCollection ( sum ) ; return sumFunction . apply ( inodes ) ; } finally { long endTime = System . currentTimeMillis ( ) ; LOG . info ( "Performing sum: {} took: {} ms." , sum , ( endTime - startTime ) ) ; } }
Performs a summation against a collection of INodes.
Performs a summation against a collection of INodes .
// QueryEngine