kevinrr888 commented on code in PR #5732:
URL: https://github.com/apache/accumulo/pull/5732#discussion_r2200889888
##########
server/manager/src/main/java/org/apache/accumulo/manager/ManagerTime.java:
##########
@@ -85,20 +85,38 @@ public class ManagerTime {
* start.</li>
* </ul>
*/
- private final AtomicReference<Duration> skewAmount;
+ private AtomicReference<Duration> skewAmount;
- public ManagerTime(Manager manager, AccumuloConfiguration conf) throws
IOException {
- this.zk = manager.getContext().getZooSession().asReaderWriter();
- this.manager = manager;
+ ManagerTime() {
+ this.manager = new AtomicReference<>(null);
+ }
+
+ // Once it's set call constructor
+ public void setManager(Manager manager) throws IOException {
Review Comment:
The time is how long the cluster has had the manager for. So, the time since
the creation of ManagerTime (since this is what is tracking the time in the
manager). If we call getTime 10 seconds after ManagerTime is created, we will
see 10 seconds.
Yeah, mt.getTime() is throwing the exception there. This is because
ManagerTime should not work until we set the Manager on it. So things should
throw an exception until we call setManager
--
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]