Closed sadikovi closed 7 years ago
Remove NetFlowCorruptSuite.scala
.
@@ master #59 diff @@
==========================================
Files 21 21
Lines 908 913 +5
Methods 770 773 +3
Messages 0 0
Branches 138 140 +2
==========================================
+ Hits 871 876 +5
Misses 37 37
Partials 0 0
Powered by Codecov. Last update 9d405a6...cb20e75
This PR takes more general approach of introducing
ignoreCorruptFiles
. It updates NetFlowFileRDD to respect Spark optionspark.files.ignoreCorruptFiles
. When this Spark option is true, files that are corrupt or not NetFlow files are ignored. If file partially corrupt, then only recoverable data is read (up to corrupted block), if reader fails to initialize, then empty iterator is returned from that file.This change is also added to
netflowlib
, so reader can take optionignoreCorruptFiles
(default isfalse
) and, in case of failure, setsisValid()
to false, and returnsCorruptNetFlowHeader
, which is no-op for most of the operations. When flag is true,SafeIterator
is returned, that terminates on failure.