-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Monomorphic processing of TopN queries with simple double aggregators over historical segments (part of #3798) #4079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
drcrallen
merged 33 commits into
apache:master
from
metamx:double-agg-and-historical-topn-monomorphic-processing
May 16, 2017
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
42c080b
Monomorphic processing of topN queries with simple double aggregators…
leventov d2d53c5
Add CalledFromHotLoop annocations to specialized methods in SimpleDou…
leventov 719e979
Fix a bug in Historical1SimpleDoubleAggPooledTopNScannerPrototype
leventov 37b04c3
Fix a bug in SpecializationService
leventov c63901b
In SpecializationService, emit maxSpecializations warning only once
leventov 439c906
Make GenericIndexed.theBuffer final
leventov 19b4fa5
Address comments
leventov 005fa81
Merge remote-tracking branch 'upstream/master' into double-agg-and-hi…
leventov 6b233f2
Newline
leventov 18e9ad0
Reapply 439c906 (Make GenericIndexed.theBuffer final)
leventov 996874d
Remove extra PooledTopNAlgorithm.capabilities field
leventov 10c6735
Improve CachingIndexed.inspectRuntimeShape()
leventov 8ded30c
Fix CompressedVSizeIntsIndexedSupplier.inspectRuntimeShape()
leventov c9339c9
Don't override inspectRuntimeShape() in subclasses of CompressedVSize…
leventov de77b76
Annotate methods in specializations of DimensionSelector and FloatCol…
leventov 378f622
Make ValueMatcher to implement HotLoopCallee
leventov 7b89337
Doc fix
leventov 5cc302b
Fix inspectRuntimeShape() impl in ExpressionSelectors
leventov 554a94c
INFO logging of specialization events
leventov 2ec1911
Remove modificator
leventov 5633e97
Fix OrFilter
leventov d962c86
Fix AndFilter
leventov bdd0e45
Merge remote-tracking branch 'upstream/master' into double-agg-and-hi…
leventov 9771c3a
Refactor PooledTopNAlgorithm.scanAndAggregate()
leventov d405b97
Small refactoring
leventov 58f0821
Add 'nothing to inspect' messages in empty HotLoopCallee.inspectRunti…
leventov f6efc31
Don't care about runtime shape in tests
leventov d63b26e
Fix accessor bugs in Historical1SimpleDoubleAggPooledTopNScannerProto…
leventov 35341a5
Doc wording
leventov 0a48d89
Address comments
leventov 331a32a
Remove MagicAccessorBridge and ensure Offset subclasses are public
leventov 69988b5
Attach error message to element
leventov 53f77fd
Merge remote-tracking branch 'upstream/master' into double-agg-and-hi…
leventov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
common/src/main/java/io/druid/annotations/SubclassesMustBePublic.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| /* | ||
| * Licensed to Metamarkets Group Inc. (Metamarkets) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. Metamarkets licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package io.druid.annotations; | ||
|
|
||
| import java.lang.annotation.Documented; | ||
| import java.lang.annotation.ElementType; | ||
| import java.lang.annotation.Inherited; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.RetentionPolicy; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| @Documented | ||
| @Inherited | ||
| @Retention(RetentionPolicy.SOURCE) | ||
| @Target(ElementType.TYPE) | ||
| public @interface SubclassesMustBePublic | ||
| { | ||
| } |
51 changes: 51 additions & 0 deletions
51
common/src/main/java/io/druid/annotations/SubclassesMustBePublicAnnotationProcessor.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| /* | ||
| * Licensed to Metamarkets Group Inc. (Metamarkets) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. Metamarkets licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| package io.druid.annotations; | ||
|
|
||
| import javax.annotation.processing.AbstractProcessor; | ||
| import javax.annotation.processing.RoundEnvironment; | ||
| import javax.annotation.processing.SupportedAnnotationTypes; | ||
| import javax.lang.model.element.Element; | ||
| import javax.lang.model.element.Modifier; | ||
| import javax.lang.model.element.TypeElement; | ||
| import javax.tools.Diagnostic; | ||
| import java.util.Set; | ||
|
|
||
| @SupportedAnnotationTypes("io.druid.annotations.SubclassesMustBePublic") | ||
| public class SubclassesMustBePublicAnnotationProcessor extends AbstractProcessor | ||
| { | ||
| @Override | ||
| public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) | ||
| { | ||
| for (TypeElement annotation : annotations) { | ||
| Set<? extends Element> elementsAnnotatedWith = roundEnv.getElementsAnnotatedWith(annotation); | ||
| for (Element element : elementsAnnotatedWith) { | ||
| if (!element.getModifiers().contains(Modifier.PUBLIC)) { | ||
| processingEnv.getMessager().printMessage( | ||
| Diagnostic.Kind.ERROR, | ||
| element.getSimpleName() + " must be public", | ||
| element | ||
| ); | ||
| } | ||
| } | ||
| } | ||
| return false; | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
common/src/main/resources/services/javax.annotation.processing.Processor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| io.druid.annotations.SubclassesMustBePublicAnnotationProcessor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this method be annotated with @CalledFromHotLoop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, because this method is annotated in
BufferAggregator