code: @Override
    public void reportMetric(final IMetric<?> metric) throws MetricException {
      final String gangliaCommand = buildCommand(metric);
  
      if (gangliaCommand != null) {
        // executes shell command to report metric to ganglia dashboard
        try {
          final Process emission = Runtime.getRuntime().exec(gangliaCommand);
          final int exitCode;
          exitCode = emission.waitFor();
          if (exitCode != 0) {
            throw new MetricException("Failed to report metric using gmetric");
          }
        } catch (final Exception e) {
          throw new MetricException("Failed to report metric using gmetric");
        }
      } else {
        throw new MetricException("Failed to build ganglia Command");
      }
    }
docs: Report metric by executing command line interface of gmetrics {@inheritDoc}
  
  @see azkaban.metric.IMetricEmitter#reportMetric(azkaban.metric.IMetric)