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/07/19 13:55:46 UTC

[GitHub] [incubator-druid] esevastyanov opened a new pull request #8110: Response context refactoring

esevastyanov opened a new pull request #8110: Response context refactoring
URL: https://github.com/apache/incubator-druid/pull/8110
 
 
   ### Description
   The PR is a refactoring of a response context integrated into query processing via 
   `QueryRunner.run(QueryPlus<T> queryPlus, Map<String, Object> responseContext)` method. 
   The response context is a map holding different values associated with different keys. It is used not only for passing values between the chains of query runners but also between historicals and brokers (see QueryResource.post method). Thus I believe it is important to know what the context is holding actually. There is no such way, putting values into a response context is distributed among different classes without documentation.
   The refactoring is a separation a response context into a structure with all the keys which are used currently. So it's very easy to find what might be stored in the context. I decided to keep the current logic as much as possible to shorten the PR and simplify a review.
   1. Response context has a delegate that is a Map as previously
   2. There are different implementations of ReponseContext: HashMap and ConcurrentHashMap as a delegate - according to existing logic.
   3. ResponseContext is still the second parameter of `QueryRunner.run` method. 
   4. ReponseContext keys are strings as previously. So tests used dummy keys are not updated and still have these dummy strings.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
      - [x] 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.)
   - [x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   
   <hr>
   
   For reviewers: the key changed/added classes in this PR are `ResponseContext`, `DefaultResponseContext`, `ConcurrentResponseContext`.

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