refactor CompactionState since core and processing have been merged#14932
refactor CompactionState since core and processing have been merged#14932clintropolis wants to merge 5 commits intoapache:masterfrom
Conversation
…o now can refer to real types
|
|
|
Yeah, it makes sense to move |
| : new DimensionsSpec(ingestionSpec.getDataSchema().getDimensionsSpec().getDimensions()); | ||
| // We only need to store filter since that is the only field auto compaction support | ||
| Map<String, Object> transformSpec = ingestionSpec.getDataSchema().getTransformSpec() == null || TransformSpec.NONE.equals(ingestionSpec.getDataSchema().getTransformSpec()) | ||
| TransformSpec transformSpec = ingestionSpec.getDataSchema().getTransformSpec() == null || TransformSpec.NONE.equals(ingestionSpec.getDataSchema().getTransformSpec()) |
There was a problem hiding this comment.
Nit: Pull ingestionSpec.getDataSchema().getTransformSpec() into a variable. It is used thrice and seems too verbose.
| ? null | ||
| : toolbox.getJsonMapper().convertValue(ingestionSpec.getDataSchema().getAggregators(), new TypeReference<List<Object>>() {}); | ||
| TransformSpec transformSpec = ingestionSpec.getDataSchema().getTransformSpec(); | ||
| if (TransformSpec.NONE.equals(transformSpec)) { |
There was a problem hiding this comment.
Should this handle transformSpec == null too?
There was a problem hiding this comment.
ah yeah, though i put a not null check in the else instead since it seemed a little strange to check for null and assign null again
| import com.fasterxml.jackson.annotation.JsonCreator; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.google.common.base.Preconditions; | ||
| import org.apache.druid.indexer.granularity.GranularitySpec; |
There was a problem hiding this comment.
Nit: This might get flagged as an unnecessary import as it is only used in javadoc.
| // org.apache.druid.query.aggregation.AggregatorFactory cannot be used here because it's in the 'processing' module which | ||
| // has a dependency on the 'core' module where this class is. | ||
| private final List<Object> metricsSpec; | ||
| // 'server' module which has a dependency on the 'processing' module where this class is. |
There was a problem hiding this comment.
Can remove this comment too.
|
This pull request has been marked as stale due to 60 days of inactivity. |
|
@clintropolis , there are some conflicts that would need to be resolved before we can merge this. |
|
This pull request has been marked as stale due to 60 days of inactivity. |
|
This pull request has been marked as stale due to 60 days of inactivity. |
|
@clintropolis , should we resolve the conflicts here so that we can include this patch in Druid 31? |
|
This pull request has been marked as stale due to 60 days of inactivity. |
|
This pull request has been marked as stale due to 60 days of inactivity. |
|
This pull request/issue has been closed due to lack of activity. If you think that |
Since #13698 was merged, it is now possible for
CompactionStateto refer to real types instead of using Map and TypeReference to convert stuff forTransformSpec,IndexSpec, andAggregatorFactory.