lib/logstash/filters/aggregate.rb
# Process a custom timeout defined in aggregate map element
# Returns an event to yield if timeout=0 and push_map_as_event_on_timeout=true
Process a custom timeout defined in aggregate map element
Returns an event to yield if timeout=0 and push_map_as_event_on_timeout=true
Process a custom timeout defined in aggregate map element Returns an event to yield if timeout = 0 and push_map_as_event_on_timeout = true
def process_map_timeout(element)
    event_to_yield = nil
    init_pipeline_timeout_management()
    if (element.timeout == 0 || element.inactivity_timeout == 0)
      @current_pipeline.aggregate_maps[@task_id].delete(element.task_id)
      if @current_pipeline.flush_instance_map[@task_id].push_map_as_event_on_timeout
        event_to_yield = create_timeout_event(element.map, element.task_id)
      end
      @logger.debug("Aggregate remove expired map with task_id=#{element.task_id} and custom timeout=0")
      metric.increment(:task_timeouts)
      update_aggregate_maps_metric()
    else
      @current_pipeline.flush_instance_map[@task_id].check_expired_maps_on_every_flush ||= true
    end
    return event_to_yield
  end
def process_map_timeout ( element ) event_to_yield = nil init_pipeline_timeout_management ( ) if ( element . timeout == 0 || element . inactivity_timeout == 0 ) @current_pipeline . aggregate_maps [ @task_id ] . delete ( element . task_id ) if @current_pipeline . flush_instance_map [ @task_id ] . push_map_as_event_on_timeout event_to_yield = create_timeout_event ( element . map , element . task_id ) end @logger . debug ( "Aggregate remove expired map with task_id=#{element.task_id} and custom timeout=0" ) metric . increment ( :task_timeouts ) update_aggregate_maps_metric ( ) else @current_pipeline . flush_instance_map [ @task_id ] . check_expired_maps_on_every_flush ||= true end return event_to_yield end
Process a custom timeout defined in aggregate map element
Returns an event to yield if timeout=0 and push_map_as_event_on_timeout=true
Process a custom timeout defined in aggregate map element Returns an event to yield if timeout = 0 and push_map_as_event_on_timeout = true
element