JulianJaffePinterest opened a new pull request #11474:
URL: https://github.com/apache/druid/pull/11474
(As per discussion in #10920, breaking the changes down into smaller PRs.
See that PR and the linked proposal for more high-level detail on this
initiative.)
Initial module set up (e.g. pom, checkstyle, exclusions, licenses, etc.),
support classes (mix-ins traits for logging and the try-with-resources pattern
& configuration helpers), and an HTTP client for talking to a Druid cluster.
### Description
This PR handles the initial setup for the spark module and adds a few core
utility classes.
1. Creates the module and adds it to Druid's base pom.xml
2. Adds a scalastyle configuration mirroring the checkstyle settings for Java
3. Updates the pre-push hook and travis checkstyle test to include a
scalastyle check for the spark module
4. Updates LICENSE and NOTICE to reflect new dependencies
5. Adds two Scala mix-in traits, `Logging` and `TryWithResources` that
provide generic logging and ARM patterns
6. Adds a Configuration class that wraps a Properties instance and provides
utility functions around it
7. Adds a DruidConfigurationKeysClass to centralize config keys
8. Adds an HTTP DruidClient that handles sending requests to a Druid broker.
The reason we pass a Configuration class around instead of using dependency
injection is because we will need to access some properties on the driver, some
on the executors, and some on both types of nodes and so we would need to
instantiate dependency injection on every node. An alternative would be to use
serializable Providers to ship dependency information to the executors, but
even with this messy approach it is non-trivial in Spark 2.4 to ensure that
code executes exactly once on every executor before beginning processing.
<hr>
##### Key changed/added classes in this PR
* `Configuration`
* `DruidClient`
* `DruidConfigurationKeys`
<hr>
<!-- Check the items by putting "x" in the brackets for the done things. Not
all of these items apply to every PR. Remove the items which are not done or
not relevant to the PR. None of the items from the checklist below are strictly
necessary, but it would be very helpful if you at least self-review the PR. -->
This PR has:
- [x] been self-reviewed.
- [ ] added documentation for new or modified features or behaviors.
- [x] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [x] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [x] 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](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
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]