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 2019/12/09 11:53:44 UTC

[GitHub] [incubator-druid] pjain1 opened a new pull request #9001: fix npe while logging sql/query request

pjain1 opened a new pull request #9001: fix npe while logging sql/query request
URL: https://github.com/apache/incubator-druid/pull/9001
 
 
   ### Description
   `remoteAddr` and `sqlQueryContext` fields in `RequestLogLine` are marked as nullable, however while logging them if any or both of them are `null` then NPE is thrown (see method `getNativeQueryLine` and `getSqlQueryLine`). 
   
   This PR fixes it to use empty String in place of null remote address and empty map in place of null query context.
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/incubator-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.
   - [ ] 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/incubator-druid/blob/master/licenses.yaml)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   
   ##### Key changed/added classes in this PR
    * `RequestLogLine`
   

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


With regards,
Apache Git Services

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