cshannon commented on code in PR #3506:
URL: https://github.com/apache/accumulo/pull/3506#discussion_r1248285731
##########
server/base/src/main/java/org/apache/accumulo/server/constraints/MetadataConstraints.java:
##########
@@ -128,6 +129,19 @@ private static ArrayList<Short>
addIfNotPresent(ArrayList<Short> lst, int intVio
return lst;
}
+ /*
+ * Validates the data file metadata is valid for a StoredDataFile.
+ */
+ private static ArrayList<Short> validateDataFilePath(ArrayList<Short>
violations,
+ String metadata) {
+ try {
+ StoredTabletFile.validate(metadata);
+ } catch (RuntimeException e) {
+ violations = addViolation(violations, 9);
+ }
+ return violations;
Review Comment:
I agree, the pattern is definitely not good. @keith-turner already created
another issue which is intended to be a follow on to improve this class and the
validation https://github.com/apache/accumulo/issues/3505
I think it might make sense to just finish this PR and then fix things in a
follow up in line with the Issue created.
--
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]