slackwinner commented on a change in pull request #1971:
URL: https://github.com/apache/accumulo/pull/1971#discussion_r595321201
##########
File path:
core/src/main/java/org/apache/accumulo/core/clientImpl/ClientContext.java
##########
@@ -96,6 +96,7 @@
private ClientInfo info;
private String instanceId;
private final ZooCache zooCache;
+ private static final String VALID_NAME_REGEX =
"^(\\w{1,1024}\\.)?(\\w{1,1024})$";
Review comment:
@milleruntime @ctubbsii Thank you for the insightful suggestions. I'll
go ahead and start making the appropriate changes. Also, I thought the {1,1024}
enforces the length constraint since, based on the regex expression, you must
have at least 1 character but no more than 1024 characters as opposed to having
the '+' character which only requires 1 or more characters. Perhaps I am
misinterpreting the regex expression?
Also in the Constants.java file, there are constant variables with
MAX_TABLE_NAME_LEN and MAX_NAMESPACE_LEN. I believe we should use these
variables to replace the hard coded value "1024" so we can easily change the
value (if need be) in one spot. Any thoughts on this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]