mmiklavc commented on a change in pull request #1438: METRON-2153: 
ParserIntegrationTest should print failed messages
URL: https://github.com/apache/metron/pull/1438#discussion_r290361824
 
 

 ##########
 File path: 
metron-platform/metron-parsing/metron-parsing-storm/src/main/java/org/apache/metron/parsers/bolt/ParserBolt.java
 ##########
 @@ -326,6 +326,10 @@ protected void handleError(String sensorType, byte[] 
originalMessage, Tuple tupl
             .withThrowable(ex)
             .withSensorType(Collections.singleton(sensorType))
             .addRawMessage(originalMessage);
+    handleError(collector, error);
+  }
+
+  protected void handleError(OutputCollector collector, MetronError error) {
 
 Review comment:
   Hey, I like this pattern you used here of pushing the external dep into a 
function. Any future refactoring on code that does this becomes a bit easier. 
Also:
   
   - Easier to read
   - Gives a more consistent abstraction level within the main method
   - Encourages good composition patterns, which is great architecturally as 
well as for unit testing

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to