----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/48266/#review137477 -----------------------------------------------------------
Hi Bob, Summit! Using events instead of polling continusly seems to be a better solution, may be would be better to listen to already existing events like ActionFinalReportReceivedEvent which is fired when a command reaches it's final state. Probaly even better would be to fire a new event like RequestCompleted in ActionDBAccessorImpl.endRequestIfCompleted(). Later we may use this event to not just log the end cluster deployment but to actually set a final status on LogicalReuqest in db to avoid calculation of requestr status all the time. - Sandor Magyari On June 11, 2016, 6:43 a.m., Daniel Gergely wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/48266/ > ----------------------------------------------------------- > > (Updated June 11, 2016, 6:43 a.m.) > > > Review request for Ambari, Laszlo Puskas, Oliver Szabo, Robert Nettleton, > Sandor Magyari, Sumit Mohanty, and Sebastian Toader. > > > Bugs: AMBARI-17053 > https://issues.apache.org/jira/browse/AMBARI-17053 > > > Repository: ambari > > > Description > ------- > > Add a log message to see when the cluster is ready to use (cluster creation > finishes). > > An event after each heartbeat. At that time cluster provision request is > checked if it is finished or not. In case of an ambari server restart, the > replayed requests are used to determine which one was the provision request. > I could not find a nice way to do it, but I could make a workaround. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java > c6036c2 > > ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java > 1079806 > > ambari-server/src/main/java/org/apache/ambari/server/events/HeartbeatProcessingFinishedEvent.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedState.java > 77419d8 > > ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java > 324a397 > > ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java > e3f5b49 > > ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java > fd8653c > > Diff: https://reviews.apache.org/r/48266/diff/ > > > Testing > ------- > > Succeeded locally > > > Thanks, > > Daniel Gergely > >