[ 
https://issues.apache.org/jira/browse/METRON-590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15762200#comment-15762200
 ] 

ASF GitHub Bot commented on METRON-590:
---------------------------------------

Github user merrimanr commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/395#discussion_r93111809
  
    --- Diff: 
metron-platform/metron-common/src/main/java/org/apache/metron/common/configuration/manager/ZkConfigurationManager.java
 ---
    @@ -0,0 +1,129 @@
    +/*
    + *
    + *  Licensed to the Apache Software Foundation (ASF) under one
    + *  or more contributor license agreements.  See the NOTICE file
    + *  distributed with this work for additional information
    + *  regarding copyright ownership.  The ASF licenses this file
    + *  to you under the Apache License, Version 2.0 (the
    + *  "License"); you may not use this file except in compliance
    + *  with the License.  You may obtain a copy of the License at
    + *
    + *      http://www.apache.org/licenses/LICENSE-2.0
    + *
    + *  Unless required by applicable law or agreed to in writing, software
    + *  distributed under the License is distributed on an "AS IS" BASIS,
    + *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
    + *  See the License for the specific language governing permissions and
    + *  limitations under the License.
    + *
    + */
    +
    +package org.apache.metron.common.configuration.manager;
    +
    +import org.apache.curator.framework.CuratorFramework;
    +import org.apache.curator.framework.recipes.cache.NodeCache;
    +import org.apache.curator.utils.CloseableUtils;
    +import org.apache.metron.common.utils.JSONUtils;
    +
    +import java.io.ByteArrayInputStream;
    +import java.io.IOException;
    +import java.util.Collections;
    +import java.util.HashMap;
    +import java.util.Map;
    +import java.util.Optional;
    +
    +import static org.apache.commons.lang.ArrayUtils.isNotEmpty;
    +
    +/**
    + * Responsible for managing configuration values that are created, 
persisted, and updated
    + * in Zookeeper.
    + */
    +public class ZkConfigurationManager implements ConfigurationManager {
    --- End diff --
    
    Let me attempt to give you some context as to why the 
ConfiguredBolt.prepare method was written that way.  First a TreeCache was 
necessary to allow configs to be added at runtime since the Zookeeper node for 
that config may or may not exist at startup.  If that feature is not important 
then I think a collection of NodeCaches is fine.  Second, the configs are 
stored in Zookeeper as JSON so there is a deserialization step that needs to 
happen before they can be read in a bolt.   A listener allows a bolt to react 
to configuration changes asynchronously, hence deserialization only happens 
when a config changes and not every time a tuple is processed.    A bolt can 
also do other expensive tasks (not just deserializing JSON) like reinitializing 
objects or clearing caches.
    
    That being said it makes me nervous that deserialization happens in a 
synchronized method every time a tuple is executed.  If this is going to be 
used in a low volume topology it's probably fine but if you might want to 
reconsider using a listener if this should be supported in high velocity 
streams. 
    
    It's a bummer you couldn't reuse ConfiguredBolt.  Is there a way we can 
make it more flexible so that you can reuse it?


> Enable Use of Event Time in Profiler
> ------------------------------------
>
>                 Key: METRON-590
>                 URL: https://issues.apache.org/jira/browse/METRON-590
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Nick Allen
>            Assignee: Nick Allen
>
> There are at least two different times that are important to consider when 
> handling the telemetry messages received by Metron.  
> (1) Processing time is the time at which Metron processed the message.  
> (2) Event time is the time at which the event actually occurred.
> If Metron is consuming live data and all is well, the processing and event 
> times may remain close and consistent. When processing time differs from 
> event time the data produced by the Profiler may be inaccurate.  There are a 
> few scenarios under which these times might differ greatly which would 
> negatively impact the feature set produced by the Profiler.  
> (1) When the system has experienced an outage, for example, a scheduled 
> maintenance window. When restarted a high volume of messages will need to be 
> processed by the Profiler.  The output of the Profiler will indicate an 
> increase in activity, although no change in activity actually occurred on the 
> target network.  This could happen whether the outage was Metron itself or an 
> upstream system that feeds data to Metron.
> (2) If the user attempts to replay historical telemetry through the Profiler, 
> the Profiler will attribute the activity to the time period in which it was 
> processed.  Obviously the activity should be attributed to the time period in 
> which the raw telemetry events originated in.
> There are some scenarios when processing time might be preferred and other 
> use cases where event time is preferred.  The Profiler should be enhanced to 
> allow it to produce profiles based on either processing time or event time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to