metron-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nickal...@apache.org
Subject metron git commit: METRON-1119 Bad Out-of-Order Logic for SaltyRowKeyBuilder (nickwallen) closes apache/metron#706
Date Thu, 24 Aug 2017 18:57:50 GMT
Repository: metron
Updated Branches:
  refs/heads/master ebfbe9d5e -> 8059c9fd4


METRON-1119 Bad Out-of-Order Logic for SaltyRowKeyBuilder (nickwallen) closes apache/metron#706


Project: http://git-wip-us.apache.org/repos/asf/metron/repo
Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/8059c9fd
Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/8059c9fd
Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/8059c9fd

Branch: refs/heads/master
Commit: 8059c9fd49cbe174abd2ab92c1efff8842e0b3b0
Parents: ebfbe9d
Author: nickwallen <nick@nickallen.org>
Authored: Thu Aug 24 14:57:28 2017 -0400
Committer: nickallen <nickallen@apache.org>
Committed: Thu Aug 24 14:57:28 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/metron/blob/8059c9fd/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java
----------------------------------------------------------------------
diff --git a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java
b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java
index b01fc28..3f889bc 100644
--- a/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java
+++ b/metron-analytics/metron-profiler-common/src/main/java/org/apache/metron/profiler/hbase/SaltyRowKeyBuilder.java
@@ -83,8 +83,9 @@ public class SaltyRowKeyBuilder implements RowKeyBuilder {
   @Override
   public List<byte[]> rowKeys(String profile, String entity, List<Object> groups,
long start, long end) {
     // be forgiving of out-of-order start and end times; order is critical to this algorithm
-    end = Math.max(start, end);
+    long max = Math.max(start, end);
     start = Math.min(start, end);
+    end = max;
 
     // find the starting period and advance until the end time is reached
     return ProfilePeriod.visitPeriods( start


Mime
View raw message