metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cestella <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #481: METRON-322 Global Batching and Flushing
Date Thu, 23 Mar 2017 19:53:42 GMT
Github user cestella commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/481#discussion_r107766918
  
    --- Diff: metron-platform/metron-common/src/main/java/org/apache/metron/common/configuration/IndexingConfigurations.java
---
    @@ -73,7 +74,30 @@ public boolean isDefault(String sensorName, String writerName) {
       }
     
       public int getBatchSize(String sensorName, String writerName ) {
    -     return getBatchSize(getSensorIndexingConfig(sensorName, writerName));
    +    return getBatchSize(getSensorIndexingConfig(sensorName, writerName));
    +  }
    +
    +  public int getBatchTimeout(String sensorName, String writerName ) {
    +    return getBatchTimeout(getSensorIndexingConfig(sensorName, writerName));
    +  }
    +
    +  public List<Integer> getAllConfiguredTimeouts(String writerName) {
    +    //The configuration infrastructure was not designed to enumerate sensors, so we synthesize.
    +    //The use of SENSOR_MARKER_STRING assumes the config key for a sensor name consists
of a
    +    //prefix string (dependent on the ConfigurationType) followed by the sensor name.
    +    //This then allows us to determine the keyPrefixString, and thence which of all the
    +    //configurations.keySet are actually sensor keys.  Then we look under those for timeouts.
    +    String markerKeyString = getKey(SENSOR_MARKER_STRING);
    --- End diff --
    
    Could you perhaps go a bit into why you're using this `SENSOR_MARKER_STRING` again?  I
read the comment and I am still not entirely sure.  I think, at a high level, what you're
trying to do is, for a given writer (e.g. `hdfs`) you want a list of all of the configured
timeouts across all sensors, right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message