cshannon commented on code in PR #5229:
URL: https://github.com/apache/accumulo/pull/5229#discussion_r1907230073
##########
core/src/main/java/org/apache/accumulo/core/metadata/schema/CompactionMetadata.java:
##########
@@ -93,10 +95,31 @@ public FateId getFateId() {
return fateId;
}
+ private static class InputFile {
+ String path;
+ String startRow;
+ String endRow;
+
+ private static InputFile from(StoredTabletFile stf) {
+ InputFile i = new InputFile();
+ i.path = stf.getPath().toString();
+ Range r = stf.getRange();
+ i.startRow = r.getStartKey() == null ? "null" :
r.getStartKey().toString();
Review Comment:
When i first looked into this issue and I mentioned that we would break
encapsulation I should have elaborated that my I was referring to
TabletFileCqMetadataGson being private and that the StoredTabletFile kept all
of that internal so I didn't want to expose it.
I agree with @keith-turner that if we at least make the code around the
serialization package protected and not public that would be a good compromise
I think. The TabletFileCqMetadataGson would certainly be the thing to re-use
here because it already handles everything correctly with encoding/decoding the
binary ranges so no need to have to do it again.
One other nice benefit of making TabletFileCqMetadataGson and the
serialization code for it package protected instead of private is that it would
be easier to write some unit tests if we wanted.
--
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]