question: private Map < String , MetricHeaderInfo > processCSVFileDataHeader ( DbClient dbClient , StorageSystem storageSystem , String directorName , List < String > headers ) { Map < String , MetricHeaderInfo > metricToObjectMap = new HashMap < > ( ) ; for ( String header : headers ) { Matcher matcher = METRIC_NAME_PATTERN . matcher ( header ) ; if ( matcher . matches ( ) ) { String name = matcher . group ( 1 ) ; if ( ! METRICS_NAMES_TO_GATHER . contains ( name ) ) { continue ; } String objectName = matcher . group ( 2 ) ; String units = matcher . group ( 3 ) ; if ( Strings . isNullOrEmpty ( objectName ) ) { objectName = EMPTY ; } StorageHADomain vplexDirector = lookupVPlexDirectorByName ( dbClient , storageSystem , directorName ) ; if ( objectName . equals ( EMPTY ) ) { MetricHeaderInfo headerInfo = new MetricHeaderInfo ( ) ; headerInfo . type = MetricHeaderInfo . Type . DIRECTOR ; headerInfo . director = vplexDirector ; headerInfo . units = units ; metricToObjectMap . put ( header , headerInfo ) ; } else { StoragePort storagePort = lookupVPlexFrontStoragePortByName ( dbClient , vplexDirector , objectName ) ; if ( storagePort != null ) { MetricHeaderInfo headerInfo = new MetricHeaderInfo ( ) ; headerInfo . type = MetricHeaderInfo . Type . PORT ; headerInfo . director = vplexDirector ; headerInfo . port = storagePort ; headerInfo . units = units ; metricToObjectMap . put ( header , headerInfo ) ; } } } } return metricToObjectMap ; }
target:  Return a mapping of the metric name and the DataObject (StorageHADomain or StoragePort) to which the metric applies. First line from the CSV file will look like this: Time,Time (UTC),be-prt.write A1-FC02 (KB/s),be-prt.write A1-FC03 (KB/s),... 'headers' will contain each of the Strings delimited by ','. This function will parse that to determine what DataObject it should be associated with and its units.