You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2023/01/13 23:20:32 UTC

[GitHub] [druid] TSFenwick opened a new pull request, #13670: msq path to emit unparseable exceptions

TSFenwick opened a new pull request, #13670:
URL: https://github.com/apache/druid/pull/13670

   <!-- Thanks for trying to help us make Apache Druid be the best it can be! Please fill out as much of the following information as is possible (where relevant, and remove it when irrelevant) to help make the intention and scope of this PR clear in order to ease review. -->
   
   <!-- Please read the doc for contribution (https://github.com/apache/druid/blob/master/CONTRIBUTING.md) before making this PR. Also, once you open a PR, please _avoid using force pushes and rebasing_ since these make it difficult for reviewers to see what you've changed in response to their reviews. See [the 'If your pull request shows conflicts with master' section](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#if-your-pull-request-shows-conflicts-with-master) for more details. -->
   
   Fixes #XXXX.
   
   <!-- Replace XXXX with the id of the issue fixed in this PR. Remove this section if there is no corresponding issue. Don't reference the issue in the title of this pull-request. -->
   
   <!-- If you are a committer, follow the PR action item checklist for committers:
   https://github.com/apache/druid/blob/master/dev/committer-instructions.md#pr-and-issue-action-item-checklist-for-committers. -->
   
   ### Description
   
   <!-- Describe the goal of this PR, what problem are you fixing. If there is a corresponding issue (referenced above), it's not necessary to repeat the description here, however, you may choose to keep one summary sentence. -->
   
   <!-- Describe your patch: what did you change in code? How did you fix the problem? -->
   
   <!-- If there are several relatively logically separate changes in this PR, create a mini-section for each of them. For example: -->
   
   #### Fixed the bug ...
   #### Renamed the class ...
   #### Added a forbidden-apis entry ...
   
   <!--
   In each section, please describe design decisions made, including:
    - Choice of algorithms
    - Behavioral aspects. What configuration values are acceptable? How are corner cases and error conditions handled, such as when there are insufficient resources?
    - Class organization and design (how the logic is split between classes, inheritance, composition, design patterns)
    - Method organization and design (how the logic is split between methods, parameters and return types)
    - Naming (class, method, API, configuration, HTTP endpoint, names of emitted metrics)
   -->
   
   
   <!-- It's good to describe an alternative design (or mention an alternative name) for every design (or naming) decision point and compare the alternatives with the designs that you've implemented (or the names you've chosen) to highlight the advantages of the chosen designs and names. -->
   
   <!-- If there was a discussion of the design of the feature implemented in this PR elsewhere (e. g. a "Proposal" issue, any other issue, or a thread in the development mailing list), link to that discussion from this PR description and explain what have changed in your final design compared to your original proposal or the consensus version in the end of the discussion. If something hasn't changed since the original discussion, you can omit a detailed discussion of those aspects of the design here, perhaps apart from brief mentioning for the sake of readability of this PR description. -->
   
   <!-- Some of the aspects mentioned above may be omitted for simple and small changes. -->
   
   #### Release note
   <!-- Give your best effort to summarize your changes in a couple of sentences aimed toward Druid users. 
   
   If your change doesn't have end user impact, you can skip this section.
   
   -->
   For tips about how to write a good release note, see [Release notes](https://github.com/apache/druid/blob/master/CONTRIBUTING.md#release-notes).
   
   
   <hr>
   
   ##### Key changed/added classes in this PR
    * `MyFoo`
    * `OurBar`
    * `TheirBaz`
   
   <hr>
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist below are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
   
   This PR has:
   
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] a release note entry in the PR description.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] cryptoe commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
cryptoe commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1070193291


##########
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:
   This is what I would do: 
   Rename `MSQWarningReportPublisher` to `ExceptionPublisher`.
   
   
   Create a new CompositeExceptionPublisher.
   
   One implementation can be of a FilteredEmitterExceptionPublisher where in the constructor you take the error code. 
   
   It would be cool to avoid This call
   :MSQErrorReport msqFault = MSQErrorReport.fromException(workerId, host, stageNumber, e);
   



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/kernel/FrameProcessorFactory.java:
##########
@@ -30,6 +30,7 @@
 import javax.annotation.Nullable;
 import java.io.IOException;
 import java.util.List;
+import java.util.function.BiConsumer;

Review Comment:
   nit: looks like this change is not required



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] cryptoe commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1092168841


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskMetadata.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.druid.indexing.common;

Review Comment:
   This class seems avoidable. Looks like this is introduced cause of parseExceptionHandler cause you need the taskId, groupId, data source. 
   TaskID, groupId is part of the Task.java and seems to be repeated here. 
   
   What happens if task is operating on 2 data sources ?
   
   So for the above reasons I think we should think of another way. 
   



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1072731064


##########
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:
   I'm not sure i follow 
   
   > This is what I would do:
   > Rename MSQWarningReportPublisher to ExceptionPublisher.
   > 
   > Create a new CompositeExceptionPublisher.
   > 
   > One implementation can be of a FilteredEmitterExceptionPublisher where in the constructor you take the error code.
   
   Are you saying create another class that implements the interface that i will rename.
   
   The `CompositeExceptionPublisher`  i don't understand?
   `FilteredEmitterExceptionPublisher` i also don't understand



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1089584770


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.service.ServiceEmitter;
+import org.apache.druid.java.util.emitter.service.ServiceLogEvent;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher
+{
+
+  private final String workerId;
+  private final String controllerTaskId;
+  private final String taskId;
+  @Nullable
+  private final String host;
+  private final ServiceEmitter emitter;
+  private final Set<String> acceptableErrorCode;
+
+  public MSQFilteredEmitterWarningPublisher(
+      final String workerId,
+      final String controllerTaskId,
+      final String taskId,

Review Comment:
   add datasource



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] msq path to emit unparseable exceptions (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13670:
URL: https://github.com/apache/druid/pull/13670#issuecomment-1972195637

   This pull request/issue has been closed due to lack of activity. If you think that
   is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1089584820


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

Review Comment:
   get rid of whitespace change



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1091150815


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQWarningReportLimiterPublisher.java:
##########
@@ -31,13 +31,13 @@
 /**
  * Limits the number of exceptions that get published to the underlying delegate publisher. This helps
  * in preventing the spam of exceptions from the worker task to the published source. As such, any implementation
- * of {@link MSQWarningReportPublisher} that is wrapped in this class cannot be sure that the warning handed off
+ * of {@link MSQWarningPublisher} that is wrapped in this class cannot be sure that the warning handed off
  * is trully published
  */
-public class MSQWarningReportLimiterPublisher implements MSQWarningReportPublisher
+public class MSQWarningReportLimiterPublisher implements MSQWarningPublisher

Review Comment:
   change class to MSQWarningLimiterPublisher



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1072731064


##########
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:
   I'm not sure i follow 
   
   > This is what I would do:
   > Rename MSQWarningReportPublisher to ExceptionPublisher.
   > 
   > Create a new CompositeExceptionPublisher.
   > 
   > One implementation can be of a FilteredEmitterExceptionPublisher where in the constructor you take the error code.



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1085730737


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerContext.java:
##########
@@ -73,4 +74,6 @@
   DruidNode selfNode();
 
   Bouncer processorBouncer();
+
+  Emitter emitter();

Review Comment:
   We are getting this from `TaskToolBox` and the emitter there isn't nullable



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher
+{
+
+  private final String workerId;
+  private final String controllerTaskId;
+  private final String taskId;
+  @Nullable
+  private final String host;
+  private final Emitter emitter;
+  private final Set<String> acceptableErrorCode;
+
+  public MSQFilteredEmitterWarningPublisher(
+      final String workerId,
+      final String controllerTaskId,
+      final String taskId,
+      @Nullable final String host,
+      Emitter emitter,
+      Set<String> acceptableErrorCode
+  )
+  {
+    this.workerId = workerId;
+    this.controllerTaskId = controllerTaskId;
+    this.taskId = taskId;
+    this.host = host;
+    this.emitter = emitter;
+    this.acceptableErrorCode = acceptableErrorCode;
+  }
+
+  @Override
+  public void publishException(int stageNumber, Throwable e)
+  {
+    String errorCode = MSQErrorReport.getFaultFromException(e).getErrorCode();
+    if (acceptableErrorCode.contains(errorCode)) {
+      MSQErrorReport errorReport = MSQErrorReport.fromException(workerId, host, stageNumber, e);
+      String errorMessage = errorReport.getFault().getErrorMessage();
+      // todo use an actual event type that has the correct feed.
+      // todo see if i can find group ID as well, maybe thats controller task id???

Review Comment:
   thanks!



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] cryptoe commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1072727527


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



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1084405527


##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/test/MSQTestWorkerContext.java:
##########
@@ -27,6 +27,8 @@
 import org.apache.druid.indexing.common.TaskToolbox;
 import org.apache.druid.java.util.common.FileUtils;
 import org.apache.druid.java.util.common.io.Closer;
+import org.apache.druid.java.util.emitter.core.Emitter;

Review Comment:
   cleanup



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1085731918


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher

Review Comment:
   That makes sense, but this is the only consumer of filtering and emitting right now so does that make sense to do that level of abstraction?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by GitBox <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1072726631


##########
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:
   `:MSQErrorReport msqFault = MSQErrorReport.fromException(workerId, host, stageNumber, e);`
   will definitely avoid repeating this call



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1089584642


##########
core/src/main/java/org/apache/druid/java/util/emitter/service/ServiceLogEvent.java:
##########
@@ -0,0 +1,154 @@
+package org.apache.druid.java.util.emitter.service;
+
+import com.fasterxml.jackson.annotation.JsonValue;
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+import org.apache.druid.guice.annotations.PublicApi;
+import org.apache.druid.java.util.common.DateTimes;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+import org.joda.time.DateTime;
+
+import java.util.Arrays;
+import java.util.Map;
+import java.util.TreeMap;
+
+@PublicApi
+public class ServiceLogEvent implements Event

Review Comment:
   add javadoc of what this should be used for. Its not a metric, its not an alert. its just an event that you might want emitted somewhere



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] LakshSingla commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "LakshSingla (via GitHub)" <gi...@apache.org>.
LakshSingla commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1085709620


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher
+{
+
+  private final String workerId;
+  private final String controllerTaskId;
+  private final String taskId;
+  @Nullable
+  private final String host;
+  private final Emitter emitter;
+  private final Set<String> acceptableErrorCode;
+
+  public MSQFilteredEmitterWarningPublisher(
+      final String workerId,
+      final String controllerTaskId,
+      final String taskId,
+      @Nullable final String host,
+      Emitter emitter,
+      Set<String> acceptableErrorCode
+  )
+  {
+    this.workerId = workerId;
+    this.controllerTaskId = controllerTaskId;
+    this.taskId = taskId;
+    this.host = host;
+    this.emitter = emitter;
+    this.acceptableErrorCode = acceptableErrorCode;
+  }
+
+  @Override
+  public void publishException(int stageNumber, Throwable e)
+  {
+    String errorCode = MSQErrorReport.getFaultFromException(e).getErrorCode();
+    if (acceptableErrorCode.contains(errorCode)) {
+      MSQErrorReport errorReport = MSQErrorReport.fromException(workerId, host, stageNumber, e);
+      String errorMessage = errorReport.getFault().getErrorMessage();
+      // todo use an actual event type that has the correct feed.
+      // todo see if i can find group ID as well, maybe thats controller task id???

Review Comment:
   Yes, the group id should be the controller's task id



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher

Review Comment:
   I think it might be appropriate to have separate classes:
   1. MSQFilteredPublisher which takes in a delegate and publishes the warning only if it passes through the filter
   2. MSQEmitterPublisher that emits the warning if `publishException` is called



##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerContext.java:
##########
@@ -73,4 +74,6 @@
   DruidNode selfNode();
 
   Bouncer processorBouncer();
+
+  Emitter emitter();

Review Comment:
   Can the emitter be nullable? If so, appropriate checks and annotations would be helpful



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1086214490


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher

Review Comment:
   If this is necessary i'll leave this change to later as it is pretty straightforward



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1092762967


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskMetadata.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.druid.indexing.common;

Review Comment:
   ok i understand that it can now after chatting with some other people. Would it be clearer if i said TargetDataSource?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] cryptoe commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "cryptoe (via GitHub)" <gi...@apache.org>.
cryptoe commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1094106752


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskMetadata.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.druid.indexing.common;

Review Comment:
   Something like parseExceptionMetadata ?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1091312838


##########
processing/src/test/java/org/apache/druid/segment/incremental/ParseExceptionHandlerTest.java:
##########
@@ -49,7 +50,8 @@ public void testMetricWhenAllConfigurationsAreTurnedOff()
         rowIngestionMeters,
         false,
         Integer.MAX_VALUE,
-        0
+        0,
+        null
     );

Review Comment:
   missing task metadata



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] msq path to emit unparseable exceptions (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #13670:
URL: https://github.com/apache/druid/pull/13670#issuecomment-1920235222

   This pull request has been marked as stale due to 60 days of inactivity.
   It will be closed in 4 weeks if no further activity occurs. If you think
   that's incorrect or this pull request should instead be reviewed, please simply
   write any comment. Even if closed, you can still revive the PR at any time or
   discuss it on the dev@druid.apache.org list.
   Thank you for your contributions.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


Re: [PR] msq path to emit unparseable exceptions (druid)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #13670: msq path to emit unparseable exceptions
URL: https://github.com/apache/druid/pull/13670


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1091151634


##########
server/src/main/java/org/apache/druid/segment/realtime/plumber/RealtimePlumberSchool.java:
##########
@@ -99,7 +101,9 @@ public RealtimePlumberSchool(
   public Plumber findPlumber(
       final DataSchema schema,
       final RealtimeTuningConfig config,
-      final FireDepartmentMetrics metrics
+      final FireDepartmentMetrics metrics,
+      final ServiceEmitter emitter,

Review Comment:
   Look into instead just passing `ParseExceptionHandler` down instead of these two things....



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1091152337


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskMetadata.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.druid.indexing.common;

Review Comment:
   is this the correct package for 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.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1092404014


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskMetadata.java:
##########
@@ -0,0 +1,38 @@
+package org.apache.druid.indexing.common;

Review Comment:
   Can a task operate on two datasources?



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1085677862


##########
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:
   @cryptoe How does this look?
   We have the Limiter publisher and we pass in the composite publisher that contains the normal publisher and the emitter publisher



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] LakshSingla commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "LakshSingla (via GitHub)" <gi...@apache.org>.
LakshSingla commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1086233870


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/indexing/error/MSQFilteredEmitterWarningPublisher.java:
##########
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.msq.indexing.error;
+
+import org.apache.druid.java.util.emitter.core.Emitter;
+import org.apache.druid.java.util.emitter.core.Event;
+import org.apache.druid.java.util.emitter.core.EventMap;
+
+import javax.annotation.Nullable;
+import java.io.IOException;
+import java.util.Set;
+
+public class MSQFilteredEmitterWarningPublisher implements MSQWarningPublisher

Review Comment:
   Works for me 👍 



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1085730737


##########
extensions-core/multi-stage-query/src/main/java/org/apache/druid/msq/exec/WorkerContext.java:
##########
@@ -73,4 +74,6 @@
   DruidNode selfNode();
 
   Bouncer processorBouncer();
+
+  Emitter emitter();

Review Comment:
   We are getting this from `TaskToolBox` and the emitter there isn't labeled as nullable



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on PR #13670:
URL: https://github.com/apache/druid/pull/13670#issuecomment-1490789044

   @suneet-s i'll go down the path of creating error logger, but i think the name will need to be changed.


-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] TSFenwick commented on a diff in pull request #13670: msq path to emit unparseable exceptions

Posted by "TSFenwick (via GitHub)" <gi...@apache.org>.
TSFenwick commented on code in PR #13670:
URL: https://github.com/apache/druid/pull/13670#discussion_r1089585137


##########
processing/src/test/java/org/apache/druid/segment/incremental/ParseExceptionHandlerTest.java:
##########
@@ -49,7 +50,8 @@ public void testMetricWhenAllConfigurationsAreTurnedOff()
         rowIngestionMeters,
         false,
         Integer.MAX_VALUE,
-        0
+        0,
+        null

Review Comment:
   change nulls to a noop parse exception handler if possible



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org