Skip to content

Comments

mapping exception stacktrace logging#11325

Closed
egor-ryashin wants to merge 3 commits intoapache:masterfrom
egor-ryashin:mapping-error-logging
Closed

mapping exception stacktrace logging#11325
egor-ryashin wants to merge 3 commits intoapache:masterfrom
egor-ryashin:mapping-error-logging

Conversation

@egor-ryashin
Copy link
Contributor

@egor-ryashin egor-ryashin commented Jun 2, 2021

Description

When you try a new Druid API or new parameters, the error message can lack details and one has to start a debugging session to find a line that produces an exception. For example, this message doesn't say what parameter produced NullPointerException (line 15 here doesn't say where the error happened in source code):

{"error":"Cannot construct instance of `org.apache.druid.indexing.input.GeneratorInputSource`, problem: `java.lang.NullPointerException`\n at [Source: (org.eclipse.jetty.server.HttpInputOverHTTP); line: 15, column: 9] (through reference chain: org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexSupervisorTask[\"spec\"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIngestionSpec[\"ioConfig\"]->org.apache.druid.indexing.common.task.batch.parallel.ParallelIndexIOConfig[\"inputSource\"])"}

This logging writes a stacktrace to the logfile, it can be conveniently set up in configuration to log in production or not, besides the logging can be dynamically altered using JMX console too.

I've also added error logging to InputSourceSampler.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • 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
  • 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 is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@egor-ryashin egor-ryashin requested a review from pjain1 July 19, 2021 08:20
Copy link
Member

@pjain1 pjain1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after travis

@egor-ryashin
Copy link
Contributor Author

Build failure is not relative to the changes:

toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit

@stale
Copy link

stale bot commented Apr 19, 2022

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.

@stale stale bot added the stale label Apr 19, 2022
@github-actions
Copy link

github-actions bot commented Nov 6, 2023

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.

@github-actions github-actions bot closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants