Github user justinleet commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/486#discussion_r107522830
--- 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 --
Is it reasonable to include the key and value we're having issues with in
the debug statement?
---
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 [email protected] or file a JIRA ticket
with INFRA.
---