ctubbsii commented on code in PR #2718:
URL: https://github.com/apache/accumulo/pull/2718#discussion_r881020599
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/RootGcCandidatesJson.java:
##########
@@ -54,14 +50,16 @@ private static class GSonData {
*
* SortedMap<dir path, SortedSet<file name>>
*/
- private SortedMap<String,SortedSet<String>> candidates;
+ private final SortedMap<String,SortedSet<String>> candidates;
- public RootGcCandidates() {
+ public RootGcCandidatesJson() {
this.candidates = new TreeMap<>();
}
- private RootGcCandidates(SortedMap<String,SortedSet<String>> candidates) {
- this.candidates = candidates;
+ public RootGcCandidatesJson(String jsonString) {
+ var rootGcCandidatesJson = GSON.fromJson(jsonString,
RootGcCandidatesJson.class);
+ Preconditions.checkArgument(rootGcCandidatesJson.getVersion() == 1);
Review Comment:
I think you want to compare it to the version above, as in:
```suggestion
Preconditions.checkArgument(rootGcCandidatesJson.getVersion() ==
version);
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]