cryptoe commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1080770286


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQWarningReportLimiterPublisher.java:
##########
@@ -108,6 +115,12 @@ public void publishException(int stageNumber, Throwable e)
         return;
       }
     }
+    if (CannotParseExternalDataFault.CODE.equals(errorCode)) {

Review Comment:
   > How do i go about attaching a debugger in MSQ to see if these reports are 
being captured/emitted
   
   MSQWarningsTest#testThrowExceptionWhenParseExceptionsExceedLimit should be a 
good one. 
   
   `CompositeExceptionPublisher` will implement the renamed interface 
`ExceptionPublisher` something like
   
   ```java
   class CompositeExceptionPublisher implements ExceptionPublisher{
   List<ExceptionPublisher> delegates;
   
   public CompositeExceptionPublisher(List<ExceptionPublisher> delegates){
   
   this.delegates=delegates;
   }
   
   void publishException(int stageNumber, Throwable e){
   for(ExceptionPublisher delegate:delegates){
   delegate.publishException(stage,e);
   }
   }
   
   
     void close() throws IOException{
   for(ExceptionPublisher delegate:delegates){
   delegate.close();
   }
   }
   
   
   }
   
   ```
   
   Now you can create a new impl `FilteredEmitterExceptionPublisher` and pass 
it errorCodes in the constructor. 
   
   Then in WorkerImpl#runTask method create a CompositeExceptionPublisher with 
MSQWarningReportLimiterPublisher and FilteredEmitterExceptionPublisher and pass 
it along. 
   
   Maybe this strategy can work. 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to