[ 
https://issues.apache.org/jira/browse/METRON-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16011087#comment-16011087
 ] 

ASF GitHub Bot commented on METRON-950:
---------------------------------------

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

    https://github.com/apache/metron/pull/584#discussion_r116564604
  
    --- Diff: 
metron-platform/metron-storm-kafka-override/src/main/java/org/apache/storm/kafka/spout/internal/Timer.java
 ---
    @@ -0,0 +1,58 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.storm.kafka.spout.internal;
    +
    +import java.util.concurrent.TimeUnit;
    +import org.apache.storm.utils.Time;
    +
    +public class Timer {
    +  private final long delay;
    +  private final long period;
    +  private final TimeUnit timeUnit;
    +  private final long periodNanos;
    +  private long start;
    +
    +  public Timer(long delay, long period, TimeUnit timeUnit) {
    +    this.delay = delay;
    +    this.period = period;
    +    this.timeUnit = timeUnit;
    +    this.periodNanos = timeUnit.toNanos(period);
    +    this.start = System.nanoTime() + timeUnit.toNanos(delay);
    +  }
    +
    +  public long period() {
    +    return this.period;
    +  }
    +
    +  public long delay() {
    +    return this.delay;
    +  }
    +
    +  public TimeUnit getTimeUnit() {
    +    return this.timeUnit;
    +  }
    +
    +  public boolean isExpiredResetOnTrue() {
    --- End diff --
    
    I'm not sure how complicated the original implementation is vs this one.  
Could we grab any unit tests on the original Timer and make sure that this 
Timer meets the same expectations?


> Migrate storm-kafka-client to 1.1
> ---------------------------------
>
>                 Key: METRON-950
>                 URL: https://issues.apache.org/jira/browse/METRON-950
>             Project: Metron
>          Issue Type: Improvement
>            Reporter: Casey Stella
>            Assignee: Casey Stella
>
> There are MAJOR performance issues with the storm-kafka-client.  Throughput 
> is roughly an order of magnitude faster in the 1.1.0 version vs the 1.0.3.
> This also removes the requirement for the non-HDP profile to rely on the HDP 
> repo.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to