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 2021/11/10 11:19:17 UTC
[GitHub] [druid] kfaraz opened a new pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
kfaraz opened a new pull request #11902:
URL: https://github.com/apache/druid/pull/11902
### Changes
- Add method `ShardSpec.getType()` to get name of shard spec type
- List all names of shard spec types in the interface `ShardSpec` itself
for easy reference and maintenance
<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:
- [ ] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/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/druid/blob/master/dev/license.md)
- [ ] 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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
kfaraz commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r747173909
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -123,6 +123,12 @@ default short getAtomicUpdateGroupSize()
@JsonIgnore
boolean possibleInDomain(Map<String, RangeSet<String>> domain);
+ /**
+ * Get the type name of this ShardSpec.
+ */
+ @JsonIgnore
+ String getType();
Review comment:
Done.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] cheddar commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
cheddar commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r747168899
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -123,6 +123,12 @@ default short getAtomicUpdateGroupSize()
@JsonIgnore
boolean possibleInDomain(Map<String, RangeSet<String>> domain);
+ /**
+ * Get the type name of this ShardSpec.
+ */
+ @JsonIgnore
+ String getType();
Review comment:
This should have a default implementation that returns something like "unknown". I don't know if anybody has implemented this interface in an extension, but it's technically possible and no reason to break their stuff if they did.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] abhishekagarwal87 merged pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 merged pull request #11902:
URL: https://github.com/apache/druid/pull/11902
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
kfaraz commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r747170208
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -123,6 +123,12 @@ default short getAtomicUpdateGroupSize()
@JsonIgnore
boolean possibleInDomain(Map<String, RangeSet<String>> domain);
+ /**
+ * Get the type name of this ShardSpec.
+ */
+ @JsonIgnore
+ String getType();
Review comment:
Thanks for the review, @cheddar .
Yeah, I kind of struggled with this too. Did start with a default but then got rid of it.
Fixing it.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] abhishekagarwal87 commented on pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
abhishekagarwal87 commented on pull request #11902:
URL: https://github.com/apache/druid/pull/11902#issuecomment-966286285
merged since ci failure is unrelated
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] LakshSingla commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
LakshSingla commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r746500822
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -134,4 +140,29 @@ default boolean sharePartitionSpace(PartialShardSpec partialShardSpec)
{
return !partialShardSpec.useNonRootGenerationPartitionSpace();
}
+
+ /**
+ * ShardSpec type names.
+ */
+ interface Type
Review comment:
nit: Access modifier required?
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] kfaraz commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
kfaraz commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r746537084
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -134,4 +140,29 @@ default boolean sharePartitionSpace(PartialShardSpec partialShardSpec)
{
return !partialShardSpec.useNonRootGenerationPartitionSpace();
}
+
+ /**
+ * ShardSpec type names.
+ */
+ interface Type
Review comment:
Since the enclosing type is an interface, everything inside is `public` by default.
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] LakshSingla commented on a change in pull request #11902: Add dimension partitioningType to metrics to track usage of different partitioning schemes
Posted by GitBox <gi...@apache.org>.
LakshSingla commented on a change in pull request #11902:
URL: https://github.com/apache/druid/pull/11902#discussion_r746500822
##########
File path: core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java
##########
@@ -134,4 +140,29 @@ default boolean sharePartitionSpace(PartialShardSpec partialShardSpec)
{
return !partialShardSpec.useNonRootGenerationPartitionSpace();
}
+
+ /**
+ * ShardSpec type names.
+ */
+ interface Type
Review comment:
nit: Access modifier
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org