keith-turner commented on code in PR #5732: URL: https://github.com/apache/accumulo/pull/5732#discussion_r2200959518
########## 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: It would be worthwhile to improve the javadoc on that class, maybe we could add an example like the following to the ManagerTime javadoc? The following is an example of how ManagerTime is expected to work * The first Manager process (MP1) in an accumulo cluster starts * ManagerTime.getTime() is called in MP1 after it has been alive for 30 secs and returns 30 secs * ManagerTime.getTime() is called in MP1 after it has been alive for 90 secs and returns 90 secs * MP1 dies after being alive for 120 seconds * After 300 seconds the second manager process starts * ManagerTime.getTime() is called in MP2 after it has been alive for 15 secs and returns 120+15 secs. The 120 was how long MP1 was alive. * ManagerTime.getTime() is called in MP2 after it has been alive for 45 secs and returns 120+45 secs. * MP2 dies after being alive for 90 seconds. * After 600 seconds the second manager process starts * ManagerTime.getTime() is called in MP3 after it has been alive for 10 secs and returns 120+90+10 secs. The 120 and 90 are the sums of the previous manager lifetimes. -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org