@Override
  public void init(Context context) {
    ContainerContext containerContext = context.getContainerContext();
    metricsRegistry = containerContext.getContainerMetricsRegistry();
    processingTime = new SamzaHistogram(metricsRegistry, logicalOpId, TranslatorConstants.PROCESSING_TIME_NAME);
    outputEvents = metricsRegistry.newCounter(logicalOpId, TranslatorConstants.OUTPUT_EVENTS_NAME);
    outputEvents.clear();
  }
initializes the TranslatorOutputMetricsMapFunction before any message is processed
@param context the {@link Context} for this task
samza-sql/src/main/java/org/apache/samza/sql/translator/TranslatorOutputMetricsMapFunction.java