@Override public void mergeAndOutputTransformationMetadata(Iterator<DistinctValue> values,String outputDir,int colID,FileSystem fs,TfUtils agents) throws IOException {
  double min=Double.MAX_VALUE;
  double max=-Double.MAX_VALUE;
  int nbins=0;
  DistinctValue val=new DistinctValue();
  String w=null;
  double d;
  while (values.hasNext()) {
    val.reset();
    val=values.next();
    w=val.getWord();
    if (w.startsWith(MIN_PREFIX)) {
      d=UtilFunctions.parseToDouble(w.substring(MIN_PREFIX.length()));
      if (d < min)       min=d;
    }
 else     if (w.startsWith(MAX_PREFIX)) {
      d=UtilFunctions.parseToDouble(w.substring(MAX_PREFIX.length()));
      if (d > max)       max=d;
    }
 else     if (w.startsWith(NBINS_PREFIX)) {
      nbins=(int)UtilFunctions.parseToLong(w.substring(NBINS_PREFIX.length()));
    }
 else     throw new RuntimeException("MVImputeAgent: Invalid prefix while merging map output: " + w);
  }
  double binwidth=(max - min) / nbins;
  writeTfMtd(colID,Double.toString(min),Double.toString(max),Double.toString(binwidth),Integer.toString(nbins),outputDir,fs,agents);
}

@ Override public void mergeAndOutputTransformationMetadata ( Iterator < DistinctValue > values , String outputDir , int colID , FileSystem fs , TfUtils agents ) throws IOException { double min = Double . MAX_VALUE ; double max = - Double . MAX_VALUE ; int nbins = 0 ; DistinctValue val = new DistinctValue ( ) ; String w = null ; double d ; while ( values . hasNext ( ) ) { val . reset ( ) ; val = values . next ( ) ; w = val . getWord ( ) ; if ( w . startsWith ( MIN_PREFIX ) ) { d = UtilFunctions . parseToDouble ( w . substring ( MIN_PREFIX . length ( ) ) ) ; if ( d < min ) min = d ; } else if ( w . startsWith ( MAX_PREFIX ) ) { d = UtilFunctions . parseToDouble ( w . substring ( MAX_PREFIX . length ( ) ) ) ; if ( d > max ) max = d ; } else if ( w . startsWith ( NBINS_PREFIX ) ) { nbins = ( int ) UtilFunctions . parseToLong ( w . substring ( NBINS_PREFIX . length ( ) ) ) ; } else throw new RuntimeException ( "MVImputeAgent: Invalid prefix while merging map output: " + w ) ; } double binwidth = ( max - min ) / nbins ; writeTfMtd ( colID , Double . toString ( min ) , Double . toString ( max ) , Double . toString ( binwidth ) , Integer . toString ( nbins ) , outputDir , fs , agents ) ; }
method to merge map output transformation metadata .
