code: public static DataAnalysis analyze(Schema schema, RecordReader rr, int maxHistogramBuckets){
          AnalysisAddFunction addFn = new AnalysisAddFunction(schema);
          List<AnalysisCounter> counters = null;
          while(rr.hasNext()){
              counters = addFn.apply(counters, rr.next());
          }
  
          double[][] minsMaxes = new double[counters.size()][2];
  
          List<ColumnType> columnTypes = schema.getColumnTypes();
          List<ColumnAnalysis> list = DataVecAnalysisUtils.convertCounters(counters, minsMaxes, columnTypes);
  
  
          //Do another pass collecting histogram values:
          List<HistogramCounter> histogramCounters = null;
          HistogramAddFunction add = new HistogramAddFunction(maxHistogramBuckets, schema, minsMaxes);
          if(rr.resetSupported()){
              rr.reset();
              while(rr.hasNext()){
                  histogramCounters = add.apply(histogramCounters, rr.next());
              }
  
              DataVecAnalysisUtils.mergeCounters(list, histogramCounters);
          }
  
          return new DataAnalysis(schema, list);
      }
docs: Analyse the specified data - returns a DataAnalysis object with summary information about each column
  
  @param schema Schema for data
  @param rr     Data to analyze
  @return DataAnalysis for data