src/main/java/org/apache/hadoop/hdfs/server/namenode/AbstractQueryEngine.java
@Override // QueryEngine
  public Map<String, Long> genericSummingHistogram(
      Stream<INode> inodes,
      Function<INode, String> namingFunction,
      Function<INode, Long> dataFunction) {
    return inodes.collect(
        Collectors.groupingBy(
            namingFunction, Collectors.mapping(dataFunction, Collectors.summingLong(i -> i))));
  }
/**
   * Produces Histogram for generic summation.
   *
   * @param inodes inodes
   * @param namingFunction function to string
   * @param dataFunction function to long
   * @return histogram of sums
   */
Produces Histogram for generic summation.
@param inodes inodes
@param namingFunction function to string
@param dataFunction function to long
@return histogram of sums
Produces Histogram for generic summation . @param inodes inodes @param namingFunction function to string @param dataFunction function to long @return histogram of sums
@Override 
  public Map<String, Long> genericSummingHistogram(
      Stream<INode> inodes,
      Function<INode, String> namingFunction,
      Function<INode, Long> dataFunction) {
    return inodes.collect(
        Collectors.groupingBy(
            namingFunction, Collectors.mapping(dataFunction, Collectors.summingLong(i -> i))));
  }
@ Override public Map < String , Long > genericSummingHistogram ( Stream < INode > inodes , Function < INode , String > namingFunction , Function < INode , Long > dataFunction ) { return inodes . collect ( Collectors . groupingBy ( namingFunction , Collectors . mapping ( dataFunction , Collectors . summingLong ( i -> i ) ) ) ) ; }
Produces Histogram for generic summation.
Produces Histogram for generic summation .
// QueryEngine