code: @Override
      public void write(Iterable<QueryResult> results) {
          logger.debug("Export to '{}' results {}", graphiteServerHostAndPort, results);
          SocketWriter socketWriter = null;
          try {
              socketWriter = socketWriterPool.borrowObject(graphiteServerHostAndPort);
              for (QueryResult result : results) {
                  String msg = metricPathPrefix + result.getName() + " " + result.getValue() + " " + result.getEpoch(TimeUnit.SECONDS) + "\n";
                  logger.debug("Export '{}'", msg);
                  socketWriter.write(msg);
              }
              socketWriter.flush();
              socketWriterPool.returnObject(graphiteServerHostAndPort, socketWriter);
          } catch (Exception e) {
              logger.warn("Failure to send result to graphite server '{}' with {}", graphiteServerHostAndPort, socketWriter, e);
              if (socketWriter != null) {
                  try {
                      socketWriterPool.invalidateObject(graphiteServerHostAndPort, socketWriter);
                  } catch (Exception e2) {
                      logger.warn("Exception invalidating socketWriter connected to graphite server '{}': {}", graphiteServerHostAndPort, socketWriter, e2);
                  }
              }
          }
      }
docs: Send given metrics to the Graphite server.