Nick Allen created METRON-1062:
----------------------------------

             Summary: SaltyRowKeyBuilder Handles Out of Order Timestamps 
Incorrectly
                 Key: METRON-1062
                 URL: https://issues.apache.org/jira/browse/METRON-1062
             Project: Metron
          Issue Type: Bug
            Reporter: Nick Allen
            Priority: Minor


In org/apache/metron/profiler/hbase/SaltyRowKeyBuilder...

{code}
    * @return All of the row keys necessary to retrieve the profile 
measurements.
    */
   @Override
-  public List<byte[]> rowKeys(String profile, String entity, List<Object> 
groups, long start, long end) {
+  public List<byte[]> encode(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);
     start = Math.min(start, end);
{code}

Per [~mattf]: https://github.com/apache/metron/pull/622#discussion_r128650596

bq. Heh, this has been in the code for a long time, but isn't this a bug? If it 
starts out in the wrong order, say end is 1 and start is 5, won't this pair of 
statements result in both end and start being equal to the larger, ie 5 ? We 
need an intermediate variable for a binary swap!



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to