private void processExportData(BlockStorageDriver driver,com.emc.storageos.db.client.model.StorageSystem storageSystem,Map<String,URI> unManagedVolumeNativeIdToUriMap,Map<String,URI> managedVolumeNativeIdToUriMap,Map<String,List<HostExportInfo>> hostToVolumeExportInfoMap,Set<String> invalidExportHosts,DbClient dbClient,PartitionManager partitionManager){
  List<UnManagedExportMask> unManagedExportMasksToCreate=new ArrayList<>();
  List<UnManagedExportMask> unManagedExportMasksToUpdate=new ArrayList<>();
  Map<URI,HostExportInfo> exportInfosForExistingMasks=new HashMap<>();
  List<HostExportInfo> exportInfosForNewMasks=new ArrayList<>();
  determineUnManagedExportMasksForExportInfo(storageSystem,hostToVolumeExportInfoMap,invalidExportHosts,dbClient,exportInfosForExistingMasks,exportInfosForNewMasks);
  log.info("Export info for unmanaged masks to create for volumes: {}",exportInfosForNewMasks);
  log.info("Export info for unmanaged masks to update for volumes: {}",exportInfosForExistingMasks);
  if (!(exportInfosForNewMasks.isEmpty() && exportInfosForExistingMasks.isEmpty())) {
    processUnManagedMasksForVolumes(storageSystem,exportInfosForExistingMasks,exportInfosForNewMasks,unManagedVolumeNativeIdToUriMap,managedVolumeNativeIdToUriMap,unManagedExportMasksToUpdate,unManagedExportMasksToCreate,dbClient);
  }
  log.info("Unmanaged Masks to create for volumes: {}",unManagedExportMasksToCreate);
  log.info("Unmanaged Masks to update for volumes: {}",unManagedExportMasksToUpdate);
  if (!unManagedExportMasksToCreate.isEmpty()) {
    partitionManager.insertInBatches(unManagedExportMasksToCreate,Constants.DEFAULT_PARTITION_SIZE,dbClient,UNMANAGED_EXPORT_MASK);
  }
  if (!unManagedExportMasksToUpdate.isEmpty()) {
    partitionManager.updateInBatches(unManagedExportMasksToUpdate,Constants.DEFAULT_PARTITION_SIZE,dbClient,UNMANAGED_EXPORT_MASK);
  }
  updateUnManagedVolumesWithExportData(unManagedVolumeNativeIdToUriMap,unManagedExportMasksToCreate,unManagedExportMasksToUpdate,dbClient,partitionManager);
  unManagedExportMasksToCreate.clear();
  unManagedExportMasksToUpdate.clear();
}

private void processExportData ( BlockStorageDriver driver , com . emc . storageos . db . client . model . StorageSystem storageSystem , Map < String , URI > unManagedVolumeNativeIdToUriMap , Map < String , URI > managedVolumeNativeIdToUriMap , Map < String , List < HostExportInfo > > hostToVolumeExportInfoMap , Set < String > invalidExportHosts , DbClient dbClient , PartitionManager partitionManager ) { List < UnManagedExportMask > unManagedExportMasksToCreate = new ArrayList < > ( ) ; List < UnManagedExportMask > unManagedExportMasksToUpdate = new ArrayList < > ( ) ; Map < URI , HostExportInfo > exportInfosForExistingMasks = new HashMap < > ( ) ; List < HostExportInfo > exportInfosForNewMasks = new ArrayList < > ( ) ; determineUnManagedExportMasksForExportInfo ( storageSystem , hostToVolumeExportInfoMap , invalidExportHosts , dbClient , exportInfosForExistingMasks , exportInfosForNewMasks ) ; log . info ( "Export info for unmanaged masks to create for volumes: {}" , exportInfosForNewMasks ) ; log . info ( "Export info for unmanaged masks to update for volumes: {}" , exportInfosForExistingMasks ) ; if ( ! ( exportInfosForNewMasks . isEmpty ( ) && exportInfosForExistingMasks . isEmpty ( ) ) ) { processUnManagedMasksForVolumes ( storageSystem , exportInfosForExistingMasks , exportInfosForNewMasks , unManagedVolumeNativeIdToUriMap , managedVolumeNativeIdToUriMap , unManagedExportMasksToUpdate , unManagedExportMasksToCreate , dbClient ) ; } log . info ( "Unmanaged Masks to create for volumes: {}" , unManagedExportMasksToCreate ) ; log . info ( "Unmanaged Masks to update for volumes: {}" , unManagedExportMasksToUpdate ) ; if ( ! unManagedExportMasksToCreate . isEmpty ( ) ) { partitionManager . insertInBatches ( unManagedExportMasksToCreate , Constants . DEFAULT_PARTITION_SIZE , dbClient , UNMANAGED_EXPORT_MASK ) ; } if ( ! unManagedExportMasksToUpdate . isEmpty ( ) ) { partitionManager . updateInBatches ( unManagedExportMasksToUpdate , Constants . DEFAULT_PARTITION_SIZE , dbClient , UNMANAGED_EXPORT_MASK ) ; } updateUnManagedVolumesWithExportData ( unManagedVolumeNativeIdToUriMap , unManagedExportMasksToCreate , unManagedExportMasksToUpdate , dbClient , partitionManager ) ; unManagedExportMasksToCreate . clear ( ) ; unManagedExportMasksToUpdate . clear ( ) ; }
processes export info for unmanaged and managed volumes found on storage array during volume discovery . analyses export info and builds / updates unmanagedexport masks for the exports .
