@Override public void loadTxMtd(JobConf job,FileSystem fs,Path txMtdDir,TfUtils agents) throws IOException {
  if (!isApplicable())   return;
  _finalMaps=new HashMap<Integer,HashMap<String,String>>();
  if (fs.isDirectory(txMtdDir)) {
    for (int i=0; i < _colList.length; i++) {
      int colID=_colList[i];
      Path path=new Path(txMtdDir + "/Recode/" + agents.getName(colID)+ TfUtils.TXMTD_RCD_MAP_SUFFIX);
      TfUtils.checkValidInputFile(fs,path,true);
      HashMap<String,String> map=new HashMap<String,String>();
      Pair<String,String> pair=new Pair<String,String>();
      BufferedReader br=new BufferedReader(new InputStreamReader(fs.open(path)));
      String line=null;
      while ((line=br.readLine()) != null) {
        DecoderRecode.parseRecodeMapEntry(line,pair);
        map.put(pair.getKey(),pair.getValue());
      }
      br.close();
      _finalMaps.put(colID,map);
    }
  }
 else {
    fs.close();
    throw new RuntimeException("Path to recode maps must be a directory: " + txMtdDir);
  }
}

@ Override public void loadTxMtd ( JobConf job , FileSystem fs , Path txMtdDir , TfUtils agents ) throws IOException { if ( ! isApplicable ( ) ) return ; _finalMaps = new HashMap < Integer , HashMap < String , String > > ( ) ; if ( fs . isDirectory ( txMtdDir ) ) { for ( int i = 0 ; i < _colList . length ; i ++ ) { int colID = _colList [ i ] ; Path path = new Path ( txMtdDir + "/Recode/" + agents . getName ( colID ) + TfUtils . TXMTD_RCD_MAP_SUFFIX ) ; TfUtils . checkValidInputFile ( fs , path , true ) ; HashMap < String , String > map = new HashMap < String , String > ( ) ; Pair < String , String > pair = new Pair < String , String > ( ) ; BufferedReader br = new BufferedReader ( new InputStreamReader ( fs . open ( path ) ) ) ; String line = null ; while ( ( line = br . readLine ( ) ) != null ) { DecoderRecode . parseRecodeMapEntry ( line , pair ) ; map . put ( pair . getKey ( ) , pair . getValue ( ) ) ; } br . close ( ) ; _finalMaps . put ( colID , map ) ; } } else { fs . close ( ) ; throw new RuntimeException ( "Path to recode maps must be a directory: " + txMtdDir ) ; } }
method to load recode maps of all attributes , at once .
