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/25 12:08:29 UTC

[GitHub] [incubator-druid] esevastyanov opened a new pull request #8157: Enum of ResponseContext keys

esevastyanov opened a new pull request #8157: Enum of ResponseContext keys
URL: https://github.com/apache/incubator-druid/pull/8157
 
 
   ### Description
   Aggregated `ResponseContext` keys into enum as a next step of [ResponseContext refactoring](https://github.com/apache/incubator-druid/pull/8110). Previously the keys were just static strings so theoretically there was no obstacle to use any string as a key of `ReponseContext`. This refactoring eliminates this possibility by introducing the enum of `ResponseContext` keys and exposing only methods requiring the enum instance as a key.
   #### Fixed the issue of merging `ResponseContext` instances returned by Historicals to Broker
   There was no rule of merging different response contexts but from my point of view, the current solution of rewriting existing values by last ones is incorrect because of losing valuable information. For example, a value associated with the key `UNCOVERED_INTERVALS` contains a list of uncovered intervals and the result value is not the last returned but the concatenation of all returned lists. The same issue with the key `MISSING_SEGMENTS` (a list of missing segments) and `COUNT` (the number of scanned rows). Thus I decided to provide every key with a merge function. So response contexts merge became a simple procedure.
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
   - [x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [x] added unit tests or modified existing tests to cover new code paths.
   
   <hr>
   
   For reviewers: the key changed classes is `ResponseContext`.

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