public CounterMetadata getCounterMetadata ( String counterName ) { // first fetch metadata for the specified counter String jsonString = getRow ( counterName ) ; if ( jsonString != null ) { CounterMetadata result = CounterMetadata . fromJsonString ( jsonString ) ; if ( result != null ) { result . setName ( counterName ) ; } return result ; } else { // no exact match, try to build counter metadata from global config return findCounterMetadata ( counterName ) ; } }
Gets a counter metadata by name .