Improve Property Types#6487
Draft
Amemeda wants to merge 7 commits into
Draft
Conversation
Amemeda
marked this pull request as ready for review
July 21, 2026 18:03
Amemeda
commented
Jul 21, 2026
Comment on lines
+1572
to
+1582
| public static Set<Property> getRequiredProperties() { | ||
| return Set.of(Property.INSTANCE_ZK_HOST, Property.INSTANCE_ZK_TIMEOUT, | ||
| Property.INSTANCE_SECRET, Property.INSTANCE_VOLUMES, Property.GENERAL_THREADPOOL_SIZE, | ||
| Property.GENERAL_DELEGATION_TOKEN_LIFETIME, | ||
| Property.GENERAL_DELEGATION_TOKEN_UPDATE_INTERVAL, Property.GENERAL_IDLE_PROCESS_INTERVAL, | ||
| Property.GENERAL_LOW_MEM_DETECTOR_INTERVAL, Property.GENERAL_LOW_MEM_DETECTOR_THRESHOLD, | ||
| Property.GENERAL_SERVER_LOCK_VERIFICATION_INTERVAL, Property.MANAGER_CLIENTPORT, | ||
| Property.TSERV_CLIENTPORT, Property.GC_CYCLE_START, Property.GC_CYCLE_DELAY, | ||
| Property.GC_PORT, Property.MONITOR_PORT, Property.TABLE_MAJC_RATIO, | ||
| Property.TABLE_SPLIT_THRESHOLD); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Are there any more required properties missing? Or how can I tell if the property is required?
Amemeda
marked this pull request as draft
July 21, 2026 18:04
Contributor
Author
|
@kevinrr888 Checking if you are still available for discussion on this issue, Looking for your guidance/opinion over the expected changes |
Amemeda
commented
Jul 24, 2026
Comment on lines
+236
to
+255
| // SECOND VERSION OF ValidPath, leaving while waiting for clarification on the expected validation | ||
| /** | ||
| * Validate that the provided string is a valid hadoop path. Path must exist and be a valid | ||
| * file/directory | ||
| */ | ||
| /* | ||
| * private static class ValidPath implements Predicate<String> { private static final Logger log = | ||
| * LoggerFactory.getLogger(ValidPath.class); | ||
| * | ||
| * @Override public boolean test(String path) { Configuration conf = new Configuration(); Path | ||
| * hadoopPath = new Path(path); | ||
| * | ||
| * try { FileSystem fs = hadoopPath.getFileSystem(conf); // Check if path exists if | ||
| * (fs.exists(hadoopPath)) { // Check if path is a valid directory if | ||
| * (fs.getFileStatus(hadoopPath).isFile() || fs.getFileStatus(hadoopPath).isDirectory()) { return | ||
| * true; } log.error("provided path is not a file or directory"); return false; } | ||
| * log.error("provided path does not exist"); return false; } catch (IOException e) { | ||
| * log.error("provided path is not valid"); return false; } } } | ||
| */ | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Wasn't sure the exact validation expected for PropertyType.PATH, this commented out method does validation as a hadoop file path / directory. I wrote this one before finding some examples of path values in PropertyTypeTest, so the actual ValidPath checks the string path and validates with regex. I will remove this version if the regex is correct way.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
ServerConfigCheckRunner.javaand intoProperty.javaas a static method that returns a Set of the required propertiesPropertyType.PATHandPropertyType.URIPropertyType.javaThis pr resolves #6112
TODO:
PropertyType.STRINGwith appropriate new/existing PropertyTypes for proper validation- Properties that are not required could accept empty string, null, or a valid value (where validity is well defined)
- Properties that are required could only accept a valid value
Refer to discussion over property types on pr #5348