metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickwallen <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #435: METRON-684: Decouple Timestamp calculati...
Date Fri, 03 Feb 2017 16:46:12 GMT
Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/435#discussion_r99374496
  
    --- Diff: metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/ProfilePeriod.java
---
    @@ -51,7 +61,7 @@ public ProfilePeriod(long epochMillis, long duration, TimeUnit units)
{
           throw new IllegalArgumentException(format(
                   "period duration must be greater than 0; got '%d %s'", duration, units));
         }
    -
    +    this.timestamp = epochMillis;
    --- End diff --
    
    I can't see where you are using this value, but maybe I am missing it.
    
    I'd be cautious of using this value because it could be a timestamp anywhere throughout
the period.  If you really need a timestamp for the period, then it might be better to use
`getStartTimeMillis()`. That will give you the same timestamp for the period; no matter what
initial timestamp was used to find that period.


---
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