keith-turner commented on code in PR #3292:
URL: https://github.com/apache/accumulo/pull/3292#discussion_r1170644151
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/TabletLocator.java:
##########
@@ -58,33 +61,81 @@ boolean isValid() {
return isValid;
}
+ /**
+ * Used to indicate if a user of this interface needs a tablet hosted or
not. This simple enum was
+ * created instead of using a boolean for code clarity.
+ */
+ public enum HostingNeed {
Review Comment:
The majority of the code was passing false for retry and the retry logic
complicated the TabletLocator, so I decided to scrap while making these
changes. Alot of code was doing its own retry thing when getting null back, so
I made the code return null in the case where HostingNeed was HOSTED and the
tablet currently had no location. Returning null worked with existing code, we
could have a follow on PR to improve on that pattern in the code. So its not
replacing the retry variable in any functional way, it just happens to take its
slot.
> I wonder if values REQUIRED and NOT_REQUIRED might make it more clear.
That does seem better, also thinking that renaming the enum type may help.
Will make an update with the following.
```java
public enum LocationNeed {
REQUIRED, NOT_REQUIRED
}
```
--
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]