public static Map<String,List<TableBlockInfo>> combineNodeBlockMaps(List<Map<String,List<TableBlockInfo>>> mapsOfNodeBlockMapping){
  Map<String,List<TableBlockInfo>> combinedMap=new HashMap<String,List<TableBlockInfo>>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
  for (  Map<String,List<TableBlockInfo>> eachMap : mapsOfNodeBlockMapping) {
    for (    Map.Entry<String,List<TableBlockInfo>> eachEntry : eachMap.entrySet()) {
      String node=eachEntry.getKey();
      List<TableBlockInfo> blocks=eachEntry.getValue();
      if (null != combinedMap.get(node)) {
        List<TableBlockInfo> blocksAlreadyPresent=combinedMap.get(node);
        blocksAlreadyPresent.addAll(blocks);
      }
 else {
        combinedMap.put(node,blocks);
      }
    }
  }
  return combinedMap;
}

public static Map < String , List < TableBlockInfo > > combineNodeBlockMaps ( List < Map < String , List < TableBlockInfo > > > mapsOfNodeBlockMapping ) { Map < String , List < TableBlockInfo > > combinedMap = new HashMap < String , List < TableBlockInfo > > ( CarbonCommonConstants . DEFAULT_COLLECTION_SIZE ) ; for ( Map < String , List < TableBlockInfo > > eachMap : mapsOfNodeBlockMapping ) { for ( Map . Entry < String , List < TableBlockInfo > > eachEntry : eachMap . entrySet ( ) ) { String node = eachEntry . getKey ( ) ; List < TableBlockInfo > blocks = eachEntry . getValue ( ) ; if ( null != combinedMap . get ( node ) ) { List < TableBlockInfo > blocksAlreadyPresent = combinedMap . get ( node ) ; blocksAlreadyPresent . addAll ( blocks ) ; } else { combinedMap . put ( node , blocks ) ; } } } return combinedMap ; }
combining the list of maps to one map .
