-
Notifications
You must be signed in to change notification settings - Fork 478
Ensure serialzed verion of SelectedFiles is comparable #3575
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
Ensure serialzed verion of SelectedFiles is comparable #3575
Conversation
keith-turner
left a comment
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.
This looks like a good start to me. I looked at the GSon builder to see if it had any options that might improve how deterministic the output is and I did not see anything.
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java
Outdated
Show resolved
Hide resolved
|
For the test case it may be worthwhile to have a few json strinsg that are not generated by gson so we can detect if the way gson generates json ever changes. |
|
For the test it would also be good to test comparison of json containing supersets and subsets of files to each other. |
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java
Show resolved
Hide resolved
Co-authored-by: Keith Turner <kturner@apache.org>
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java
Outdated
Show resolved
Hide resolved
…lectedFiles.java Co-authored-by: Keith Turner <kturner@apache.org>
|
@keith-turner, I tried to cover the test cases that you mentioned above. |
core/src/test/java/org/apache/accumulo/core/metadata/schema/SelectedFilesTest.java
Show resolved
Hide resolved
core/src/test/java/org/apache/accumulo/core/metadata/schema/SelectedFilesTest.java
Show resolved
Hide resolved
core/src/main/java/org/apache/accumulo/core/metadata/schema/SelectedFiles.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/accumulo/core/metadata/schema/SelectedFilesTest.java
Show resolved
Hide resolved
Those look really good. I made a few other comments. I think this is good to go after that. I need open an issue for the thing @dlmarion brought up or it will be forgotten. |
Co-authored-by: Keith Turner <kturner@apache.org>
fixes #3527
WIP - wanted to push my changes up early to see if this approach might be on the right track. I plan to add tests for this but any feedback including ideas pertaining to potential test cases is welcome.