Re: Review Request 52999: Incorporate database consistency check into main Ambari process

2016-10-20 Thread Sid Wagle

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


Ship it!




Ship It!

- Sid Wagle


On Oct. 20, 2016, 8:42 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52999/
> ---
> 
> (Updated Oct. 20, 2016, 8:42 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18631
> https://issues.apache.org/jira/browse/AMBARI-18631
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently the database consistency check runs as a separate process prior 
> Ambari process. The database consistency checker load various modules needed 
> for performing the validations. (e.g. load stack definitions to be able to 
> compare service configs from stack with configs from db).
> Once database consistency checker completed Ambari server is started. Ambari 
> server beside others loads the same modules as database consistency checker.
> This double initialisation adds time to the ambari server startup time which 
> could be reduced if the database consistency check is moved into the ambari 
> server process.
> Moreover the database consistency check may check at the beginning if the 
> database is empty and perform the checks only if there is data in the 
> database.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
>  2d91eca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java
>  535d74f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  4030ef9 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java
>  4663310 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
>  54f6147 
> 
> Diff: https://reviews.apache.org/r/52999/diff/
> 
> 
> Testing
> ---
> 
> UT will be added and checked after patch draft review
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52999: Incorporate database consistency check into main Ambari process

2016-10-20 Thread Vitalyi Brodetskyi


> On Жов. 18, 2016, 10:43 після полудня, Sid Wagle wrote:
> > ambari-server/src/main/python/ambari_server_main.py, line 105
> > 
> >
> > This should be configurable if it isn't.

I don't think we need to make this time configurable. This is the time during 
which we monitoring server process. For 3.0.0 we changed it to 40-50 seconds, 
and we stop monitoring when port 8080 become busy. I set this time to 30 
seconds because i think it's enough to finish db check.


- Vitalyi


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


On Жов. 20, 2016, 8:42 після полудня, Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52999/
> ---
> 
> (Updated Жов. 20, 2016, 8:42 після полудня)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18631
> https://issues.apache.org/jira/browse/AMBARI-18631
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently the database consistency check runs as a separate process prior 
> Ambari process. The database consistency checker load various modules needed 
> for performing the validations. (e.g. load stack definitions to be able to 
> compare service configs from stack with configs from db).
> Once database consistency checker completed Ambari server is started. Ambari 
> server beside others loads the same modules as database consistency checker.
> This double initialisation adds time to the ambari server startup time which 
> could be reduced if the database consistency check is moved into the ambari 
> server process.
> Moreover the database consistency check may check at the beginning if the 
> database is empty and perform the checks only if there is data in the 
> database.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
>  2d91eca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java
>  535d74f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  4030ef9 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java
>  4663310 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
>  54f6147 
> 
> Diff: https://reviews.apache.org/r/52999/diff/
> 
> 
> Testing
> ---
> 
> UT will be added and checked after patch draft review
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 52999: Incorporate database consistency check into main Ambari process

2016-10-20 Thread Vitalyi Brodetskyi

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

(Updated Жов. 20, 2016, 8:42 після полудня)


Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-18631
https://issues.apache.org/jira/browse/AMBARI-18631


Repository: ambari


Description
---

Currently the database consistency check runs as a separate process prior 
Ambari process. The database consistency checker load various modules needed 
for performing the validations. (e.g. load stack definitions to be able to 
compare service configs from stack with configs from db).
Once database consistency checker completed Ambari server is started. Ambari 
server beside others loads the same modules as database consistency checker.
This double initialisation adds time to the ambari server startup time which 
could be reduced if the database consistency check is moved into the ambari 
server process.
Moreover the database consistency check may check at the beginning if the 
database is empty and perform the checks only if there is data in the database.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
 2d91eca 
  
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java
 535d74f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 4030ef9 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 
  
ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java
 4663310 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariServerTest.java
 54f6147 

Diff: https://reviews.apache.org/r/52999/diff/


Testing
---

UT will be added and checked after patch draft review


Thanks,

Vitalyi Brodetskyi



Re: Review Request 52999: Incorporate database consistency check into main Ambari process

2016-10-18 Thread Sid Wagle

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 (line 304)


Can we move this to a seaparate method instead of adding all code to run()?



ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 (lines 304 - 325)


Minor nit: Error available sounds like is stderr available for writing, 
ifErrorsFound sounds more nuanced.



ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 (line 312)


formatting



ambari-server/src/main/python/ambari_server_main.py (line 105)


This should be configurable if it isn't.


- Sid Wagle


On Oct. 18, 2016, 9:50 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52999/
> ---
> 
> (Updated Oct. 18, 2016, 9:50 p.m.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-18631
> https://issues.apache.org/jira/browse/AMBARI-18631
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Currently the database consistency check runs as a separate process prior 
> Ambari process. The database consistency checker load various modules needed 
> for performing the validations. (e.g. load stack definitions to be able to 
> compare service configs from stack with configs from db).
> Once database consistency checker completed Ambari server is started. Ambari 
> server beside others loads the same modules as database consistency checker.
> This double initialisation adds time to the ambari server startup time which 
> could be reduced if the database consistency check is moved into the ambari 
> server process.
> Moreover the database consistency check may check at the beginning if the 
> database is empty and perform the checks only if there is data in the 
> database.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
>  2d91eca 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java
>  535d74f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  eee7fee 
>   ambari-server/src/main/python/ambari_server_main.py 57ec58d 
> 
> Diff: https://reviews.apache.org/r/52999/diff/
> 
> 
> Testing
> ---
> 
> UT will be added and checked after patch draft review
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Review Request 52999: Incorporate database consistency check into main Ambari process

2016-10-18 Thread Vitalyi Brodetskyi

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

Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-18631
https://issues.apache.org/jira/browse/AMBARI-18631


Repository: ambari


Description
---

Currently the database consistency check runs as a separate process prior 
Ambari process. The database consistency checker load various modules needed 
for performing the validations. (e.g. load stack definitions to be able to 
compare service configs from stack with configs from db).
Once database consistency checker completed Ambari server is started. Ambari 
server beside others loads the same modules as database consistency checker.
This double initialisation adds time to the ambari server startup time which 
could be reduced if the database consistency check is moved into the ambari 
server process.
Moreover the database consistency check may check at the beginning if the 
database is empty and perform the checks only if there is data in the database.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
 2d91eca 
  
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyChecker.java
 535d74f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 eee7fee 
  ambari-server/src/main/python/ambari_server_main.py 57ec58d 

Diff: https://reviews.apache.org/r/52999/diff/


Testing
---

UT will be added and checked after patch draft review


Thanks,

Vitalyi Brodetskyi