[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-06-05 Thread Casey Stella (JIRA)

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

Casey Stella commented on METRON-950:
-

Nope, I just forgot to close it.

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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-06-05 Thread Kristopher Kane (JIRA)

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

Kristopher Kane commented on METRON-950:


Looking to do the same for an internal project on Storm 1.0.x.

I see https://github.com/apache/metron/pull/584 was merged 20 days ago. Is this 
JIRA pending any work?  

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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user asfgit closed the pull request at:

https://github.com/apache/metron/pull/584


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user justinleet commented on the issue:

https://github.com/apache/metron/pull/584
  
Same here, +1.  Thanks a lot for the contribution, this makes a big 
difference.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
+1. Data flowed through to ES as expected, and I was able to spin up pcap. 
Along with @justinleet having tested the other topologies, I'm happy with the 
results. Great work @cestella!


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user cestella commented on the issue:

https://github.com/apache/metron/pull/584
  
@ctramnitz While we don't really test on 1.1 yet, this shouldn't have an 
impact on the topologies running there.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user cestella reopened a pull request:

https://github.com/apache/metron/pull/584

METRON-950: Migrate storm-kafka-client to 1.1

## Contributor Comments
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.

I will point out that the storm-kafka-client in 1.1 does rely on 
`Time.nanoTime()`, a method call that was introduced in 1.1.  To get around 
this, I've created the `metron-storm-kafka-override` with a backported 
implementation of the `Time` class.  This will be removed when we migrate to 
Storm 1.1.

Normally, I would hold off this change until we take the effort to migrate 
to 1.1 properly, but the combination of empirical evidence (I saw it go an 
order of magnitude slower in 1.0.1 vs 1.1) and wide ranging change for Storm 
1.1 makes me err on the side of getting this in faster.  It should help make 
every topology faster, but is in particular absolutely required to get sensible 
throughput in the pcap topology.

## Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.  
Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  


In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
 
- [x] Does your PR title start with METRON- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?


### For code changes:
- [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
- [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
- [x] Have you ensured that the full suite of tests and checks have been 
executed in the root incubating-metron folder via:
  ```
  mvn -q clean integration-test install && build_utils/verify_licenses.sh 
  ```

- [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
- [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?

### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in 
which it is rendered by building and verifying the site-book? If not then run 
the following commands and the verify changes via 
`site-book/target/site/index.html`:

  ```
  cd site-book
  mvn site
  ```

 Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
It is also recommended that [travis-ci](https://travis-ci.org) is set up 
for your personal repository such that your branches are built there before 
submitting a pull request.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cestella/incubator-metron storm_kafka_spout_11

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/metron/pull/584.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #584


commit a4cdfdcaaf15c8c60749a103d38b55e77703c2d5
Author: cstella 
Date:   2017-05-12T15:59:18Z

Upgrading spout to 1.1 for performance.

commit 7ef320d3d80324d2322943a7b95354f0ef6c3852
Author: cstella 
Date:   2017-05-12T16:09:57Z

Travis drama.

commit 284c6452d08bc050fe8b1c66e5c85e4a95804cad
Author: cstella 
Date:   2017-05-12T18:09:05Z

Update

commit 4246c36d7fdb94505d789c3

[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user cestella closed the pull request at:

https://github.com/apache/metron/pull/584


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user justinleet commented on the issue:

https://github.com/apache/metron/pull/584
  
I ran up the main topologies last night and everything seemed to correlate 
correctly and ran without issue.  Hadn't run up pcap yet, but it look like 
@mmiklavc is working on validating it.  Given that it's the same spout 
throughout, I'm not convinced it's necessary to retread it.  Anybody disagree?


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-16 Thread ASF GitHub Bot (JIRA)

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

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

Github user ctramnitz commented on the issue:

https://github.com/apache/metron/pull/584
  
Does this change have any impact on using Storm 1.1 (i.e. from HDP 2.6)?


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
@nickwallen Yeah, that's where I landed. Looking in our pcap helper class, 
I see the following.
```
  public static MetronEthernetDecoder createDecoder() {
MetronEthernetDecoder ethernetDecoder = new MetronEthernetDecoder();
IpDecoder ipDecoder = new IpDecoder();
ethernetDecoder.register(EthernetType.IPV4, ipDecoder);
return ethernetDecoder;
  }
```


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user nickwallen commented on the issue:

https://github.com/apache/metron/pull/584
  
Does `pcap_inspector` only print out for TCP packets?  The first 5 of those 
are all UDP based (NTP & DNS).


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
When I spin this up in full dev, half the records don't output with the 
pcap_inspector. I'm running:
`pycapa --producer --interface eth0 --kafka-broker node1:6667 --kafka-topic 
pcap --max-packets 10`

And I get 10 records, as expected. 

/usr/metron/0.4.0/bin/pcap_inspector.sh -i 
/apps/metron/pcap/pcap_pcap_1494886095377022000_0_pcap-7-1494887672
```
TS: May 15, 2017 10:08:15 PM UTC
TS: May 15, 2017 10:08:17 PM UTC
TS: May 15, 2017 10:08:17 PM UTC
TS: May 15, 2017 10:08:20 PM UTC
TS: May 15, 2017 10:08:20 PM UTC
TS: May 15, 2017 10:08:22 PM UTC,ip_src_addr: 10.0.2.2,ip_src_port: 
58390,ip_dst_addr: 10.0.2.15,ip_dst_port: 22,protocol: 6
TS: May 15, 2017 10:08:22 PM UTC,ip_src_addr: 10.0.2.15,ip_src_port: 
22,ip_dst_addr: 10.0.2.2,ip_dst_port: 58390,protocol: 6
TS: May 15, 2017 10:08:25 PM UTC,ip_src_addr: 10.0.2.2,ip_src_port: 
58390,ip_dst_addr: 10.0.2.15,ip_dst_port: 22,protocol: 6
TS: May 15, 2017 10:08:25 PM UTC,ip_src_addr: 10.0.2.15,ip_src_port: 
22,ip_dst_addr: 10.0.2.2,ip_dst_port: 58390,protocol: 6
TS: May 15, 2017 10:08:27 PM UTC,ip_src_addr: 10.0.2.2,ip_src_port: 
58390,ip_dst_addr: 10.0.2.15,ip_dst_port: 22,protocol: 6
```
Wireshark seems to be OK.

![image](https://cloud.githubusercontent.com/assets/658443/26083299/29d5c0fe-3992-11e7-8139-ed9e103c4384.png)

I'm looking into this and will update as I have more info.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116584769
  
--- 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 --

Ok, done, added test.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116581475
  
--- 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 --

It is precisely the 1.1.0 version of the code with the exception of calling 
`System.nanoTime` instead of `Time.nanoTime` (see 
[here](https://github.com/apache/storm/blob/a4afacd9617d620f50cf026fc599821f7ac25c79/external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/internal/Timer.java)
 ).

It should be noted that `Time.nanoTime` calls `System.nanoTime` (see 
[here](https://github.com/apache/storm/blob/a4afacd9617d620f50cf026fc599821f7ac25c79/storm-client/src/jvm/org/apache/storm/utils/Time.java#L162)
 ) in a production scenario (i.e. non-simulation).


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
OK, works for me


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user cestella commented on the issue:

https://github.com/apache/metron/pull/584
  
@mmiklavc it is.  To give guarantees beyond that, would require us to shade 
and relocate the `metron-kafka-spout` project, which I did not want to do 
without some good justification.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116579916
  
--- Diff: 
metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java
 ---
@@ -202,31 +240,4 @@ public String getTopic() {
 return new StormKafkaSpout<>(builder);
   }
 
-  private static Map modifyKafkaProps(Map 
props, String zkQuorum) {
-try {
-  if(!props.containsKey(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS)) {
-//this isn't a putIfAbsent because I only want to pull the brokers 
from zk if it's absent.
-List brokers = 
KafkaUtils.INSTANCE.getBrokersFromZookeeper(zkQuorum);
-props.put(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS, 
Joiner.on(",").join(brokers));
-  }
-  props.putIfAbsent(KafkaSpoutConfig.Consumer.KEY_DESERIALIZER, 
ByteArrayDeserializer.class.getName());
-  props.putIfAbsent(KafkaSpoutConfig.Consumer.VALUE_DESERIALIZER, 
ByteArrayDeserializer.class.getName());
-
-} catch (Exception e) {
-  throw new IllegalStateException("Unable to retrieve brokers from 
zookeeper: " + e.getMessage(), e);
-}
-return props;
-  }
-
-  private static  KafkaSpoutTuplesBuilder 
createTuplesBuilder(List config, String topic) {
-TupleBuilder tb =  new TupleBuilder(topic, 
FieldsConfiguration.toList(config));
-return new KafkaSpoutTuplesBuilderNamedTopics.Builder<>(tb).build();
-  }
-
-
-  private static KafkaSpoutStreams createStreams(List config, 
String topic) {
-final Fields fields = 
FieldsConfiguration.getFields(FieldsConfiguration.toList(config));
-return new KafkaSpoutStreamsNamedTopics.Builder(fields, STREAM, new 
String[] { topic} ).build();
--- End diff --

Yep


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
@cestella How are we guaranteeing our version of Timer is included over the 
1.1 version? Is this purely dependency ordering with the Maven Shade plugin?


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

Github user mmiklavc commented on the issue:

https://github.com/apache/metron/pull/584
  
Just to clarify for others looking at this, there is a `Timer` class in 
`storm-kafka-client-1.1.0` which depends on a `Time` class (no 'r') in 
storm-core. In 1.0.3, the main version of Storm we depend on, there is no 
`nanoTime()` method. This was introduced in 1.1. @cestella is handling this via 
the temporary module `metron-storm-kafka-override` via `System.nanoTime()`.

We're only recommending upgrading the client currently because, first and 
foremost, it provides the desired performance improvements, and second the 
impact is significantly less than upgrading the whole of Storm.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116574125
  
--- 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 --

That's a good catch.  It'd be nice to have that tested.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116574075
  
--- Diff: 
metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java
 ---
@@ -165,13 +177,39 @@ public SimpleStormKafkaBuilder( Map 
kafkaProps
 , List fieldsConfiguration
 )
   {
-super( modifyKafkaProps(kafkaProps, zkQuorum)
- , createStreams(fieldsConfiguration, topic)
- , createTuplesBuilder(fieldsConfiguration, topic)
- );
+super( getBootstrapServers(zkQuorum, kafkaProps)
+ , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
+ , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
+ , topic
+);
+setProp(kafkaProps);
+setRecordTranslator(new 
SpoutRecordTranslator<>(FieldsConfiguration.toList(fieldsConfiguration)));
 this.topic = topic;
   }
 
+  private static  Class> createDeserializer( 
Optional deserializerClass
--- End diff --

I'm not super keen on passing in possibly null values around.  I rather 
like the notion of passing in that something is optional in the type signature.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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

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

https://github.com/apache/metron/pull/584#discussion_r116573877
  
--- Diff: pom.xml ---
@@ -106,7 +122,7 @@
  but I justify it by noting that this should be able to be 
removed when we migrate to
  Storm 1.1.x, which properly supports Kafka 0.10.x.
   -->
-
1.0.1.2.5.0.0-1245
+1.1.0
--- End diff --

yeah, good idea


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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_r116568707
  
--- Diff: pom.xml ---
@@ -106,7 +122,7 @@
  but I justify it by noting that this should be able to be 
removed when we migrate to
  Storm 1.1.x, which properly supports Kafka 0.10.x.
   -->
-
1.0.1.2.5.0.0-1245
+1.1.0
--- End diff --

Couldn't the whole block above this be dropped/edited?  It's pure HDP 
profile now, right?  Or better yet, replaced with an explanation of the new 
1.1.0 + Timer explanation.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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_r116566613
  
--- Diff: 
metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java
 ---
@@ -202,31 +240,4 @@ public String getTopic() {
 return new StormKafkaSpout<>(builder);
   }
 
-  private static Map modifyKafkaProps(Map 
props, String zkQuorum) {
-try {
-  if(!props.containsKey(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS)) {
-//this isn't a putIfAbsent because I only want to pull the brokers 
from zk if it's absent.
-List brokers = 
KafkaUtils.INSTANCE.getBrokersFromZookeeper(zkQuorum);
-props.put(KafkaSpoutConfig.Consumer.BOOTSTRAP_SERVERS, 
Joiner.on(",").join(brokers));
-  }
-  props.putIfAbsent(KafkaSpoutConfig.Consumer.KEY_DESERIALIZER, 
ByteArrayDeserializer.class.getName());
-  props.putIfAbsent(KafkaSpoutConfig.Consumer.VALUE_DESERIALIZER, 
ByteArrayDeserializer.class.getName());
-
-} catch (Exception e) {
-  throw new IllegalStateException("Unable to retrieve brokers from 
zookeeper: " + e.getMessage(), e);
-}
-return props;
-  }
-
-  private static  KafkaSpoutTuplesBuilder 
createTuplesBuilder(List config, String topic) {
-TupleBuilder tb =  new TupleBuilder(topic, 
FieldsConfiguration.toList(config));
-return new KafkaSpoutTuplesBuilderNamedTopics.Builder<>(tb).build();
-  }
-
-
-  private static KafkaSpoutStreams createStreams(List config, 
String topic) {
-final Fields fields = 
FieldsConfiguration.getFields(FieldsConfiguration.toList(config));
-return new KafkaSpoutStreamsNamedTopics.Builder(fields, STREAM, new 
String[] { topic} ).build();
--- End diff --

STREAM isn't used anymore, right? Can we kill the field (and no, I can't 
comment on the field because it's not technically part of the diff, sigh).


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-15 Thread ASF GitHub Bot (JIRA)

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

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_r116567399
  
--- Diff: 
metron-platform/metron-storm-kafka/src/main/java/org/apache/metron/storm/kafka/flux/SimpleStormKafkaBuilder.java
 ---
@@ -165,13 +177,39 @@ public SimpleStormKafkaBuilder( Map 
kafkaProps
 , List fieldsConfiguration
 )
   {
-super( modifyKafkaProps(kafkaProps, zkQuorum)
- , createStreams(fieldsConfiguration, topic)
- , createTuplesBuilder(fieldsConfiguration, topic)
- );
+super( getBootstrapServers(zkQuorum, kafkaProps)
+ , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
+ , 
createDeserializer(Optional.ofNullable((String)kafkaProps.get(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG)),
 DEFAULT_DESERIALIZER)
+ , topic
+);
+setProp(kafkaProps);
+setRecordTranslator(new 
SpoutRecordTranslator<>(FieldsConfiguration.toList(fieldsConfiguration)));
 this.topic = topic;
   }
 
+  private static  Class> createDeserializer( 
Optional deserializerClass
--- End diff --

This is nitpicky, so don't feel obligated to fix it, but couldn't this 
method just take a (possibly null) String, and wrap it in the Optional itself?  
It seems pointless to make the caller wrap it when it's just as easy for the 
function itself to handle null.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-12 Thread ASF GitHub Bot (JIRA)

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

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

Github user cestella commented on the issue:

https://github.com/apache/incubator-metron/pull/584
  
The test plan for this should be mainly a smoke test..make sure data flows 
through the default topologies in full dev.


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


[jira] [Commented] (METRON-950) Migrate storm-kafka-client to 1.1

2017-05-12 Thread ASF GitHub Bot (JIRA)

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

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

GitHub user cestella opened a pull request:

https://github.com/apache/incubator-metron/pull/584

METRON-950: Migrate storm-kafka-client to 1.1

## Contributor Comments
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.

I will point out that the storm-kafka-client in 1.1 does rely on 
`Time.nanoTime()`, a method call that was introduced in 1.1.  To get around 
this, I've created the `metron-storm-kafka-override` with a backported 
implementation of the `Time` class.  This will be removed when we migrate to 
Storm 1.1.

Normally, I would hold off this change until we take the effort to migrate 
to 1.1 properly, but the combination of empirical evidence (I saw it go an 
order of magnitude slower in 1.0.1 vs 1.1) and wide ranging change for Storm 
1.1 makes me err on the side of getting this in faster.  It should help make 
every topology faster, but is in particular absolutely required to get sensible 
throughput in the pcap topology.

## Pull Request Checklist

Thank you for submitting a contribution to Apache Metron.  
Please refer to our [Development 
Guidelines](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=61332235)
 for the complete guide to follow for contributions.  
Please refer also to our [Build Verification 
Guidelines](https://cwiki.apache.org/confluence/display/METRON/Verifying+Builds?show-miniview)
 for complete smoke testing guides.  


In order to streamline the review of the contribution we ask you follow 
these guidelines and ask you to double check the following:

### For all changes:
- [x] Is there a JIRA ticket associated with this PR? If not one needs to 
be created at [Metron 
Jira](https://issues.apache.org/jira/browse/METRON/?selectedTab=com.atlassian.jira.jira-projects-plugin:summary-panel).
 
- [x] Does your PR title start with METRON- where  is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
- [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?


### For code changes:
- [x] Have you included steps to reproduce the behavior or problem that is 
being changed or addressed?
- [x] Have you included steps or a guide to how the change may be verified 
and tested manually?
- [x] Have you ensured that the full suite of tests and checks have been 
executed in the root incubating-metron folder via:
  ```
  mvn -q clean integration-test install && build_utils/verify_licenses.sh 
  ```

- [x] Have you written or updated unit tests and or integration tests to 
verify your changes?
- [x] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
- [ ] Have you verified the basic functionality of the build by building 
and running locally with Vagrant full-dev environment or the equivalent?

### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in 
which it is rendered by building and verifying the site-book? If not then run 
the following commands and the verify changes via 
`site-book/target/site/index.html`:

  ```
  cd site-book
  mvn site
  ```

 Note:
Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.
It is also recommended that [travis-ci](https://travis-ci.org) is set up 
for your personal repository such that your branches are built there before 
submitting a pull request.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cestella/incubator-metron storm_kafka_spout_11

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-metron/pull/584.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #584


commit a4cdfdcaaf15c8c60749a103d38b55e77703c2d5
Author: cstella 
Date:   2017-05-12T15:59:18Z

Upgrading spout to 1.1 for performance.

commit 7ef320d3d80324d2322943a7b95354f0ef6c3852
Author: cstella 
Date:   2017-05-12T16:09:57Z

Travis drama.

commit 284c6452d08bc050fe8b1c66e5c85e4a95804cad
Author: cstella 
Date:   2017-05-12T18:09:05Z

Update




> Mig