Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-16 Thread Daniel Gergely


> On jún. 15, 2016, 3:49 du, Laszlo Puskas wrote:
> > ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java,
> >  line 87
> > 
> >
> > The member annotated with @TestSubject is instantiated by the 
> > framework. Why do we need two instances here?

It is beacuse of the statefullness of TopologyManager. Replay needs a fresh 
instance of TopologyManager, because the other tests "pollutes" it.


- Daniel


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137749
---


On jún. 16, 2016, 8:24 de, Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated jún. 16, 2016, 8:24 de)
> 
> 
> 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/actionmanager/ActionDBAccessorImpl.java
>  8e6fb3f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
> 1079806 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/RequestFinishedEvent.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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-16 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

(Updated jún. 16, 2016, 8:24 de)


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 (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
 8e6fb3f 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
1079806 
  
ambari-server/src/main/java/org/apache/ambari/server/events/RequestFinishedEvent.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



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-15 Thread Laszlo Puskas

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137749
---




ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
 (line 149)


Checking the clusterId here is superfluous as the finder should return only 
those entities that have this clusterId.



ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
 (line 87)


The member annotated with @TestSubject is instantiated by the framework. 
Why do we need two instances here?


- Laszlo Puskas


On June 15, 2016, 11:33 a.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated June 15, 2016, 11:33 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/actionmanager/ActionDBAccessorImpl.java
>  8e6fb3f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
> 1079806 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/RequestFinishedEvent.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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-15 Thread Sebastian Toader

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137713
---


Ship it!




Ship It!

- Sebastian Toader


On June 15, 2016, 1:33 p.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated June 15, 2016, 1:33 p.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/actionmanager/ActionDBAccessorImpl.java
>  8e6fb3f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
> 1079806 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/RequestFinishedEvent.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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-15 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

(Updated jún. 15, 2016, 11:33 de)


Review request for Ambari, Laszlo Puskas, Oliver Szabo, Robert Nettleton, 
Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


Changes
---

Moving event posting from HeartbeatHandler to ActionDBAccessor


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 (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionDBAccessorImpl.java
 8e6fb3f 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
1079806 
  
ambari-server/src/main/java/org/apache/ambari/server/events/RequestFinishedEvent.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



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-14 Thread Daniel Gergely


> On jún. 14, 2016, 10:28 de, Sandor Magyari wrote:
> > 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.

We have to use endRequest method there, because abort calls it directly. 
Otherwise if everyone thinks it is a better place to post an event, I think I 
can move the logic there.


- Daniel


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137477
---


On jún. 11, 2016, 6:43 de, Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated jún. 11, 2016, 6:43 de)
> 
> 
> 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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-14 Thread Sandor Magyari

---
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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-14 Thread Daniel Gergely


> On jún. 13, 2016, 9:23 du, Sumit Mohanty wrote:
> > Does this handle UI based cluster deployments?
> > Probably there is no good way for UI based deplyments to know if a specific 
> > request is a cluster create request or not.
> > 
> > What happens after cluster creation is over - does the code continue to 
> > handle Heartbeat processing completed event?
> > Would it have been possible to create an event for Request-Completed and 
> > process that rather than Heartbeat processing completed?

This issue was only about blueprint deployment. UI based deployment is not 
tracked.
If cluster creation is completed, event is still kept sending, however the 
subscribed method does nothing in this case. So it does not affect performance 
or does unnecessary calculations.
I did not think about tracking request completition, because I felt that the 
minimum number of checks can be achieved by tracking only heartbeats.


- Daniel


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137384
---


On jún. 11, 2016, 6:43 de, Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated jún. 11, 2016, 6:43 de)
> 
> 
> 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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-14 Thread Daniel Gergely


> On jún. 13, 2016, 4:51 du, Robert Nettleton wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java,
> >  line 191
> > 
> >
> > I'm a little concerned that this approach could have performance issues 
> > down the road.
> > 
> > I'm wondering if it might be worth considering launching a separate 
> > task thread when the cluster is created by the TopologyManager, that can 
> > monitor the state of the LogicalRequest as the deployment progresses.
> > 
> > I would recommend asking Sumit to review this as well, since it's not 
> > clear to me that this is the approach that should be taken.
> 
> Sebastian Toader wrote:
> This loop simply iterates through the received reports extracts cluster 
> id and publishes an event for further processing. The event is consumed on a 
> separate thread 'ambari-event-bus' which is set up in 
> ```AmbariEventPublisher```. Do you think that the extraction of cluster name 
> and cluster id may slow the the heartbeat handler?
> 
> Robert Nettleton wrote:
> Hi Sebastian, Thanks for this information.
> 
> I guess I'd be concerned about any extraneous additions to the 
> HeartBeatHandler, especially given that it seems like there would be other 
> alternatives.
> 
> Was the possibility of launching a thread in the TopologyManager to 
> monitor a cluster deployment's status considered?  Since the TopologyManager 
> already has access to the LogicalRequest and the underlying physical requests 
> as well, it seems like the most natural fit for monitoring status, and 
> providing a way to log this information.
> 
> My overall concern is that the heartbeat handlers are being modified just 
> to support logging a message when the cluster has completed.  As I mentioned 
> above, it seems like it would be simpler and more straightforward to resolve 
> this with a thread that monitors the progress, using the resource APIs that 
> already exist in Ambari.  
> 
> If the approach I've just detailed was considered, can you post why it 
> was not chosen?  Are there some technical concerns that make using a separate 
> thread not feasible? 
> 
> Thanks.

Hi Bob,
HeartbeatHandler is not modified only to support logging. Now it sends an event 
(which is basically free: a list is created and cluster ids are stored in that. 
Cluster ids are from a cache, so there is no performance issue there either), 
and this event is handled asynchronously (logging part of the code is executed 
by a different thread). So it does not affect HeartbeatHandler.
So it is indeed a separate thread.

However if you still have concerns, let's talk, I am open to any other working 
solution.


- Daniel


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137326
---


On jún. 11, 2016, 6:43 de, Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated jún. 11, 2016, 6:43 de)
> 
> 
> 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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-13 Thread Sumit Mohanty

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137384
---



Does this handle UI based cluster deployments?
Probably there is no good way for UI based deplyments to know if a specific 
request is a cluster create request or not.

What happens after cluster creation is over - does the code continue to handle 
Heartbeat processing completed event?
Would it have been possible to create an event for Request-Completed and 
process that rather than Heartbeat processing completed?

- Sumit Mohanty


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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-13 Thread Robert Nettleton


> On June 13, 2016, 4:51 p.m., Robert Nettleton wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java,
> >  line 191
> > 
> >
> > I'm a little concerned that this approach could have performance issues 
> > down the road.
> > 
> > I'm wondering if it might be worth considering launching a separate 
> > task thread when the cluster is created by the TopologyManager, that can 
> > monitor the state of the LogicalRequest as the deployment progresses.
> > 
> > I would recommend asking Sumit to review this as well, since it's not 
> > clear to me that this is the approach that should be taken.
> 
> Sebastian Toader wrote:
> This loop simply iterates through the received reports extracts cluster 
> id and publishes an event for further processing. The event is consumed on a 
> separate thread 'ambari-event-bus' which is set up in 
> ```AmbariEventPublisher```. Do you think that the extraction of cluster name 
> and cluster id may slow the the heartbeat handler?

Hi Sebastian, Thanks for this information.

I guess I'd be concerned about any extraneous additions to the 
HeartBeatHandler, especially given that it seems like there would be other 
alternatives.

Was the possibility of launching a thread in the TopologyManager to monitor a 
cluster deployment's status considered?  Since the TopologyManager already has 
access to the LogicalRequest and the underlying physical requests as well, it 
seems like the most natural fit for monitoring status, and providing a way to 
log this information.

My overall concern is that the heartbeat handlers are being modified just to 
support logging a message when the cluster has completed.  As I mentioned 
above, it seems like it would be simpler and more straightforward to resolve 
this with a thread that monitors the progress, using the resource APIs that 
already exist in Ambari.  

If the approach I've just detailed was considered, can you post why it was not 
chosen?  Are there some technical concerns that make using a separate thread 
not feasible? 

Thanks.


- Robert


---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137326
---


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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-13 Thread Robert Nettleton

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137326
---



Thanks for providing this patch.

Most of the changes seem straightforward to me, but I'm concerned about 
attaching this check to the Ambari Agent HeartBeat handler.  My concern is that 
this could have performance implications later on.

I'd request that perhaps an alternate approach be considered, since there might 
be ways to implement this as a separate task thread in the TopologyManager, 
that could then add the required logging once the cluster deployment completes.

I think it makes sense to ask Sumit Mohanty to review this as well.  

Thanks.


ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
 (line 191)


I'm a little concerned that this approach could have performance issues 
down the road.

I'm wondering if it might be worth considering launching a separate task 
thread when the cluster is created by the TopologyManager, that can monitor the 
state of the LogicalRequest as the deployment progresses.

I would recommend asking Sumit to review this as well, since it's not clear 
to me that this is the approach that should be taken.


- Robert Nettleton


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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-11 Thread Sebastian Toader

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137133
---


Ship it!




Ship It!

- Sebastian Toader


On June 11, 2016, 8: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, 8: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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-11 Thread Sandor Magyari

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review137122
---


Ship it!




Ship It!

- 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
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-09 Thread Sebastian Toader

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review136799
---




ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
 (lines 190 - 193)


Instead of picking only the first report from the reports collection 
iterate through the reporst and publish the HeartbeatProcessingFinishedEvent 
for all clusters found in the reports.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
 (lines 116 - 120)


There is no need for this public static field.



ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
 (line 147)


There is a findByClusterId method that returns the topology requests for a 
given cluster.



ambari-server/src/main/java/org/apache/ambari/server/topology/PersistedStateImpl.java
 (line 149)


You could 
```TopologyRequest.Type.PROVISION == 
TopologyRequest.Type.valueOf(entity.getAction())```



ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 (line 167)


Once a cluster creation request finished for a cluster we should not track 
any more that cluster id.



ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 (line 168)


We should log something like "Cluster creation request X using Blueprint Y 
successfully completed !" for success. In case of failure "Cluster creation 
request X using Blueprint Y failed !"


- Sebastian Toader


On June 9, 2016, 2:54 p.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated June 9, 2016, 2:54 p.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
> ---
> 
> Still running locally...
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-09 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

(Updated jún. 9, 2016, 12:54 du)


Review request for Ambari, Laszlo Puskas, Oliver Szabo, Robert Nettleton, 
Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


Changes
---

Review fixes


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 (updated)
-

  
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
---

Still running locally...


Thanks,

Daniel Gergely



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-09 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

(Updated jún. 9, 2016, 12:12 du)


Review request for Ambari, Laszlo Puskas, Oliver Szabo, Robert Nettleton, 
Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


Changes
---

Handling multiple clusters, acquire provision request in an alternative way by 
extending PersistedState interface.


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 (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
 c6036c2 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
 3feac55 
  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
---

Still running locally...


Thanks,

Daniel Gergely



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-07 Thread Sandor Magyari

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review136446
---



Wouldn't better to fire these events only on component state changes instead of 
each hearbeat. HertbeatProcessor is fireing events like 
ServiceComponentHostEventType.HOST_SVCCOMP_STARTED, HOST_SVCCOMP_STOPPED, 
HOST_SVCCOMP_OP_FAILED.

- Sandor Magyari


On June 7, 2016, 7:47 a.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated June 7, 2016, 7:47 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/controller/internal/ProvisionClusterRequest.java
>  3feac55 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
> 1079806 
>   
> 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
> ---
> 
> Still running locally...
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-07 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

(Updated jún. 7, 2016, 7:47 de)


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 (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/agent/HeartbeatProcessor.java
 c6036c2 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
 3feac55 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
1079806 
  
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
---

Still running locally...


Thanks,

Daniel Gergely



Re: Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-06 Thread Laszlo Puskas

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/#review136244
---




ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java
 (line 162)


I'd rather perform this check out of this method, in order to always have a 
boolean return value for this method.


- Laszlo Puskas


On June 6, 2016, 8:47 a.m., Daniel Gergely wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48266/
> ---
> 
> (Updated June 6, 2016, 8:47 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/controller/internal/ProvisionClusterRequest.java
>  3feac55 
>   
> ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
> 1079806 
>   
> 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
> ---
> 
> Still running locally...
> 
> 
> Thanks,
> 
> Daniel Gergely
> 
>



Review Request 48266: Add explicit ambari-server log line indicating cluster creation complete

2016-06-06 Thread Daniel Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48266/
---

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/controller/internal/ProvisionClusterRequest.java
 3feac55 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
1079806 
  
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
---

Still running locally...


Thanks,

Daniel Gergely