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

    https://github.com/apache/metron/pull/622#discussion_r127328660
  
    --- Diff: 
metron-analytics/metron-profiler-client/src/main/java/org/apache/metron/profiler/client/stellar/GetProfile.java
 ---
    @@ -216,21 +211,7 @@ private ColumnBuilder getColumnBuilder(Map<String, 
Object> global) {
        * @param global The global configuration.
        */
       private RowKeyBuilder getRowKeyBuilder(Map<String, Object> global) {
    -
    -    // how long is the profile period?
    -    long duration = PROFILER_PERIOD.get(global, Long.class);
    -    LOG.debug("profiler client: {}={}", PROFILER_PERIOD, duration);
    -
    -    // which units are used to define the profile period?
    -    String configuredUnits = PROFILER_PERIOD_UNITS.get(global, 
String.class);
    -    TimeUnit units = TimeUnit.valueOf(configuredUnits);
    -    LOG.debug("profiler client: {}={}", PROFILER_PERIOD_UNITS, units);
    -
    -    // what is the salt divisor?
    -    Integer saltDivisor = PROFILER_SALT_DIVISOR.get(global, Integer.class);
    -    LOG.debug("profiler client: {}={}", PROFILER_SALT_DIVISOR, 
saltDivisor);
    -
    -    return new SaltyRowKeyBuilder(saltDivisor, duration, units);
    +    return RowKeyBuilderFactory.create(global);
    --- End diff --
    
    This is where we need to instantiate the `RowKeyBuilder` for the Profiler 
Client API.  Like I will discuss in another thread, the logic got complex and 
kind of nasty so I encapsulated it in its own `RowKeyBuilderFactory`.  See that 
class for a further discussion as to why it is kind of nasty.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to