You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2019/03/12 21:01:17 UTC

[GitHub] [drill] cgivre commented on a change in pull request #1637: DRILL-7032: Ignore corrupt rows in a PCAP file

cgivre commented on a change in pull request #1637: DRILL-7032: Ignore corrupt rows in a PCAP file
URL: https://github.com/apache/drill/pull/1637#discussion_r264882649
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/decoder/Packet.java
 ##########
 @@ -319,7 +324,11 @@ public int getDst_port() {
     byte[] data = null;
     if (packetLength >= payloadDataStart) {
       data = new byte[packetLength - payloadDataStart];
-      System.arraycopy(raw, ipOffset + payloadDataStart, data, 0, data.length);
+      try {
+        System.arraycopy(raw, ipOffset + payloadDataStart, data, 0, data.length);
 
 Review comment:
   I looked through this, and found that the way the pcap plugin was handling boolean fields needed some work.  So, now all the tcp flags and the `is_corrupt` fields are actual booleans.  
   I included an additional unit test to demonstrate this. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services