Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-29 Thread Sid Wagle


> On Nov. 29, 2016, 4:29 p.m., Jonathan Hurley wrote:
> > Ping. This looks like it was submitted. Can you close the review?

Done. Thanks for the reminder.


- Sid


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


On Nov. 16, 2016, 7:39 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 16, 2016, 7:39 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> File Attachments
> 
> 
> Enable both connectors
>   
> https://reviews.apache.org/media/uploaded/files/2016/11/16/62b35d83-882e-4a64-8459-c1ad3849a88f__AMBARI-18827-1.patch
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-29 Thread Jonathan Hurley

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



Ping. This looks like it was submitted. Can you close the review?

- Jonathan Hurley


On Nov. 16, 2016, 2:39 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 16, 2016, 2:39 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> File Attachments
> 
> 
> Enable both connectors
>   
> https://reviews.apache.org/media/uploaded/files/2016/11/16/62b35d83-882e-4a64-8459-c1ad3849a88f__AMBARI-18827-1.patch
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-16 Thread Jonathan Hurley

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


Ship it!




Ship It!

- Jonathan Hurley


On Nov. 16, 2016, 2:39 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 16, 2016, 2:39 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> File Attachments
> 
> 
> Enable both connectors
>   
> https://reviews.apache.org/media/uploaded/files/2016/11/16/62b35d83-882e-4a64-8459-c1ad3849a88f__AMBARI-18827-1.patch
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-16 Thread Sumit Mohanty

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


Ship it!




Ship It!

- Sumit Mohanty


On Nov. 16, 2016, 7:39 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 16, 2016, 7:39 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> File Attachments
> 
> 
> Enable both connectors
>   
> https://reviews.apache.org/media/uploaded/files/2016/11/16/62b35d83-882e-4a64-8459-c1ad3849a88f__AMBARI-18827-1.patch
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-16 Thread Sid Wagle

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

(Updated Nov. 16, 2016, 7:39 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Verified both one-way and two-way ssl.


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs
-

  ambari-server/docs/configuration/index.md 9d793ff 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 6a4eabf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


File Attachments (updated)


Enable both connectors
  
https://reviews.apache.org/media/uploaded/files/2016/11/16/62b35d83-882e-4a64-8459-c1ad3849a88f__AMBARI-18827-1.patch


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle

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

(Updated Nov. 10, 2016, 6:34 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Modified: CLIENT_THREAD_POOL_NAME = "ambari-client-thread";


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs (updated)
-

  ambari-server/docs/configuration/index.md 9d793ff 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 6a4eabf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle

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

(Updated Nov. 10, 2016, 6:27 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Generated new index.md with new markdown properties.


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs (updated)
-

  ambari-server/docs/configuration/index.md 9d793ff 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 6a4eabf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle

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

(Updated Nov. 10, 2016, 6:32 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Minor nit: Removed unwanted dummy code change done to genetate index file.


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs (updated)
-

  ambari-server/docs/configuration/index.md 9d793ff 
  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 6a4eabf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Jonathan Hurley


> On Nov. 10, 2016, 9:58 a.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 170
> > 
> >
> > Can we keep these the same name as before?
> 
> Sid Wagle wrote:
> Ok, currently (2.4.2.0-101) we name agent threads as: qtp-ambari-agent 
> and client as ambari-client-thread. Both used QueuedThreadPool, this make it 
> consistent.
> 
> Sid Wagle wrote:
> Let me know if you are ok with naming them qtp-ambari-agent and 
> qtp-ambari-client vs qtp-ambari-agent and ambari-client-thread. Dropping the 
> issue for now.

If you want to change them back, then OK - I'll have to update a bunch of 
scripts I have which are used for evaluating jstacks. If there's no real reason 
to change them back to their old values, then I'd suggest leaving them.


- Jonathan


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


On Nov. 10, 2016, 1:27 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 10, 2016, 1:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle


> On Nov. 10, 2016, 2:58 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 646
> > 
> >
> > JavaDoc.

Added.


- Sid


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


On Nov. 10, 2016, 6:27 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 10, 2016, 6:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle


> On Nov. 10, 2016, 2:58 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 170
> > 
> >
> > Can we keep these the same name as before?
> 
> Sid Wagle wrote:
> Ok, currently (2.4.2.0-101) we name agent threads as: qtp-ambari-agent 
> and client as ambari-client-thread. Both used QueuedThreadPool, this make it 
> consistent.

Let me know if you are ok with naming them qtp-ambari-agent and 
qtp-ambari-client vs qtp-ambari-agent and ambari-client-thread. Dropping the 
issue for now.


- Sid


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


On Nov. 10, 2016, 6:27 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 10, 2016, 6:27 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   ambari-server/docs/configuration/index.md 9d793ff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Sid Wagle


> On Nov. 10, 2016, 2:58 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 170
> > 
> >
> > Can we keep these the same name as before?

Ok, currently (2.4.2.0-101) we name agent threads as: qtp-ambari-agent and 
client as ambari-client-thread. Both used QueuedThreadPool, this make it 
consistent.


- Sid


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


On Nov. 9, 2016, 10:09 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 9, 2016, 10:09 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-10 Thread Jonathan Hurley

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 (lines 5510 - 5526)


Don't forget to run
`java org.apache.ambari.server.configuration.Configuration -output 
../docs/configuration/index.md` to generate a new MD file.



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


Can we keep these the same name as before?



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


JavaDoc.


- Jonathan Hurley


On Nov. 9, 2016, 5:09 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 9, 2016, 5:09 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Sumit Mohanty

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


Ship it!




Ship It!

- Sumit Mohanty


On Nov. 9, 2016, 10:09 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 9, 2016, 10:09 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  6a4eabf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Sid Wagle

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

(Updated Nov. 9, 2016, 10:09 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Rebased with top of branch-2.5


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 6a4eabf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Sid Wagle


> On Nov. 9, 2016, 3:10 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 171
> > 
> >
> > Why change these back? qtp doesn't mean anything.
> 
> Sid Wagle wrote:
> For some reason I thought the qtp was the new addition since it 
> threadpool is a QueuedThreadPool.
> 
> Actually, I need to update the patch a little bit to enable both 
> connectors will update these in a bit.

The agent thread pool was already named as "qtp-ambari-agent", I just changed 
the constant to make it consistent with client thread pool also being a 
constant.


> On Nov. 9, 2016, 3:10 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java,
> >  lines 5501-5514
> > 
> >
> > Should these properties be added to the Markdown?

Fixed in new patch.


- Sid


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


On Nov. 9, 2016, 7:30 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 9, 2016, 7:30 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  8857e19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Sid Wagle

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

(Updated Nov. 9, 2016, 7:30 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


Changes
---

Thanks Jonathan Hurley for the review.

- Refactored to remove code dup.
- Enabled non-ssl connector always and two-way only if enabled
- Factored in the extra acceptors if both connectors enabled.
- Added Markdown.


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


Repository: ambari


Description
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 8857e19 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Sid Wagle


> On Nov. 9, 2016, 3:10 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java,
> >  line 171
> > 
> >
> > Why change these back? qtp doesn't mean anything.

For some reason I thought the qtp was the new addition since it threadpool is a 
QueuedThreadPool.

Actually, I need to update the patch a little bit to enable both connectors 
will update these in a bit.


- Sid


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


On Nov. 8, 2016, 10:45 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 8, 2016, 10:45 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  8857e19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-09 Thread Jonathan Hurley

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 (lines 5481 - 5494)


Should these properties be added to the Markdown?



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


Why change these back? qtp doesn't mean anything.


- Jonathan Hurley


On Nov. 8, 2016, 5:45 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 8, 2016, 5:45 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  8857e19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-08 Thread Sid Wagle

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



Need to change the code, seems like the agent always ping non-secure port to 
download cert, so need to configure both connectors.

- Sid Wagle


On Nov. 8, 2016, 10:45 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/53588/
> ---
> 
> (Updated Nov. 8, 2016, 10:45 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
> Papirkovskyy, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-18827
> https://issues.apache.org/jira/browse/AMBARI-18827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> _Objectives_:
> - Allow acceptors for agent and api connectors to be configurable
> - The thread pool configuration did not take into account both 2-way and 
> 1-way connectors are configured for agent every time although only one is 
> used and not a mixed-mode. This causes insufficient threads in agent 
> threadpool for a high cpu core environment.
> - Includes refactoring to remove code duplication.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  8857e19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
>  ce3fe85 
>   
> ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
>  a1b5a6e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
>  844f022 
> 
> Diff: https://reviews.apache.org/r/53588/diff/
> 
> 
> Testing
> ---
> 
> Verified manually.
> 
> 2-core VM ==>
> Before patch:
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 4
> [root@swagle-test-1 ~]# cat ~/jstack_before.out | grep 
> "ambari-agent.*Selector" | wc -l
> 4
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> 
> Default after patch:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-client.*Selector" | wc -l
> 1
> [root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
> "ambari-agent.*Selector" | wc -l
> 1
> 
> Setting configurations = 2:
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Selector" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-agent.*Acceptor" | wc -l
> 2
> [root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
> "ambari-client.*Acceptor" | wc -l
> 2
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 53588: Allow acceptor / seclector configuration for API and agent connectors

2016-11-08 Thread Sid Wagle

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

(Updated Nov. 8, 2016, 10:45 p.m.)


Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav 
Papirkovskyy, and Sumit Mohanty.


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


Repository: ambari


Description (updated)
---

_Objectives_:
- Allow acceptors for agent and api connectors to be configurable
- The thread pool configuration did not take into account both 2-way and 1-way 
connectors are configured for agent every time although only one is used and 
not a mixed-mode. This causes insufficient threads in agent threadpool for a 
high cpu core environment.
- Includes refactoring to remove code duplication.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
 8857e19 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
 ce3fe85 
  
ambari-server/src/main/java/org/apache/ambari/server/security/unsecured/rest/ConnectionInfo.java
 a1b5a6e 
  
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
 844f022 

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


Testing
---

Verified manually.

2-core VM ==>
Before patch:
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Acceptor" 
| wc -l
4
[root@swagle-test-1 ~]# cat ~/jstack_before.out | grep "ambari-agent.*Selector" 
| wc -l
4
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_before.out | grep 
"ambari-client.*Acceptor" | wc -l
1

Default after patch:
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Acceptor" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-client.*Selector" | wc -l
1
[root@swagle-test-1 ambari-server]# cat ~/jstack_after.out | grep 
"ambari-agent.*Selector" | wc -l
1

Setting configurations = 2:
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Selector" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-agent.*Acceptor" | wc -l
2
[root@swagle-test-1 ambari-server]# cat ~/jstack_configured.out | grep 
"ambari-client.*Acceptor" | wc -l
2


Thanks,

Sid Wagle