@ Override public void internalWrite ( Server server , Query query , ImmutableList < Result > results ) throws Exception { for ( final Result result : results ) { final String name = KeyUtils . getKeyString ( query , result , getTypeNames ( ) ) ; Object transformedValue = valueTransformer . apply ( result . getValue ( ) ) ; GMetricType dataType = getType ( result . getValue ( ) ) ; log . debug ( "Sending Ganglia metric {}={} [type={}]" , name , transformedValue , dataType ) ; try ( GMetric metric = new GMetric ( host , port , addressingMode , ttl , v31 , null , spoofedHostName ) ) { metric . announce ( name , transformedValue . toString ( ) , dataType , units , slope , tmax , dmax , groupName ) ; } } }
Send query result values to Ganglia .