LakshSingla commented on a change in pull request #12259:
URL: https://github.com/apache/druid/pull/12259#discussion_r811444450



##########
File path: 
core/src/main/java/org/apache/druid/data/input/IntermediateRowParsingReader.java
##########
@@ -155,6 +248,32 @@ public void close() throws IOException
    */
   protected abstract List<Map<String, Object>> toMap(T intermediateRow) throws 
IOException;
 
+  private String buildParseExceptionMessage(
+      String baseExceptionMessage,
+      @Nullable InputEntity source,
+      @Nullable Long recordNumber,
+      @Nullable Map<String, Object> metadata
+  )
+  {
+    StringBuilder sb = new StringBuilder(baseExceptionMessage);
+    List<String> temp = new ArrayList<>();
+    if (source != null && source.getUri() != null) {
+      temp.add(StringUtils.format("Source info:[%s]", source.getUri()));
+    }
+    if (recordNumber != null) {
+      temp.add(StringUtils.format("Record number:[%d]", recordNumber));
+    }
+    if (metadata != null && !metadata.isEmpty()) {
+      temp.add(StringUtils.format("Additional info:%s", metadata));

Review comment:
       Updated to seem something like
   
   ```
   org.apache.druid.java.util.common.parsers.ParseException: Timestamp[null] is 
unparseable! Event: {3=3, Lets do some "normal" quotes=Lets do some "normal" 
quotes, 2018-05-05T10:00:00Z=2018-05-05T10:... (Line: 2, Record: 1)
   ```




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