-
Notifications
You must be signed in to change notification settings - Fork 593
HDDS-6213. Pluggable OzoneManager request handling hooks #3104
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
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
d1e3436
Original idea as is during our discussion with Ritesh.
fapifta 8c29ad1
Switch to the annotating validator methods instead of interfaces and …
fapifta 6d400d3
Added some TODO and Javadoc. Fixed findbugs, and started to eliminate…
fapifta dddbf38
Add remaining API docs
fapifta 8b9ef2b
Fix checkstyle
fapifta b392734
Reorganize code, to simplify the integration point in the server side…
fapifta 209f626
first trials with apt...
fapifta d0d4840
Add an annotation processor to validate methods that are annotated to…
fapifta 2a152e7
Remove contextAware property from the annotation, and from the annota…
fapifta 98db101
Make the annotation processor code more readable and structured. Fix …
fapifta 926266b
Change the validation logic, after removing conext awareness as an op…
fapifta 152917d
Add annotation processor tests, and fix some errors found.
fapifta 9c2fe1a
Add license text to new classes.
fapifta c7ae28a
Add junit test, fix revealed problems, and remove some unnecessary st…
fapifta f9ced3c
Rename annotation processor test.
fapifta 99d0179
Removed serverversion, and use ClientVersions to decide on the client…
fapifta d7fed1e
Fix checkstyle issues, and a test compilation issue caused be the rem…
fapifta 01c9489
Added spotbugs related info so that findbugs check can run.
fapifta 9a0258c
Adjust rat to check the annotation processor module as well.
fapifta 51e9f5a
Update the jar-report.txt
fapifta 267b92f
Extend some documentation, fix findbugs reported synchronization prob…
fapifta b27c17d
Fix missing licenses after rat check adjustments.
fapifta 46563c9
Revert "Update the jar-report.txt"
fapifta 24911aa
Update the jar-report.txt
fapifta d1c899a
Move the decision about whether a condition is present to the conditi…
fapifta 959e4a3
make predicates final in validaitonconditions enum.
fapifta 3637271
Remove unused imports from RequestValidations.
fapifta a414aef
Fix wording in apidoc.
fapifta b66c55b
Add note about -proc:none in doc comment inside annotation procesor m…
fapifta c8d4d97
Address CI issues caused by the test validators. Re-organize the vali…
fapifta 18a0e96
Add debug logging to expose in the logs which validator methods were …
fapifta e82145d
Address checkstyle issues.
fapifta d87b1f8
Addressing review comments.
fapifta 697b1ac
Addressing further review comments.
fapifta eaac42e
Rebasing on new master and fix ClientVersions->ClientVersion rename.
fapifta 4d69af6
Re-trigger CI.
fapifta 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
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,114 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| Licensed 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. See accompanying LICENSE file. | ||
| --> | ||
| <project xmlns="http://maven.apache.org/POM/4.0.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 | ||
| https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <groupId>org.apache.ozone</groupId> | ||
| <artifactId>ozone-annotation-processing</artifactId> | ||
| <version>1.3.0-SNAPSHOT</version> | ||
| <description>Apache Ozone annotation processing tools for validating custom | ||
| annotations at compile time. | ||
| </description> | ||
| <name>Apache Ozone Annotation Processing</name> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <properties> | ||
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
| <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
| <spotbugs.version>3.1.12</spotbugs.version> | ||
| <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version> | ||
| <checkstyle.version>8.29</checkstyle.version> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.github.spotbugs</groupId> | ||
| <artifactId>spotbugs</artifactId> | ||
| <version>${spotbugs.version}</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| </dependencies> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <!-- | ||
| | As this pom is not a child of the main ozone pom.xml, if we want | ||
| | findbugs and checkstyle to be running for the module, the plugins | ||
| | have to be defined here. | ||
| --> | ||
| <plugin> | ||
| <groupId>com.github.spotbugs</groupId> | ||
| <artifactId>spotbugs-maven-plugin</artifactId> | ||
| <version>${spotbugs.version}</version> | ||
| <configuration> | ||
| <maxHeap>1024</maxHeap> | ||
| <xmlOutput>true</xmlOutput> | ||
| <includeTests>true</includeTests> | ||
| </configuration> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-checkstyle-plugin</artifactId> | ||
| <version>${maven-checkstyle-plugin.version}</version> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.puppycrawl.tools</groupId> | ||
| <artifactId>checkstyle</artifactId> | ||
| <version>${checkstyle.version}</version> | ||
| </dependency> | ||
| </dependencies> | ||
| <configuration> | ||
| <configLocation>../../hadoop-hdds/dev-support/checkstyle/checkstyle.xml</configLocation> | ||
| <suppressionsLocation>../../hadoop-hdds/dev-support/checkstyle/suppressions.xml</suppressionsLocation> | ||
| <includeTestSourceDirectory>true</includeTestSourceDirectory> | ||
| <failOnViolation>false</failOnViolation> | ||
| <outputFile>${project.build.directory}/test/checkstyle-errors.xml</outputFile> | ||
| </configuration> | ||
| </plugin> | ||
| <!-- | ||
| | Compiler plugin configuration have to be modified to compile the | ||
| | annotation processor, without having any annotation processor applied | ||
| | as due to the presence of | ||
| | META-INF/services/javac.annotation.processing.Processor the compilation | ||
| | would fail as the linked processor class can not be find while we are | ||
| | compiling it, hence the compiler argument -proc:none is specified here. | ||
| --> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.9.0</version> | ||
| <configuration> | ||
| <source>1.8</source> | ||
| <target>1.8</target> | ||
| </configuration> | ||
| <executions> | ||
| <execution> | ||
| <id>default-compile</id> | ||
| <configuration> | ||
| <compilerArgument>-proc:none</compilerArgument> | ||
| <includes> | ||
| <include>org/apache/ozone/annotations/**</include> | ||
| </includes> | ||
| </configuration> | ||
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
|
|
||
| </project> | ||
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.
Please add a note as to why we need
-proc:noneand the sequence of events that should occur when we fresh build the repo.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.
Thanks for noting this!, I have extended the note into the comment before the plugin definition about the compiler argument specified here.