@Override public void mergeAndOutputTransformationMetadata(Iterator<DistinctValue> values,String outputDir,int colID,FileSystem fs,TfUtils agents) throws IOException {
  HashMap<String,Long> map=new HashMap<String,Long>();
  DistinctValue d=new DistinctValue();
  String word=null;
  Long count=null, val=null;
  while (values.hasNext()) {
    d.reset();
    d=values.next();
    word=d.getWord();
    count=d.getCount();
    val=map.get(word);
    if (val == null)     map.put(word,count);
 else     map.put(word,val + count);
  }
  writeMetadata(map,outputDir,colID,fs,agents,false);
}

@ Override public void mergeAndOutputTransformationMetadata ( Iterator < DistinctValue > values , String outputDir , int colID , FileSystem fs , TfUtils agents ) throws IOException { HashMap < String , Long > map = new HashMap < String , Long > ( ) ; DistinctValue d = new DistinctValue ( ) ; String word = null ; Long count = null , val = null ; while ( values . hasNext ( ) ) { d . reset ( ) ; d = values . next ( ) ; word = d . getWord ( ) ; count = d . getCount ( ) ; val = map . get ( word ) ; if ( val == null ) map . put ( word , count ) ; else map . put ( word , val + count ) ; } writeMetadata ( map , outputDir , colID , fs , agents , false ) ; }
method to merge map output transformation metadata .
