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

    https://github.com/apache/incubator-metron/pull/486#discussion_r107683392
  
    --- Diff: 
metron-platform/metron-pcap-backend/src/main/java/org/apache/metron/spout/pcap/HDFSWriterCallback.java
 ---
    @@ -96,16 +109,18 @@ public HDFSWriterCallback withConfig(HDFSWriterConfig 
config) {
             this.config = config;
             return this;
         }
    +
         @Override
         public List<Object> apply(List<Object> tuple, EmitContext context) {
    -
    -        List<Object> keyValue = (List<Object>) tuple.get(0);
    -        LongWritable ts = (LongWritable) keyValue.get(0);
    -        BytesWritable rawPacket = (BytesWritable)keyValue.get(1);
    +        byte[] key = (byte[]) tuple.get(0);
    +        byte[] value = (byte[]) tuple.get(1);
    +        if(!config.getDeserializer().deserializeKeyValue(key, value, 
KeyValue.key.get(), KeyValue.value.get())) {
    +            LOG.debug("Dropping malformed packet...");
    --- End diff --
    
    I'm good with that. I had mostly discarded the worry about size because 
this is in debugging statements anyway and typically with storm you're setting 
reasonable timeouts on logging levels anyway.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to