Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-19 Thread Swapan Shridhar
ng setting passed in is "None"  
 -- In get_cluster_setting_value(). Passed-in setting : None
**o/p** : None   


**C**. is_security_enabled():
**-**

- 1. Retrieve security state of cluster by calling 'is_security_enabled()' 
which in turn calls **get_cluster_setting_value()**
 -- In get_cluster_setting_value(). Passed-in setting : security_enabled
**o/p** : false  


**=**
**stackSettings**:
**=**


**A.** Tests for **get_stack_setting_entries()**
****

- 1. Retrieve : **stack_name**

  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 5. Retrieve settings. Passed is in List (Expected Set)
   --  In get_stack_setting_entries(). Passed-in setting(s) : ['stack_tools']
   'setting_names' type expected to be a set. Passed-in type is : 
   **o/p**: None 
   
   
   

**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-19 Thread Swapan Shridhar
-- In get_cluster_setting_value(). Passed-in setting : non_existing
   **o/p** : None

- 4. Retrieve cluster_setting setting passed in is "None"  
 -- In get_cluster_setting_value(). Passed-in setting : None
**o/p** : None   


**C**. is_security_enabled():
**-**

- 1. Retrieve security state of cluster by calling 'is_security_enabled()' 
which in turn calls **get_cluster_setting_value()**
 -- In get_cluster_setting_value(). Passed-in setting : security_enabled
**o/p** : false  


**=**
**stackSettings**:
**=**


**A.** Tests for **get_stack_setting_entries()**
****

- 1. Retrieve : **stack_name**

  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 5. Retrieve settings. Passed is in List (Expected Set)
   --  In get_stack_setting_entries(). Passed-in setting(s) : ['stack_tools']
   'setting_names' type expected to be a set. Passed-in type is : 
   **o/p**: None 
   
   
   

**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-19 Thread Swapan Shridhar


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > I've [attached a small unit 
> > test](https://issues.apache.org/jira/secure/attachment/12902568/AMBARI-22649-test.patch)
> >  for `settings.py` to 
> > [AMBARI-22649](https://issues.apache.org/jira/browse/AMBARI-22649), please 
> > feel free to use it.  I think it simplifies testing behavior of this 
> > library.

Thanks Attila. This helps.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 28 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line28>
> >
> > Default value of `None` for `setting_names` would make it easier to get 
> > all settings.

Done and UT added.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 47-49 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line47>
> >
> > Shouldn't this also return `None`?  Now it says `/agentConfigParams` is 
> > not supported, but goes on to return the requested values.

Fixed.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 56 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line56>
> >
> > Why is a `list`, `frozenset` or `tuple` not acceptable?

Added support for them.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 60 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line60>
> >
> > This is unreachable, since `None` is not an instance of `set`, hence it 
> > already returns `None` a bit earlier, instead of returning all settings 
> > here.

Fixed.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 69 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line69>
> >
> > I think if the specified keys are not present, instead of `None` it 
> > should just return the empty `dict` that `result` already contains.
> > 
> > For example:
> > 
> > ```
> > get_setting_type_entries('/clusterSettings', None)['key']
> > ```
> > 
> > and 
> > 
> > ```
> > get_setting_type_entries('/clusterSettings', set(['key']))['key']
> > ```
> > 
> > should have the same result (actual value or `KeyError`), but returning 
> > `None` means the second one may result in `TypeError: 'NoneType' object has 
> > no attribute '__getitem__'` instead.

Fixed.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 89 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line89>
> >
> > Should `return None` early if `setting_name is None`

Fixed.


> On Dec. 17, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/settings.py
> > Lines 105-108 (patched)
> > <https://reviews.apache.org/r/64594/diff/3/?file=1919140#file1919140line105>
> >
> > Could be simplified to
> > 
> > ```
> > return setting_type in (STACK_SETTINGS_TYPE, CLUSTER_SETTINGS_TYPE)
> > ```

Fixed.


- Swapan


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


On Dec. 17, 2017, 8:11 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64594/
> ---
> 
> (Updated Dec. 17, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Dmytro Sen, Jayush Luniya, 
> Madhuvanthi Radhakrishnan, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-22649
> https://issues.apache.org/jira/browse/AMBARI-22649
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 

Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-17 Thread Swapan Shridhar


> On Dec. 16, 2017, 12:49 p.m., Attila Doroszlai wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/stack_settings.py
> > Lines 32-88 (patched)
> > <https://reviews.apache.org/r/64594/diff/2/?file=1917449#file1917449line32>
> >
> > Most of these 2 functions are the same as those in `cluster_settings`.  
> > Can you please try to reduce duplication?

Done.


- Swapan


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


On Dec. 17, 2017, 8:11 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64594/
> ---
> 
> (Updated Dec. 17, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Dmytro Sen, Jayush Luniya, 
> Madhuvanthi Radhakrishnan, and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-22649
> https://issues.apache.org/jira/browse/AMBARI-22649
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Background : AMBARI-22198 added "stack settings", and AMBARI-22196 introduced 
> "cluster settings" in Ambari.
> 
> **==**
> **Library for querying _clusterSettings_ and _stackSettings_ for its contents 
> in command*.json.**
> **==**
> 
> One should be able to query for a given **clusterSettings** or 
> **stackSettings**:
>  -  by passing in the setting name(one or more) in order to get it back as 
> key-value map, or
>  -  just get the value back for a passed-in setting.
> 
> 
> **Functions for clusterSettings:**
> **--**
>   - **get_cluster_setting_entries(setting_names)** : 
> -- Retrieves the passed-in cluster setting entr(y/ies) and their values 
> as a map.
>If 'setting_names' is passed-in as None : all the settings names and 
> their corresponding values will be returned as map.
>If 'setting_names' is passed-in as empty set : None will be returned.
> 
>   - **get_cluster_setting_value(setting_name)** :
> -- Retrieves the passed-in cluster setting entry's value.
> 
>   - **is_security_enabled()** : 
> -- Retrieves the cluster's security status.
> 
> 
> **Functions for stackSettings:** 
> ****
> 
> Stack settings as of now has 5 settings : stack_name, stack_root, 
> stack_features, stack_tools, stack_packages. stack_name, stack_root have 
> string as values, whereas stack_features, stack_tools, stack_packages have 
> values as JSON. Further there already exists python functions in files : 
> **stack_features.py**, **stack_tools.py** and **stack_select.py**.
> 
>- **get_stack_setting_entries(setting_names)** : 
>   --   Retrieves the passed-in stack setting entr(y/ies) and their values 
> as a map.
> If 'setting_names' is passed-in as None, all the settings names 
> and their corresponding values will be returned as map.
> If 'setting_names' is passed-in as empty set : None will be 
> returned.
> 
>- **get_stack_setting_value(setting_name)**:
> -- Retrieves the passed-in stack setting entry's value.
> 
> - **get_stack_name()**:
> -- Retrieves the stack name.
> 
> - **get_stack_root()**:
>-- Retrieves the stack root.
> 
>  
> 
> **Modifications in  _stack_features.py, stack_tools.py and stack_select.py_ 
> files:**
> **-**
> 
> - Given that these already exist and as of now they read the relevant stack 
> setting from *configurations/cluster_env*. 
> - Thus, code has been added to try reading from /stackSettings first by 
> calling the new fn.() get_stack_setting_value(). if setting not found, go for 
> the fall back  *configurations/cluster_env* (which would be removed soon, 
> when we remove cluster_env).
> 
> 
> Diffs
> -
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/cluster_settings.py
>  PRE-CREATION 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/settings.py
>  PRE-CREATION 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
>  92823b0 
>   
> ambari-common/sr

Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-17 Thread Swapan Shridhar
"None"  
 -- In get_cluster_setting_value(). Passed-in setting : None
**o/p** : None   


**C**. is_security_enabled():
**-**

- 1. Retrieve security state of cluster by calling 'is_security_enabled()' 
which in turn calls **get_cluster_setting_value()**
 -- In get_cluster_setting_value(). Passed-in setting : security_enabled
**o/p** : false  


**=**
**stackSettings**:
**=**


**A.** Tests for **get_stack_setting_entries()**
****

- 1. Retrieve : **stack_name**

  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 5. Retrieve settings. Passed is in List (Expected Set)
   --  In get_stack_setting_entries(). Passed-in setting(s) : ['stack_tools']
   'setting_names' type expected to be a set. Passed-in type is : 
   **o/p**: None 
   
   
   

**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-14 Thread Swapan Shridhar
 1. Retrieve security state of cluster by calling 'is_security_enabled()' 
which in turn calls **get_cluster_setting_value()**
 -- In get_cluster_setting_value(). Passed-in setting : security_enabled
**o/p** : false  


**=**
**stackSettings**:
**=**


**A.** Tests for **get_stack_setting_entries()**
****

- 1. Retrieve : **stack_name**

  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 5. Retrieve settings. Passed is in List (Expected Set)
   --  In get_stack_setting_entries(). Passed-in setting(s) : ['stack_tools']
   'setting_names' type expected to be a set. Passed-in type is : 
   **o/p**: None 
   
   
   

**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-14 Thread Swapan Shridhar


> On Dec. 14, 2017, 7:01 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/cluster_settings.py
> > Lines 45 (patched)
> > <https://reviews.apache.org/r/64594/diff/1/?file=1915921#file1915921line45>
> >
> > Hi,
> > Eventually it might never happen that cluster_settings is None, but if 
> > it does then this would be a Logger.error and return None instead of 
> > Logger.info because it will throw an error at Line 54 if we continue with 
> > the function. Looks like we have this in Line 78 so need to have the same 
> > behaviour here. Thanks

Added return None after line 45. Just a safeguard as of now.


> On Dec. 14, 2017, 7:01 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/cluster_settings.py
> > Lines 53 (patched)
> > <https://reviews.apache.org/r/64594/diff/1/?file=1915921#file1915921line53>
> >
> > What is the format that the calling function is expected to pass 
> > "setting_names" as? Do we need to do set(setting_names) if it is already 
> > being passed as a set?

Expected to be set. I was seeing in case someone has passed list, and we can 
still make it work.
Fixed it explicityuly by checking the type and returning None if not a set.


> On Dec. 14, 2017, 7:01 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/stack_settings.py
> > Lines 50 (patched)
> > <https://reviews.apache.org/r/64594/diff/1/?file=1915924#file1915924line50>
> >
> > return None

Added.


- Swapan


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


On Dec. 14, 2017, 9:02 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64594/
> ---
> 
> (Updated Dec. 14, 2017, 9:02 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22649
> https://issues.apache.org/jira/browse/AMBARI-22649
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Background : AMBARI-22198 added "stack settings", and AMBARI-22196 introduced 
> "cluster settings" in Ambari.
> 
> **==**
> **Library for querying _clusterSettings_ and _stackSettings_ for its contents 
> in command*.json.**
> **==**
> 
> One should be able to query for a given **clusterSettings** or 
> **stackSettings**:
>  -  by passing in the setting name(one or more) in order to get it back as 
> key-value map, or
>  -  just get the value back for a passed-in setting.
> 
> 
> **Functions for clusterSettings:**
> **--**
>   - **get_cluster_setting_entries(setting_names)** : 
> -- Retrieves the passed-in cluster setting entr(y/ies) and their values 
> as a map.
>If 'setting_names' is passed-in as None : all the settings names and 
> their corresponding values will be returned as map.
>If 'setting_names' is passed-in as empty set : None will be returned.
> 
>   - **get_cluster_setting_value(setting_name)** :
> -- Retrieves the passed-in cluster setting entry's value.
> 
>   - **is_security_enabled()** : 
> -- Retrieves the cluster's security status.
> 
> 
> **Functions for stackSettings:** 
> ****
> 
> Stack settings as of now has 5 settings : stack_name, stack_root, 
> stack_features, stack_tools, stack_packages. stack_name, stack_root have 
> string as values, whereas stack_features, stack_tools, stack_packages have 
> values as JSON. Further there already exists python functions in files : 
> **stack_features.py**, **stack_tools.py** and **stack_select.py**.
> 
>- **get_stack_setting_entries(setting_names)** : 
>   --   Retrieves the passed-in stack setting entr(y/ies) and their values 
> as a map.
> If 'setting_names' is passed-in as None, all the settings names 
> and their corresponding values will be returned as map.
> If 'setting_names' is passed-in as empty set : None will be 
> returned.
> 
>- **get_stack_setting_value(set

Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-14 Thread Swapan Shridhar


> On Dec. 14, 2017, 5:37 p.m., Jayush Luniya wrote:
> > ambari-common/src/main/python/resource_management/libraries/functions/stack_settings.py
> > Lines 24 (patched)
> > <https://reviews.apache.org/r/64594/diff/1/?file=1915924#file1915924line24>
> >
> > STACK_NAME_SETTING_KEY or STACK_NAME_PROPERTY
> > 
> > Lets try not to use CONFIG to avoid confusion.

Fixed.


- Swapan


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


On Dec. 14, 2017, 9:02 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64594/
> ---
> 
> (Updated Dec. 14, 2017, 9:02 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22649
> https://issues.apache.org/jira/browse/AMBARI-22649
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Background : AMBARI-22198 added "stack settings", and AMBARI-22196 introduced 
> "cluster settings" in Ambari.
> 
> **==**
> **Library for querying _clusterSettings_ and _stackSettings_ for its contents 
> in command*.json.**
> **==**
> 
> One should be able to query for a given **clusterSettings** or 
> **stackSettings**:
>  -  by passing in the setting name(one or more) in order to get it back as 
> key-value map, or
>  -  just get the value back for a passed-in setting.
> 
> 
> **Functions for clusterSettings:**
> **--**
>   - **get_cluster_setting_entries(setting_names)** : 
> -- Retrieves the passed-in cluster setting entr(y/ies) and their values 
> as a map.
>If 'setting_names' is passed-in as None : all the settings names and 
> their corresponding values will be returned as map.
>If 'setting_names' is passed-in as empty set : None will be returned.
> 
>   - **get_cluster_setting_value(setting_name)** :
> -- Retrieves the passed-in cluster setting entry's value.
> 
>   - **is_security_enabled()** : 
> -- Retrieves the cluster's security status.
> 
> 
> **Functions for stackSettings:** 
> ****
> 
> Stack settings as of now has 5 settings : stack_name, stack_root, 
> stack_features, stack_tools, stack_packages. stack_name, stack_root have 
> string as values, whereas stack_features, stack_tools, stack_packages have 
> values as JSON. Further there already exists python functions in files : 
> **stack_features.py**, **stack_tools.py** and **stack_select.py**.
> 
>- **get_stack_setting_entries(setting_names)** : 
>   --   Retrieves the passed-in stack setting entr(y/ies) and their values 
> as a map.
> If 'setting_names' is passed-in as None, all the settings names 
> and their corresponding values will be returned as map.
> If 'setting_names' is passed-in as empty set : None will be 
> returned.
> 
>- **get_stack_setting_value(setting_name)**:
> -- Retrieves the passed-in stack setting entry's value.
> 
> - **get_stack_name()**:
> -- Retrieves the stack name.
> 
> - **get_stack_root()**:
>-- Retrieves the stack root.
> 
>  
> 
> **Modifications in  _stack_features.py, stack_tools.py and stack_select.py_ 
> files:**
> **-**
> 
> - Given that these already exist and as of now they read the relevant stack 
> setting from *configurations/cluster_env*. 
> - Thus, code has been added to try reading from /stackSettings first by 
> calling the new fn.() get_stack_setting_value(). if setting not found, go for 
> the fall back  *configurations/cluster_env* (which would be removed soon, 
> when we remove cluster_env).
> 
> 
> Diffs
> -
> 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/cluster_settings.py
>  PRE-CREATION 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_features.py
>  92823b0 
>   
> ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py
>  b741a33 
>   
> ambari-common/src/main/python/res

Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-14 Thread Swapan Shridhar
tack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}


**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64594: AMBARI-22649. Library for querying clusterSettings and stackSettings for its contents in command*.json

2017-12-14 Thread Swapan Shridhar
**

- 1. Retrieve : **stack_name**

  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name'])
  o/p:  {'stack_name': 'HDP'}

- 2. Retrieve : **stack_root**
  -- In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_root'])
 **o/p**:   {'stack_root': '{"HDP":"/usr/hdp"}'}


- 3. Retrieve **three** stack settings:  **'stack_name', 'stack_root', 
'stack_tools'**
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}

- 4. Retrieve **four** stack settings : **'BAD_VALUE', 'stack_name', 
'stack_root', 'stack_tools'** ---> (**BAD_VALUE** should get ignored)
  --  In get_stack_setting_entries(). Passed-in setting(s) : set(['stack_name', 
'stack_root', 'stack_tools'])
  **o/p** :   {'stack_name': 'HDP', 'stack_root': '{"HDP":"/usr/hdp"}', 
'stack_tools': '{\n  "HDP": {\n"stack_selector": [\n  "hdp-select",\n   
   "/usr/bin/hdp-select",\n  "hdp-select"\n],\n"conf_selector": [\n 
 "conf-select",\n  "/usr/bin/conf-select",\n  "conf-select"\n
]\n  }\n}'}


**B.** Tests for existing and modified : **stack_select.get_packages()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "HDFS", "DATANODE")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['hadoop-hdfs-datanode'] 

- 2. Retrieve **specific component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "ZOOKEEPER_CLIENT")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 **o/p** : ['zookeeper-client']

- 3. Retrieve **non-existing component package** with call -> 
stack_select.get_packages(orchestration, "ZOOKEEPER", "NON_EXISTING")
  -- In get_stack_setting_value(). Passed-in setting : stack_packages
 Skipping stack-select on ABC because it does not exist in the stack-select 
package structure.
 **o/p** : None


**C**. Tests for existing and modified : 
**stack_features.check_stack_feature()** which internally now calls 
**stack_settings.get_stack_setting_value()**
**--**

- 1. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.6")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : True

- 2. Retrieve  **specific component stack feature** with call -> 
stack_features.check_stack_feature("hive_server_interactive", "2.2")
  -- In get_stack_setting_value(). Passed-in setting : stack_features
 **o/p** : False  

**D**. Test for existing and modified : **stack_tools.get_stack_tool()** which 
internally now calls **stack_settings.get_stack_setting_value()**
**---**

   - 1. Retrieve **stack relevant tools** with call -> 
stack_tools.get_stack_tool("stack_selector")   
-- In get_stack_setting_value(). Passed-in setting : stack_tools
   **o/p**: ('hdp-select', '/usr/bin/hdp-select', 'hdp-select')


Thanks,

Swapan Shridhar



Re: Review Request 64397: AMBARI-22602. Add 'clusterSettings' and 'stackSettings' parameters in Execution Command.

2017-12-11 Thread Swapan Shridhar
},\n
\"SPARK_THRIFTSERVER\": {\n  \"STACK-SELECT-PACKAGE\": 
\"spark2-thriftserver\",\n  \"INSTALL\": [\n
\"spark2-thriftserver\"\n  ],\n  \"PATCH\": [\n
\"spark2-thriftserver\"\n  ],\n  \"STANDARD\": [\n
\"spark2-thriftserver\"\n  ]\n}\n  },\n  \"SQOOP\": {\n 
   \"SQOOP\": {\n  \"STACK-SELECT-PACKAGE\": \&quo

Re: Review Request 64397: AMBARI-22602. Add 'clusterSettings' and 'stackSettings' parameters in Execution Command.

2017-12-11 Thread Swapan Shridhar


> On Dec. 11, 2017, 5:44 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
> > Lines 291 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910167#file1910167line291>
> >
> > settings or clusterSettings instead of params?

Fixed.


> On Dec. 11, 2017, 5:44 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
> > Lines 300 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910167#file1910167line300>
> >
> > settings or stackSettings instead of params?

Fixed.


- Swapan


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


On Dec. 7, 2017, 8:11 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64397/
> ---
> 
> (Updated Dec. 7, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22602
> https://issues.apache.org/jira/browse/AMBARI-22602
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22198 added "stack settings", and AMBARI-22196 introduced "cluster 
> settings" in Ambari.
> 
> This review adds 2 new parameters to Execution Command : **(1).** 
> clusterSettings and **(2).** stackSettings, and adds their respective set of 
> key-values pairs.
> 
> - This enables these parameters to be passed in to the ambari-agent's 
> **command*.json**.
> 
> 
> Test cases are tracked in : AMBARI-22603
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
>  5ee4bf6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  e7dea06 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  59e6622 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
>  9043297 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
>  8bd24f2 
> 
> 
> Diff: https://reviews.apache.org/r/64397/diff/1/
> 
> 
> Testing
> ---
> 
> Tested on Live cluster doing following : 
> (1). Start Service 
> (2). Restart Service 
> (3). Stop Service 
> (4). Refreshing client configs
> (5). Adding Client.
> 
> 
> **Snippet from command*.json as part of testing:**
> {
> ...
> ...
> "clusterSettings": {
> "security_enabled": "false",
> "hide_yarn_memory_widget": "false",
> "enable_external_ranger": "false",
> "override_uid": "true",
> "kerberos_domain": "EXAMPLE.COM",
> "one_dir_per_partition": "false",
> "repo_ubuntu_template": "{{package_type}} {{base_url}} 
> {{components}}",
> "ignore_groupsusers_create": "false",
> "alerts_repeat_tolerance": "1",
> "namenode_rolling_restart_timeout": "4200",
> "fetch_nonlocal_groups": "true",
> "manage_dirs_on_root": "true",
> "recovery_lifetime_max_count": "1024",
> "agent_mounts_ignore_list": "",
> "ignore_bad_mounts": "false",
> "recovery_window_in_minutes": "60",
> "sysprep_skip_copy_tarballs_hdfs": "false",
> "recovery_type": "AUTO_START",
> "user_group": "hadoop",
> "namenode_rolling_restart_safemode_exit_timeout": "3600",
> "recovery_retry_interval": "5",
> "sysprep_skip_copy_oozie_share_lib_to_hdfs": "false",
> "sysprep_skip_setup_jce": "false",
> "manage_hive_fsroot": "true",
> "service_check_type": "full",
> "recovery_enabled": "true",
> "recovery_max_count": "6",
>   

Re: Review Request 64397: AMBARI-22602. Add 'clusterSettings' and 'stackSettings' parameters in Execution Command.

2017-12-11 Thread Swapan Shridhar


> On Dec. 8, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
> > Lines 436 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910168#file1910168line436>
> >
> > * no need for explicit type arg in Maps.newHashMap()
> > * empty map should be created lazily in `else` below

Fixed.


> On Dec. 8, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
> > Lines 438 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910168#file1910168line438>
> >
> > According to IDEA there is no need to include the 
> > `clusterSettings.values() != null` check, as it is always true if 
> > `clusterSettings != null` is true.

Removed.


> On Dec. 8, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
> > Lines 449-451 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910168#file1910168line449>
> >
> > Please use `collect(toMap())` (as above) instead of `forEach` and `put`

Fixed.


> On Dec. 8, 2017, 8:01 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
> > Lines 2676-2695 (patched)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910169#file1910169line2676>
> >
> > Can you please extract the logic to 2 utility methods to avoid code 
> > duplication among `AmbariCustomCommandExecutionHelper`, 
> > `AmbariManagementControllerImpl` and `ClientConfigResourceProvider`?

Refactored.


- Swapan


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


On Dec. 7, 2017, 8:11 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64397/
> ---
> 
> (Updated Dec. 7, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22602
> https://issues.apache.org/jira/browse/AMBARI-22602
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22198 added "stack settings", and AMBARI-22196 introduced "cluster 
> settings" in Ambari.
> 
> This review adds 2 new parameters to Execution Command : **(1).** 
> clusterSettings and **(2).** stackSettings, and adds their respective set of 
> key-values pairs.
> 
> - This enables these parameters to be passed in to the ambari-agent's 
> **command*.json**.
> 
> 
> Test cases are tracked in : AMBARI-22603
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
>  5ee4bf6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  e7dea06 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  59e6622 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
>  9043297 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
>  8bd24f2 
> 
> 
> Diff: https://reviews.apache.org/r/64397/diff/1/
> 
> 
> Testing
> ---
> 
> Tested on Live cluster doing following : 
> (1). Start Service 
> (2). Restart Service 
> (3). Stop Service 
> (4). Refreshing client configs
> (5). Adding Client.
> 
> 
> **Snippet from command*.json as part of testing:**
> {
> ...
> ...
> "clusterSettings": {
> "security_enabled": "false",
> "hide_yarn_memory_widget": "false",
> "enable_external_ranger": "false",
> "override_uid": "true",
> "kerberos_domain": "EXAMPLE.COM",
> "one_dir_per_partition": "false",
> "repo_ubuntu_template": "{{package_type}} {{base_url}} 
> {{components}}",
> "ignore_groupsusers_create": "false",
> "alerts_repeat_tolerance": "1",
> "namenode_rolling_

Re: Review Request 64397: AMBARI-22602. Add 'clusterSettings' and 'stackSettings' parameters in Execution Command.

2017-12-11 Thread Swapan Shridhar


> On Dec. 8, 2017, 11:41 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
> > Line 57 (original)
> > <https://reviews.apache.org/r/64397/diff/1/?file=1910171#file1910171line57>
> >
> > Are we using this map anywhere?

Nope. Its part of the cleanup.


- Swapan


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


On Dec. 7, 2017, 8:11 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64397/
> ---
> 
> (Updated Dec. 7, 2017, 8:11 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22602
> https://issues.apache.org/jira/browse/AMBARI-22602
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22198 added "stack settings", and AMBARI-22196 introduced "cluster 
> settings" in Ambari.
> 
> This review adds 2 new parameters to Execution Command : **(1).** 
> clusterSettings and **(2).** stackSettings, and adds their respective set of 
> key-values pairs.
> 
> - This enables these parameters to be passed in to the ambari-agent's 
> **command*.json**.
> 
> 
> Test cases are tracked in : AMBARI-22603
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/ExecutionCommand.java
>  5ee4bf6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  e7dea06 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  59e6622 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
>  9043297 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
>  8bd24f2 
> 
> 
> Diff: https://reviews.apache.org/r/64397/diff/1/
> 
> 
> Testing
> ---
> 
> Tested on Live cluster doing following : 
> (1). Start Service 
> (2). Restart Service 
> (3). Stop Service 
> (4). Refreshing client configs
> (5). Adding Client.
> 
> 
> **Snippet from command*.json as part of testing:**
> {
> ...
> ...
> "clusterSettings": {
> "security_enabled": "false",
> "hide_yarn_memory_widget": "false",
> "enable_external_ranger": "false",
> "override_uid": "true",
> "kerberos_domain": "EXAMPLE.COM",
> "one_dir_per_partition": "false",
> "repo_ubuntu_template": "{{package_type}} {{base_url}} 
> {{components}}",
> "ignore_groupsusers_create": "false",
> "alerts_repeat_tolerance": "1",
> "namenode_rolling_restart_timeout": "4200",
> "fetch_nonlocal_groups": "true",
> "manage_dirs_on_root": "true",
> "recovery_lifetime_max_count": "1024",
> "agent_mounts_ignore_list": "",
> "ignore_bad_mounts": "false",
> "recovery_window_in_minutes": "60",
> "sysprep_skip_copy_tarballs_hdfs": "false",
> "recovery_type": "AUTO_START",
> "user_group": "hadoop",
> "namenode_rolling_restart_safemode_exit_timeout": "3600",
> "recovery_retry_interval": "5",
> "sysprep_skip_copy_oozie_share_lib_to_hdfs": "false",
> "sysprep_skip_setup_jce": "false",
> "manage_hive_fsroot": "true",
> "service_check_type": "full",
> "recovery_enabled": "true",
> "recovery_max_count": "6",
> "sysprep_skip_create_users_and_groups": "false",
> "smokeuser_keytab": "/etc/security/keytabs/smokeuser.headless.keytab",
> "managed_hdfs_resource_property_names": "false",
> "smokeuser": "ambari-qa",
&

Re: Review Request 64368: Livy2 keytabs are not getting configured automatically in zeppelin

2017-12-07 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Dec. 6, 2017, 9:21 a.m., Prabhjyot Singh wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64368/
> ---
> 
> (Updated Dec. 6, 2017, 9:21 a.m.)
> 
> 
> Review request for Ambari, DIPAYAN BHOWMICK, Jaimin Jetly, Jayush Luniya, 
> Rohit Choudhary, Sumit Mohanty, and venkat sairam.
> 
> 
> Bugs: AMBARI-22595
> https://issues.apache.org/jira/browse/AMBARI-22595
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> 'zeppelin.livy.keytab' and 'zeppelin.livy.principal' are not configured for 
> zeppelin after installation on secured cluster.
> Because of this zeppelin notebook with livy interpreter is failing with 
> un-authenticated 401 error.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/ZEPPELIN/0.7.0/package/scripts/master.py
>  5efc277caf 
> 
> 
> Diff: https://reviews.apache.org/r/64368/diff/1/
> 
> 
> Testing
> ---
> 
> Manually
> 
> 
> Thanks,
> 
> Prabhjyot Singh
> 
>



Review Request 64397: AMBARI-22602. Add 'clusterSettings' and 'stackSettings' parameters in Execution Command.

2017-12-07 Thread Swapan Shridhar
ot;SQOOP\": {\n 
   \"SQOOP\": {\n  \"STACK-SELECT-PACKAGE\": \&quo

Re: Review Request 63965: New endpoint service_config_version for creating new config versions via service endpoint instead of cluster update

2017-12-04 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Nov. 22, 2017, 5:47 p.m., Madhuvanthi Radhakrishnan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63965/
> ---
> 
> (Updated Nov. 22, 2017, 5:47 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Swapan Shridhar, and Vitalyi 
> Brodetskyi.
> 
> 
> Bugs: AMBARI-22487
> https://issues.apache.org/jira/browse/AMBARI-22487
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Create new service config version
> POST
> api/v2/clusters//servicegroups//services//configurations/service_config_versions
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ConfigurationService.java
>  79128a2374 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceConfigVersionService.java
>  c6e320121f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  b5bc813e9c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  875d9b6f9f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceConfigVersionRequest.java
>  29a7a421cd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceConfigVersionResourceProvider.java
>  cbc08ebdf4 
> 
> 
> Diff: https://reviews.apache.org/r/63965/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean install -DskipTests=true -Dmaven.test.skip=true -X
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Main  SUCCESS [ 20.681 
> s]
> [INFO] Apache Ambari Project POM .. SUCCESS [  0.047 
> s]
> [INFO] Ambari Web . SUCCESS [ 59.888 
> s]
> [INFO] Ambari Views ... SUCCESS [  1.454 
> s]
> [INFO] Ambari Admin View .. SUCCESS [  9.794 
> s]
> [INFO] ambari-utility . SUCCESS [  4.461 
> s]
> [INFO] ambari-metrics . SUCCESS [  1.585 
> s]
> [INFO] Ambari Metrics Common .. SUCCESS [  5.107 
> s]
> [INFO] Ambari Metrics Hadoop Sink . SUCCESS [  3.697 
> s]
> [INFO] Ambari Metrics Flume Sink .. SUCCESS [  3.057 
> s]
> [INFO] Ambari Metrics Kafka Sink .. SUCCESS [  3.088 
> s]
> [INFO] Ambari Metrics Storm Sink .. SUCCESS [  2.462 
> s]
> [INFO] Ambari Metrics Storm Sink (Legacy) . SUCCESS [  2.196 
> s]
> [INFO] Ambari Metrics Collector ... SUCCESS [ 20.644 
> s]
> [INFO] Ambari Metrics Monitor . SUCCESS [  2.597 
> s]
> [INFO] Ambari Metrics Grafana . SUCCESS [  5.799 
> s]
> [INFO] Ambari Metrics Host Aggregator . SUCCESS [  5.548 
> s]
> [INFO] Ambari Metrics Assembly  SUCCESS [01:48 
> min]
> [INFO] Ambari Service Advisor . SUCCESS [  0.614 
> s]
> [INFO] Ambari Server .. SUCCESS [03:49 
> min]
> [INFO] Ambari Functional Tests  SUCCESS [  0.494 
> s]
> [INFO] Ambari Agent ... SUCCESS [ 50.352 
> s]
> [INFO] Ambari Client .. SUCCESS [  0.100 
> s]
> [INFO] Ambari Python Client ... SUCCESS [  0.896 
> s]
> [INFO] Ambari Groovy Client ... SUCCESS [  1.600 
> s]
> [INFO] Ambari Shell ... SUCCESS [  0.101 
> s]
> [INFO] Ambari Python Shell  SUCCESS [  0.699 
> s]
> [INFO] Ambari Groovy Shell  SUCCESS [  0.756 
> s]
> [INFO] ambari-logsearch ... SUCCESS [  3.196 
> s]
> [INFO] Ambari Logsearch Appender .. SUCCESS [  0.303 
> s]
> [INFO] Ambari Logsearch Config Api  SUCCESS [  0.242 
> s]
> [INFO] Ambari Logsearch Config Zookeeper .. SUCCESS [  0.352 
&

Re: Review Request 64005: Fix build for test classes in feature branch

2017-11-22 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Nov. 22, 2017, 3:01 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/64005/
> ---
> 
> (Updated Nov. 22, 2017, 3:01 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Madhuvanthi Radhakrishnan, and 
> Swapan Shridhar.
> 
> 
> Bugs: AMBARI-22493
> https://issues.apache.org/jira/browse/AMBARI-22493
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Fixed build process with test classes. Test classes were fixed with 
> workarounds.
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml e15e23e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapperTest.java
>  fb84df5 
>   
> ambari-server/src/test/java/org/apache/ambari/server/actionmanager/TestActionSchedulerThreading.java
>  96269f8 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/HeartbeatProcessorTest.java
>  b3c4e26 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatHandler.java
>  20ff949 
>   
> ambari-server/src/test/java/org/apache/ambari/server/agent/TestHeartbeatMonitor.java
>  374774a 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRendererTest.java
>  b47a25d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/ComponentServiceTest.java
>  e4285d0 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/ConfigurationServiceTest.java
>  679e645 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/ServiceServiceTest.java
>  a5bb5e7 
>   
> ambari-server/src/test/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorBlueprintProcessorTest.java
>  bc82999 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ComponentsInstallationCheckTest.java
>  0e57966 
>   
> ambari-server/src/test/java/org/apache/ambari/server/checks/ServicesUpCheckTest.java
>  4d00644 
>   
> ambari-server/src/test/java/org/apache/ambari/server/configuration/RecoveryConfigHelperTest.java
>  7b8bd8b 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelperTest.java
>  883e891 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerImplTest.java
>  a5f83af 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
>  44b46f4 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
>  3d8d161 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
>  c9e91e3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/RefreshYarnCapacitySchedulerReleaseConfigTest.java
>  ef186f1 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
>  7165e48 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintConfigurationProcessorTest.java
>  22b0e6b 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
>  833be5d 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
>  4a80893 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
>  110e359 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
>  78f79ea 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
>  e1f5583 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
>  7e32c15 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
>  fd28081 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
>  e19ad29 
>   
> ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
>  5ed582f 
>   
> ambari-server/src/test/j

Review Request 64024: AMBARI-22498. Remove trailing lines (if any) from llapstatus command before converting the o/p to JSON.

2017-11-22 Thread Swapan Shridhar

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

Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.


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


Repository: ambari


Description
---

**BACKGROUND:**

- Existing code was removing extra lines from the beginning which may come 
because of MOTD.
- Similar issue can happen if there are extra lines as the end, which if passed 
in for converting to JSON will fail.


Example: of extra lines at beginning and end sandwiching the JSOn structure 
which needs to be parsed

===
 Hortonworks #
This is MOTD message, added for testing in qe infra
{
  "amInfo" : {
"appName" : "llap",
"appType" : "org-apache-slider",
"appId" : "application_1455662455106_10882",
"containerId" : "container_e14_1455662455106_10882_01_01",
"hostname" : "HOST_REPLACED",
"amWebUrl" : "http://HOST_REPLACED:1025/";
  },
  "state" : "RUNNING_ALL",
  "originalConfigurationPath" : 
"hdfs://HOST_REPLACED:8020/user/USER_REPLACED/.slider/cluster/llap/snapshot",
  "generatedConfigurationPath" : 
"hdfs://HOST_REPLACED:8020/user/USER_REPLACED/.slider/cluster/llap/generated",
  "desiredInstances" : 3,
  "liveInstances" : 3,
  "appStartTime" : 1459625802169,
  "llapInstances" : [ {
"hostname" : "HOST_REPLACED",
"containerId" : "container_e14_1455662455106_10882_01_03",
"statusUrl" : "http://HOST_REPLACED:15002/status";,
"webUrl" : "http://HOST_REPLACED:15002";,
"rpcPort" : 15001,
"mgmtPort" : 15004,
"shufflePort" : 15551
  }, {
"hostname" : "HOST_REPLACED",
"containerId" : "container_e14_1455662455106_10882_01_02",
"statusUrl" : "http://HOST_REPLACED:15002/status";,
"webUrl" : "http://HOST_REPLACED:15002";,
"rpcPort" : 15001,
"mgmtPort" : 15004,
"shufflePort" : 15551
  }, {
"hostname" : "HOST_REPLACED",
"containerId" : "container_e14_1455662455106_10882_01_04",
"statusUrl" : "http://HOST_REPLACED:15002/status";,
"webUrl" : "http://HOST_REPLACED:15002";,
"rpcPort" : 15001,
"mgmtPort" : 15004,
"shufflePort" : 15551
  } ]
}

# THIS IS A DUMMY TRAILING MESSAGE 1
# THIS IS A DUMMY TRAILING MESSAGE 2

===


**Fix:**
Added code to remove the trailing lines as well.


Diffs
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 57cbcd0 
  
ambari-server/src/test/python/stacks/2.5/HIVE/running_withMOTDmsg_andTrailingMsg.txt
 PRE-CREATION 
  ambari-server/src/test/python/stacks/2.5/HIVE/test_hive_server_int.py cf79ec7 


Diff: https://reviews.apache.org/r/64024/diff/1/


Testing
---

- UT added having begginning and end extra lines. Passes.
- Tested on live cluster with no begginning and trailing message.


Thanks,

Swapan Shridhar



Re: Review Request 63937: AMBARI-22472. Ambari Upgrade 2.5 -> 2.6 : Update NodeManager's HSI identity 'llap_zk_hive' and 'llap_task_hive' to use '/HIVE/HIVE_SERVER/hive_server_hive' reference instead

2017-11-21 Thread Swapan Shridhar
iptor value = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(720)) - 
Updated 'llap_zk_hive' keytab descriptor file = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(723)) - 
Updated 'llap_zk_hive' keytab descriptor owner name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(725)) - 
Updated 'llap_zk_hive' keytab descriptor owner access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(727)) - 
Updated 'llap_zk_hive' keytab descriptor group name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(729)) - 
Updated 'llap_zk_hive' keytab descriptor group access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(733)) - 
[hive.llap.zk.sm.keytab.file, hive.llap.task.keytab.file]


**UpgradeCatalog260Test::testUpdateHiveConfigs()**

 (AbstractUpgradeCatalog.java:updateConfigurationPropertiesForCluster(573)) - 
Applying configuration with tag 'version1511212185535' and configType 
'hive-interactive-site' to cluster 'null'
2017-11-20 13:09:45,536 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:updateHiveConfigs(778)) - Updated HSI config(s) : 
[hive.llap.task.keytab.file, hive.llap.zk.sm.keytab.file] with values = 
[/etc/security/keytabs/hive.service.keytab, 
/etc/security/keytabs/hive.service.keytab]


Thanks,

Swapan Shridhar



Re: Review Request 63937: AMBARI-22472. Ambari Upgrade 2.5 -> 2.6 : Update NodeManager's HSI identity 'llap_zk_hive' and 'llap_task_hive' to use '/HIVE/HIVE_SERVER/hive_server_hive' reference instead

2017-11-20 Thread Swapan Shridhar
eCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(720)) - 
Updated 'llap_zk_hive' keytab descriptor file = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(723)) - 
Updated 'llap_zk_hive' keytab descriptor owner name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(725)) - 
Updated 'llap_zk_hive' keytab descriptor owner access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(727)) - 
Updated 'llap_zk_hive' keytab descriptor group name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(729)) - 
Updated 'llap_zk_hive' keytab descriptor group access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(733)) - 
[hive.llap.zk.sm.keytab.file, hive.llap.task.keytab.file]


**UpgradeCatalog260Test::testUpdateHiveConfigs()**

 (AbstractUpgradeCatalog.java:updateConfigurationPropertiesForCluster(573)) - 
Applying configuration with tag 'version1511212185535' and configType 
'hive-interactive-site' to cluster 'null'
2017-11-20 13:09:45,536 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:updateHiveConfigs(778)) - Updated HSI config(s) : 
[hive.llap.task.keytab.file, hive.llap.zk.sm.keytab.file] with values = 
[/etc/security/keytabs/hive.service.keytab, 
/etc/security/keytabs/hive.service.keytab]


Thanks,

Swapan Shridhar



Re: Review Request 63937: AMBARI-22472. Ambari Upgrade 2.5 -> 2.6 : Update NodeManager's HSI identity 'llap_zk_hive' and 'llap_task_hive' to use '/HIVE/HIVE_SERVER/hive_server_hive' reference instead

2017-11-20 Thread Swapan Shridhar


> On Nov. 18, 2017, 12:11 p.m., Robert Levas wrote:
> > Shouldn't there be at least one updated kerberos.json file?

Missed on adding them.
- Added files HDP/2.5/services/YARN/kerberos.json and 
HDP/2.6/services/YARN/kerberos.json for "llap_zk_hive" and "llap_task_hive" 
changes.


> On Nov. 18, 2017, 12:11 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
> > Lines 711 (patched)
> > <https://reviews.apache.org/r/63937/diff/1/?file=1897371#file1897371line711>
> >
> > I suspect that this should be set to `null` rather than an empty 
> > string.  But if it works, I am ok with it.

This worked for me, but nonetheless null makes more sense. Updated the code 
with using null.


> On Nov. 18, 2017, 12:11 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
> > Lines 716 (patched)
> > <https://reviews.apache.org/r/63937/diff/1/?file=1897371#file1897371line716>
> >
> > I suspect that this should be set to `null` rather than an empty 
> > string.  But if it works, I am ok with it.

This worked for me, but nonetheless null makes more sense. Updated the code 
with using null.


- Swapan


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


On Nov. 21, 2017, 7:25 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63937/
> ---
> 
> (Updated Nov. 21, 2017, 7:25 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Madhuvanthi Radhakrishnan, and 
> Robert Levas.
> 
> 
> Bugs: AMBARI-22472
> https://issues.apache.org/jira/browse/AMBARI-22472
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **Background:**
> YARN NodeManager currently has:
> 
> - 2 identities in 2.5 stack, namely : 
> **'/HIVE/HIVE_SERVER/hive_server_hive'**  and **'llap_zk_hive'**.
> -- **/HIVE/HIVE_SERVER/hive_server_hive** is a reference from HIVE_SERVER, 
> whereas
> -- **llap_zk_hive** creates same principal as above in a separate keytab file.
> 
> - and 3 identities in 2.6 stack:
> *'/HIVE/HIVE_SERVER/hive_server_hive'*  and *'llap_zk_hive'*.
> -- **/HIVE/HIVE_SERVER/hive_server_hive** is a reference from HIVE_SERVER, 
> whereas
> -- **llap_zk_hive** and **llap_task_hive** creates same principal as above in 
> a separate keytab file.
> 
> **Issue:** Recreating same identities in different files creates issues while 
> AMbari upgrade from 2.5 to 2.6, as the *llap_zk_hive* are not 
> refreshed/updated after the upgrade. Thus, HSI fails to come up.
> 
> **Fix:** 
> 
> **For HDP 2.5:** Make **llap_zk_hive** point as a reference pointing to 
> /HIVE/HIVE_SERVER/hive_server_hive, so that we have one identity getting 
> created only at one place and one keytab file.
> 
> **For HDP 2.6:** Make **llap_zk_hive** and **llap_task_hive** point as a 
> reference pointing to /HIVE/HIVE_SERVER/hive_server_hive, so that we have one 
> identity getting created only at one place and one keytab file.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
>  96ce807 
>   ambari-server/src/main/resources/stacks/HDP/2.5/services/YARN/kerberos.json 
> af6bda6 
>   ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/kerberos.json 
> e0417bf 
>   
> ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
>  be04cd5 
>   
> ambari-server/src/test/resources/kerberos/test_kerberos_descriptor_ranger_kms.json
>  e17e121 
> 
> 
> Diff: https://reviews.apache.org/r/63937/diff/2/
> 
> 
> Testing
> ---
> 
> **TESTING:**
> 
> ||   Ambari 2.5, HDP 2.5 before upgrade:
> ||
> 
> 
> {code:title=From /etc/hive2/cong/conf.server/hive-site.xml}
>   
>   hive.llap.daemon.keytab.file
>   /etc/security/keytabs/hive.service.keytab
> 
> 
> 
>   hive.llap.daemon.service.principal
>   hive/_h...@example.com
> 
> 
> 
>   hive.llap.zk.sm.keytab.file
>   /etc/security/keytabs/hive.llap.zk.sm.keytab
> 
> 
> 
>   hive.llap.zk.sm.principal
>   hive/_h...@example.com
> 
> {code} 
> 
> 
> 

Re: Review Request 63937: AMBARI-22472. Ambari Upgrade 2.5 -> 2.6 : Update NodeManager's HSI identity 'llap_zk_hive' and 'llap_task_hive' to use '/HIVE/HIVE_SERVER/hive_server_hive' reference instead

2017-11-20 Thread Swapan Shridhar
pgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(707)) -   
Retrieved YARN->NODEMANAGER kerberos descriptor to be updated. Name = 
llap_task_hive
2017-11-20 13:09:45,369 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(712)) - 
Updated 'llap_zk_hive' identity descriptor reference = 
'/HIVE/HIVE_SERVER/hive_server_hive'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(715)) - 
Updated 'llap_zk_hive' principal descriptor value = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(720)) - 
Updated 'llap_zk_hive' keytab descriptor file = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(723)) - 
Updated 'llap_zk_hive' keytab descriptor owner name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(725)) - 
Updated 'llap_zk_hive' keytab descriptor owner access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(727)) - 
Updated 'llap_zk_hive' keytab descriptor group name = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(729)) - 
Updated 'llap_zk_hive' keytab descriptor group access = 'null'
2017-11-20 13:09:45,370 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:fixYarnHsiKerberosDescriptorAndSiteConfig(733)) - 
Updated 'yarnKerberosDescUpdatedList' = [llap_zk_hive, llap_task_hive]


**UpgradeCatalog260Test::testUpdateHiveConfigs()**

 (AbstractUpgradeCatalog.java:updateConfigurationPropertiesForCluster(573)) - 
Applying configuration with tag 'version1511212185535' and configType 
'hive-interactive-site' to cluster 'null'
2017-11-20 13:09:45,536 INFO  [main] upgrade.UpgradeCatalog260 
(UpgradeCatalog260.java:updateHiveConfigs(778)) - Updated HSI config(s) : 
[hive.llap.task.keytab.file, hive.llap.zk.sm.keytab.file] with values = 
[/etc/security/keytabs/hive.service.keytab, 
/etc/security/keytabs/hive.service.keytab]


Thanks,

Swapan Shridhar



Review Request 63937: AMBARI-22472. Ambari Upgrade 2.5 -> 2.6 : Update NodeManager's HSI identity 'llap_zk_hive' to use '/HIVE/HIVE_SERVER/hive_server_hive' reference instead of creating the same iden

2017-11-17 Thread Swapan Shridhar

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

Review request for Ambari, Jayush Luniya, Madhuvanthi Radhakrishnan, and Robert 
Levas.


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


Repository: ambari


Description
---

**Background:**
YARN NodeManager currently have 2 identities in 2.5 and 2.6 stack, namely : 
*'/HIVE/HIVE_SERVER/hive_server_hive'*  and *'llap_zk_hive'*.
- */HIVE/HIVE_SERVER/hive_server_hive* is a reference from HIVE_SERVER, whereas
- *llap_zk_hive* creates same principal as above in a separate keytab file.

**Issue:** Recreating same identities in different files creates issues while 
AMbari upgrade from 2.5 to 2.6, as the *llap_zk_hive* are not refreshed/updated 
after the upgrade. Thus, HSI fails to come up.

**Fix:** Make * llap_zk_hive* also point as a reference pointing to 
/HIVE/HIVE_SERVER/hive_server_hive, so that we have one identity getting 
created only at one place and one keytab file.


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
 96ce807 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog260Test.java
 be04cd5 
  
ambari-server/src/test/resources/kerberos/test_kerberos_descriptor_ranger_kms.json
 e17e121 


Diff: https://reviews.apache.org/r/63937/diff/1/


Testing
---

**TESTING:**

|| Ambari 2.5, before upgrade: 
||


{code:title=From /etc/hive2/cong/conf.server/hive-site.xml}
  
  hive.llap.daemon.keytab.file
  /etc/security/keytabs/hive.service.keytab



  hive.llap.daemon.service.principal
  hive/_h...@example.com



  hive.llap.zk.sm.keytab.file
  /etc/security/keytabs/hive.llap.zk.sm.keytab



  hive.llap.zk.sm.principal
  hive/_h...@example.com

{code} 


||Upgrade to Ambari-2.6
||


**Logs: Ambari Server Upgrade**

[root@swap-qqq-1 ~]# ambari-server upgrade
Using python  /usr/bin/python
Upgrading ambari-server
INFO: Upgrade Ambari Server
INFO: Updating Ambari Server properties in ambari.properties ...
INFO: Updating Ambari Server properties in ambari-env.sh ...
WARNING: Original file ambari-env.sh kept
INFO: Fixing database objects owner
Ambari Server configured for Embedded Postgres. Confirm you have made a backup 
of the Ambari Server database [y/n] (y)? y
INFO: Upgrading database schema
INFO: Return code from schema upgrade command, retcode = 0
INFO: Schema upgrade completed
Adjusting ambari-server permissions and ownership...
Ambari Server 'upgrade' completed successfully.
[root@swap-qqq-1 ~]#
[root@swap-qqq-1 ~]#
[root@swap-qqq-1 ~]#
[root@swap-qqq-1 ~]#
[root@swap-qqq-1 ~]# ambari-server --version
2.6.0.0-267
[root@swap-qqq-1 ~]#


**Logs : Updating Kerberos descriptors**

18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:673 - Updating YARN's 
HSI Kerberos Descriptor 
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:685 -   Retrieved 
HIVE->HIVE_SERVER kerberos descriptor. Name = hive_server_hive
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:700 -   Retrieved 
YARN->NODEMANAGER kerberos descriptor to be updated. Name = llap_zk_hive
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:709 -   Updated 
'llap_zk_hive' identity descriptor reference = 
'/HIVE/HIVE_SERVER/hive_server_hive'
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:712 -   Updated 
'llap_zk_hive' principal descriptor value = ''
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:717 -   Updated 
'llap_zk_hive' keytab descriptor file = ''
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:720 -   Updated 
'llap_zk_hive' keytab descriptor owner name = ''
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:722 -   Updated 
'llap_zk_hive' keytab descriptor owner access = ''
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:724 -   Updated 
'llap_zk_hive' keytab descriptor group name = ''
18 Nov 2017 07:25:54,003  INFO [main] UpgradeCatalog260:726 -   Updated 
'llap_zk_hive' keytab descriptor group access = ''
18 Nov 2017 07:25:54,004  INFO [main] UpgradeCatalog260:730 -   Updated 
'isYarnKerberosDescUpdated' = true


**Logs : Updated HSI config 'hive.llap.zk.sm.keytab.file'**

18 Nov 2017 07:25:54,073  INFO [main] UpgradeCatalog260:767 -   Updated HSI 
config 'hive.llap.zk.sm.keytab.file' = /etc/security/keytabs/hive.service.keytab


**From UI**:

Changed hive.llap.zk.sm.keytab.file : 
https://issues.apache.org/jira/secure/attachment/12898329/Screen%20Shot%202017-11-17%20at%2011.44.41%20PM.png

HSI up :
https://issues.apache.org/jira/secure/attachment/12898328/Screen%20Shot%202017-11-17%20at%2011.44.55%20PM.png


Thanks,

Swapan Shridhar



Re: Review Request 63138: Update Spark2 log4j default settings to latest

2017-11-15 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Oct. 19, 2017, 5:59 a.m., Saisai Shao wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63138/
> ---
> 
> (Updated Oct. 19, 2017, 5:59 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-22260
> https://issues.apache.org/jira/browse/AMBARI-22260
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Update Ambari Spark2 log4j related configurations.
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
> d138d6017c 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  8012c90b0b 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 7c43948ba3 
>   
> ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK2/configuration/spark2-log4j-properties.xml
>  PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/63138/diff/1/
> 
> 
> Testing
> ---
> 
> Manually verification on refresh install of HDP 2.6 and upgrade from HDP 2.5.
> 
> 
> Thanks,
> 
> Saisai Shao
> 
>



Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-09 Thread Swapan Shridhar
  "cluster_setting_value" : "true"
  }
}
  ]
}
{code}


**Multiple Setting PUT**:

PUT http://{{host1}}:8080/api/v1/clusters/c1/settings/

{code:title=REQUEST} 
[
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value": "true"
  }
},
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "smokeuser",
"cluster_setting_value": "smoke_user2"
  }
}
]
{code}

{code:title=RESPONSE}
{
  "resources" : [
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/smokeuser";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 55,
"cluster_setting_name" : "smokeuser",
"cluster_setting_value" : "smoke_user2"
  }
},
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/ignore_groupsusers_create";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 56,
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


***==**
**DELETE**
**==**

DELETE http://{{host1}}:8080/api/v1/clusters/c1/settings/security_enabled

{code:title=REQUEST} 
[]
{code}

{code:title=RESPONSE}
{
  "deleteResult" : [
{
  "deleted" : {
"key" : "cluster_name: c1, cluster_setting_name: security_enabled"
  }
}
  ]
}
{code}


Thanks,

Swapan Shridhar



Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-08 Thread Swapan Shridhar
lue" : "true"
  }
}
  ]
}
{code}


**Multiple Setting PUT**:

PUT http://{{host1}}:8080/api/v1/clusters/c1/settings/

{code:title=REQUEST} 
[
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value": "true"
  }
},
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "smokeuser",
"cluster_setting_value": "smoke_user2"
  }
}
]
{code}

{code:title=RESPONSE}
{
  "resources" : [
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/smokeuser";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 55,
"cluster_setting_name" : "smokeuser",
"cluster_setting_value" : "smoke_user2"
  }
},
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/ignore_groupsusers_create";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 56,
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


***==**
**DELETE**
**==**

DELETE http://{{host1}}:8080/api/v1/clusters/c1/settings/security_enabled

{code:title=REQUEST} 
[]
{code}

{code:title=RESPONSE}
{
  "deleteResult" : [
{
  "deleted" : {
"key" : "cluster_name: c1, cluster_setting_name: security_enabled"
  }
}
  ]
}
{code}


Thanks,

Swapan Shridhar



Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-08 Thread Swapan Shridhar


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 274-282 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884276#file1884276line274>
> >
> > This method always returns an empty `Set`, so it never rejects any 
> > property.

@Override fn removed, as we are not doing anything special/different here.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 471-473 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884276#file1884276line471>
> >
> > Can be simplified using `computeIfAbsent`

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 538-540 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884276#file1884276line538>
> >
> > Can be simplified using `computeIfAbsent`

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterSettingEntityPK.java
> > Lines 27 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884284#file1884284line27>
> >
> > Why is this PK class needed when it contains a single numeric ID, no 
> > composite key?

Removed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterSettingEntityPK.java
> > Lines 55 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884284#file1884284line55>
> >
> > Use `Objects.hashCode(...)`

ClusterSettingEntityPK.java has been removed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/ClusterSettingImpl.java
> > Lines 158 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884289#file1884289line158>
> >
> > "uses Java locks" -- where?

Comment removed. Fn calls 'persistEntities' which is @Transactional.


- Swapan


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


On Nov. 7, 2017, 11:59 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63573/
> ---
> 
> (Updated Nov. 7, 2017, 11:59 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22366
> https://issues.apache.org/jira/browse/AMBARI-22366
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22366. POST, GET and UPDATE API for cluster settings. 
> (/clusters/{clusterName}/settings).
> 
> **Background:** AMBARI-22196 did the following : 
>  (1). Refactoring work of moving all cluster related configs/settings in 
> cluster-env to "cluster-settings" files.
>  (2). Implementing READ only API to access *cluster-settings* file 
> *setting(s)* : *http://:/api/v1/cluster_settings/ *
> 
> - This was done to separate cluster related configs from stack related 
> configs.
> 
> **This JIRA implements the following :**
> 
> - POST, GET, UPDATE and DELETE APIs for cluster settings with endpoint : 
>   *http://:/api/v1/clusters/[[clusterName]]/settings*, where 
>-- the cluster settings would be initially read from the above mentioned 
> read-only API : *http://:/api/v1/cluster_settings/*. 
> 
> - Further, added cluster *settings* as a sub-resource of *cluster* resource.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ClusterSettingNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
>  e5680dd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  6096fa5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
>  92f50f4 
>   
> ambari-server/src/main/java/o

Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-08 Thread Swapan Shridhar


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterSettingResponse.java
> > Lines 126-141 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884271#file1884271line126>
> >
> > Can be simplified using `Objects.equals(...)`?
> > 
> > ```
> > return Objects.equals(clusterId, that.clusterId) &&
> >   Objects.equals(clusterSettingId, that.clusterSettingId) &&
> >   ...
> > ```

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 461-464 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884276#file1884276line461>
> >
> > Use `{}` placeholders to avoid unnecessary string concatenation and the 
> > need for `isDebugEnabled` check.

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 528-531 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884276#file1884276line528>
> >
> > Use `{}` placeholders to avoid unnecessary string concatenation and the 
> > need for `isDebugEnabled` check.

Done.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterSettingEntity.java
> > Lines 111-115 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884283#file1884283line111>
> >
> > Can be simplified using `Objects.equals`?

Updated.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterSettingEntity.java
> > Lines 120-122 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884283#file1884283line120>
> >
> > Can be simplified using `Objects.hash(...)`

Done.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/ClusterSettingImpl.java
> > Lines 150-152 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884289#file1884289line150>
> >
> > String concatenation in argument to `append()` -- should be several 
> > calls instead.

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
> > Lines 985-989 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884291#file1884291line985>
> >
> > Use `{}` placeholders instead of string concatenation, then 
> > `isDebugEnabled` check is not needed

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
> > Lines 1009-1012 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884291#file1884291line1009>
> >
> > Use `{}` placeholders instead of string concatenation, then 
> > `isDebugEnabled` check is not needed

Done.


- Swapan


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


On Nov. 7, 2017, 11:59 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63573/
> ---
> 
> (Updated Nov. 7, 2017, 11:59 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22366
> https://issues.apache.org/jira/browse/AMBARI-22366
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22366. POST, GET and UPDATE API for cluster settings. 
> (/clusters/{clusterName}/settings).
> 
> **Background:** AMBARI-22196 did the following : 
>  (1). Refactoring work of moving all cluster related configs/settings in 
> cluster-env to "cluster-settings" files.
>  (2). Implementing READ only API to access *cluster-settings* file 
> *setting(s)* : *http://:/api/v1/cluster_settings/ *
> 
> - This was done to separate cluster related configs from stack related 
> configs.
> 
> **This JIRA implements the following :**
> 
> - POST, GET, UPDATE and DELETE APIs for cluster sett

Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-08 Thread Swapan Shridhar
r in `new HashSet<...>`

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java
> > Lines 101-102 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884286#file1884286line101>
> >
> > Please avoid adding useless javadoc (ie. without description) -- same 
> > below

Removed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/ClusterSettingImpl.java
> > Lines 156 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884289#file1884289line156>
> >
> > No `super` method to inherit doc from.

Removed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
> > Lines 1126 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884291#file1884291line1126>
> >
> > Explicit type parameter is unnecessary for `new HashMap<...>`

Fixed.


> On Nov. 8, 2017, 2:02 p.m., Attila Doroszlai wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
> > Lines 1653 (patched)
> > <https://reviews.apache.org/r/63573/diff/2/?file=1884291#file1884291line1653>
> >
> > Seems to be left-over reference

Removed.


- Swapan


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


On Nov. 7, 2017, 11:59 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63573/
> ---
> 
> (Updated Nov. 7, 2017, 11:59 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22366
> https://issues.apache.org/jira/browse/AMBARI-22366
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22366. POST, GET and UPDATE API for cluster settings. 
> (/clusters/{clusterName}/settings).
> 
> **Background:** AMBARI-22196 did the following : 
>  (1). Refactoring work of moving all cluster related configs/settings in 
> cluster-env to "cluster-settings" files.
>  (2). Implementing READ only API to access *cluster-settings* file 
> *setting(s)* : *http://:/api/v1/cluster_settings/ *
> 
> - This was done to separate cluster related configs from stack related 
> configs.
> 
> **This JIRA implements the following :**
> 
> - POST, GET, UPDATE and DELETE APIs for cluster settings with endpoint : 
>   *http://:/api/v1/clusters/[[clusterName]]/settings*, where 
>-- the cluster settings would be initially read from the above mentioned 
> read-only API : *http://:/api/v1/cluster_settings/*. 
> 
> - Further, added cluster *settings* as a sub-resource of *cluster* resource.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ClusterSettingNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
>  e5680dd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  6096fa5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
>  92f50f4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  358b1bf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  370f735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterSettingRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterSettingResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  3db55d4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
>  20f4864 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
>  147650c 
>   
> ambari-server

Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-07 Thread Swapan Shridhar
 "cluster_name" : "c1",
"cluster_setting_id" : 54,
"cluster_setting_name" : "security_enabled",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


**Multiple Setting PUT**:

PUT http://{{host1}}:8080/api/v1/clusters/c1/settings/

{code:title=REQUEST} 
[
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value": "true"
  }
},
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "smokeuser",
"cluster_setting_value": "smoke_user2"
  }
}
]
{code}

{code:title=RESPONSE}
{
  "resources" : [
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/smokeuser";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 55,
"cluster_setting_name" : "smokeuser",
"cluster_setting_value" : "smoke_user2"
  }
},
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/ignore_groupsusers_create";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 56,
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


***==**
**DELETE**
**==**

DELETE http://{{host1}}:8080/api/v1/clusters/c1/settings/security_enabled

{code:title=REQUEST} 
[]
{code}

{code:title=RESPONSE}
{
  "deleteResult" : [
{
  "deleted" : {
"key" : "cluster_name: c1, cluster_setting_name: security_enabled"
  }
}
  ]
}
{code}


Thanks,

Swapan Shridhar



Re: Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-07 Thread Swapan Shridhar


> On Nov. 6, 2017, 8:06 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java
> > Lines 138 (patched)
> > <https://reviews.apache.org/r/63573/diff/1/?file=1881321#file1881321line138>
> >
> > Hi,
> > Do we need to create events for Cluster Setting creation?

Fixed. Removed.


> On Nov. 6, 2017, 8:06 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
> > Lines 179 (patched)
> > <https://reviews.apache.org/r/63573/diff/1/?file=1881338#file1881338line179>
> >
> > Hi,
> > I guess we can have just id to be the primary key. Another uniquness 
> > will be cluster_id + setting_name in case of multi-cluster scenario.
> > Thanks.

Fixed.


- Swapan


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


On Nov. 7, 2017, 11:59 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63573/
> ---
> 
> (Updated Nov. 7, 2017, 11:59 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22366
> https://issues.apache.org/jira/browse/AMBARI-22366
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-22366. POST, GET and UPDATE API for cluster settings. 
> (/clusters/{clusterName}/settings).
> 
> **Background:** AMBARI-22196 did the following : 
>  (1). Refactoring work of moving all cluster related configs/settings in 
> cluster-env to "cluster-settings" files.
>  (2). Implementing READ only API to access *cluster-settings* file 
> *setting(s)* : *http://:/api/v1/cluster_settings/ *
> 
> - This was done to separate cluster related configs from stack related 
> configs.
> 
> **This JIRA implements the following :**
> 
> - POST, GET, UPDATE and DELETE APIs for cluster settings with endpoint : 
>   *http://:/api/v1/clusters/[[clusterName]]/settings*, where 
>-- the cluster settings would be initially read from the above mentioned 
> read-only API : *http://:/api/v1/cluster_settings/*. 
> 
> - Further, added cluster *settings* as a sub-resource of *cluster* resource.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ClusterSettingNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
>  e5680dd 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  6096fa5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
>  92f50f4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  358b1bf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  370f735 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterSettingRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterSettingResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  3db55d4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
>  20f4864 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
>  147650c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  9050e3d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
>  c219d23 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
>  2e935af 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resourc

Review Request 63573: AMBARI-22366. POST, GET and UPDATE API for cluster settings. (/clusters/{clusterName}/settings).

2017-11-05 Thread Swapan Shridhar
";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 54,
"cluster_setting_name" : "security_enabled",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


**Multiple Setting PUT**:

PUT http://{{host1}}:8080/api/v1/clusters/c1/settings/

{code:title=REQUEST} 
[
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value": "true"
  }
},
{
  "ClusterSettingInfo" : {
"cluster_setting_name" : "smokeuser",
"cluster_setting_value": "smoke_user2"
  }
}
]
{code}

{code:title=RESPONSE}
{
  "resources" : [
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/smokeuser";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 55,
"cluster_setting_name" : "smokeuser",
"cluster_setting_value" : "smoke_user2"
  }
},
{
  "href" : 
"http://172.22.87.100:8080/api/v1/clusters/c1/settings/ignore_groupsusers_create";,
  "ClusterSettingInfo" : {
"cluster_id" : 2,
"cluster_name" : "c1",
"cluster_setting_id" : 56,
"cluster_setting_name" : "ignore_groupsusers_create",
"cluster_setting_value" : "true"
  }
}
  ]
}
{code}


***==**
**DELETE**
**==**

DELETE http://{{host1}}:8080/api/v1/clusters/c1/settings/security_enabled

{code:title=REQUEST} 
[]
{code}

{code:title=RESPONSE}
{
  "deleteResult" : [
{
  "deleted" : {
"key" : "cluster_name: c1, cluster_setting_name: security_enabled"
  }
}
  ]
}
{code}


Thanks,

Swapan Shridhar



Re: Review Request 63051: Add service group dependencies

2017-10-30 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Oct. 25, 2017, 11:18 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63051/
> ---
> 
> (Updated Oct. 25, 2017, 11:18 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya, Myroslav Papirkovskyy, and Swapan 
> Shridhar.
> 
> 
> Bugs: AMBARI-22249
> https://issues.apache.org/jira/browse/AMBARI-22249
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Add table servicegroupdependencies
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  737b9b4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceGroupDependencyResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ServiceGroupResourceDefinition.java
>  13bdd7b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceGroupKey.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceGroupService.java
>  1e2eaf4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  3117186 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
>  f75a7d5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupDependencyRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupDependencyResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  b8c1674 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
>  cfab185 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupDependencyResourceProvider.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
>  2e935af 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
>  6a76fff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
>  7f8facb 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
> 8fd878e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
> 9850462 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
>  7146bdf 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
>  735a946 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
>  1e4d81f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  0434728 
>   ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b8c0a42 
>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql c56e486 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 8917d48 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql f48bcd6 
>   ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql e7c5c72 
>   ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql f87af4c 
> 
> 
> Diff: https://reviews.apache.org/r/63051/diff/8/
> 
> 
> Testing
> ---
> 
> Will fix tests after patch approve
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-25 Thread Swapan Shridhar

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

(Updated Oct. 25, 2017, 6:44 p.m.)


Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.


Changes
---

Added 
"ambari-server/src/main/resources/stacks/HDP/3.0/configuration/settings.xml" 
file.


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


Repository: ambari


Description
---

This JIRA work assumes the following things to be present in the stack (3.0 
onwards) coming from the mpack (as there is no inheritance in stacks, given the 
flat stack structure coming from mpacks):

- **settings.xml** file in 
**/var/lib/ambari-server/resources/stacks///configuration**

- **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
present in 
**/var/lib/ambari-server/resources/stacks///properties/**
 directory.


Above work is done as part of JIRA : AMBARI-22285


--


**Work done in this Review Request:**

- Implement the new read only 
http://:/api/v1/stacks//versions//settings 
API.
It serves the following settings : **stack_features**, **stack_name**, 
**stack_packages**, **stack_root** and **stack_tools**.

- Renaming of files for Cluster Settings related code (work done in  
AMBARI-22196).


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 737b9b4 
  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 1c0a555 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
 d77b347 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
 aef7fc1 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
 ce61497 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 8a038cc 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 3117186 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 b8c1674 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 6a76fff 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
 4cb6cd9 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
 fcda654 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
878415b 
  ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
07d28ce 
  ambari-server/src/main/resources/stacks/HDP/3.0/configuration/settings.xml 
PRE-CREATION 


Diff: https://reviews.apache.org/r/63205/diff/4/

Changes: https://reviews.apache.org/r/63205/diff/3-4/


Testing
---

**Testing on 2.6 stack** (stack version in general has no effect on what we are 
testing here)


- **GET http://:/api/v1/stacks/HDP/versions/2.6/settings**


{
  "href" : "http://:/api/v1/stacks/HDP/versions/2.6/settings",
  "items" : [
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_features",
  "StackSettingsInfo" : {
"property_name" : "stack_features",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_name",
  "StackSettingsInfo" : {
"property_name" : "stack_name",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_packages",
  "StackSettingsInfo" : {
"property_name" : "stack_packages",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_root",
  "StackSettingsInfo" : {
"property_name" : "stack_root",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_tools",
  "StackSettingsInfo" : {
"property_name" : "stack_tools",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
}
  ]
}


- **GET 

Re: Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-24 Thread Swapan Shridhar

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

(Updated Oct. 25, 2017, 1:14 a.m.)


Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.


Changes
---

Changed Resource name from "StackSetting" to "RootStackSetting".


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


Repository: ambari


Description (updated)
---

This JIRA work assumes the following things to be present in the stack (3.0 
onwards) coming from the mpack (as there is no inheritance in stacks, given the 
flat stack structure coming from mpacks):

- **settings.xml** file in 
**/var/lib/ambari-server/resources/stacks///configuration**

- **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
present in 
**/var/lib/ambari-server/resources/stacks///properties/**
 directory.


Above work is done as part of JIRA : AMBARI-22285


--


**Work done in this Review Request:**

- Implement the new read only 
http://:/api/v1/stacks//versions//settings 
API.
It serves the following settings : **stack_features**, **stack_name**, 
**stack_packages**, **stack_root** and **stack_tools**.

- Renaming of files for Cluster Settings related code (work done in  
AMBARI-22196).


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 737b9b4 
  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 1c0a555 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
 d77b347 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
 aef7fc1 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
 ce61497 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 8a038cc 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 3117186 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 b8c1674 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 6a76fff 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
 4cb6cd9 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
 fcda654 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
878415b 
  ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
07d28ce 


Diff: https://reviews.apache.org/r/63205/diff/3/

Changes: https://reviews.apache.org/r/63205/diff/2-3/


Testing
---

**Testing on 2.6 stack** (stack version in general has no effect on what we are 
testing here)


- **GET http://:/api/v1/stacks/HDP/versions/2.6/settings**


{
  "href" : "http://:/api/v1/stacks/HDP/versions/2.6/settings",
  "items" : [
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_features",
  "StackSettingsInfo" : {
"property_name" : "stack_features",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_name",
  "StackSettingsInfo" : {
"property_name" : "stack_name",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_packages",
  "StackSettingsInfo" : {
"property_name" : "stack_packages",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_root",
  "StackSettingsInfo" : {
"property_name" : "stack_root",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_tools",
  "StackSettingsInfo" : {
"property_name" : "stack_tools",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
}
  ]
}


- **GET 
http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_feature**

{
  "href" : 
"http://:/api/v1/stacks/HDP/

Re: Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-23 Thread Swapan Shridhar


> On Oct. 23, 2017, 7:09 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
> > Lines 1065 (patched)
> > <https://reviews.apache.org/r/63205/diff/1/?file=1865359#file1865359line1065>
> >
> > Rename to {stackName}/versions/{stackVersion}/settings instead?

Updated.


- Swapan


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


On Oct. 24, 2017, 1:55 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63205/
> ---
> 
> (Updated Oct. 24, 2017, 1:55 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22198
> https://issues.apache.org/jira/browse/AMBARI-22198
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This JIRA work assumes the following things to be present in the stack (3.0 
> onwards) coming from the mpack (as there is no inheritance in stacks, given 
> the flat stack structure coming from mpacks):
> 
> - **settings.xml** file in 
> **/var/lib/ambari-server/resources/stacks///configuration**
> 
> - **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
> present in 
> **/var/lib/ambari-server/resources/stacks///properties/**
>  directory.
> 
> 
> Above work is done as part of JIRA : AMBARI-22285
> 
> 
> --
> 
> 
> **Work done in this Rveiew Request:**
> 
> - Implement the new read only 
> http://:/api/v1/stacks//versions//settings 
> API.
> It serves the following settings : **stack_features**, **stack_name**, 
> **stack_packages**, **stack_root** and **stack_tools**.
> 
> - Renaming of files for Cluster Settings related code (work done in  
> AMBARI-22196).
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  737b9b4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  2bb450b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
>  d77b347 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
>  aef7fc1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  ce61497 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  28b5c28 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  3117186 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  b8c1674 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
>  6a76fff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
>  4cb6cd9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
>  fcda654 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
> 878415b 
>   ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
> 07d28ce 
> 
> 
> Diff: https://reviews.apache.org/r/63205/diff/2/
> 
> 
> Testing
> ---
> 
> **Testing on 2.6 stack** (stack version in general has no effect on what we 
> are testing here)
> 
> 
> - **GET http://:/api/v1/stacks/HDP/versions/2.6/settings**
> 
> 
> {
>   "href" : "http://:/api/v1/stacks/HDP/versions/2.6/settings",
>   "items" : [
> {
>   "href" : 
> "http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_features",
>   &qu

Re: Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-23 Thread Swapan Shridhar


- Swapan


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


On Oct. 24, 2017, 1:55 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63205/
> ---
> 
> (Updated Oct. 24, 2017, 1:55 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22198
> https://issues.apache.org/jira/browse/AMBARI-22198
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> This JIRA work assumes the following things to be present in the stack (3.0 
> onwards) coming from the mpack (as there is no inheritance in stacks, given 
> the flat stack structure coming from mpacks):
> 
> - **settings.xml** file in 
> **/var/lib/ambari-server/resources/stacks///configuration**
> 
> - **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
> present in 
> **/var/lib/ambari-server/resources/stacks///properties/**
>  directory.
> 
> 
> Above work is done as part of JIRA : AMBARI-22285
> 
> 
> --
> 
> 
> **Work done in this Rveiew Request:**
> 
> - Implement the new read only 
> http://:/api/v1/stacks//versions//settings 
> API.
> It serves the following settings : **stack_features**, **stack_name**, 
> **stack_packages**, **stack_root** and **stack_tools**.
> 
> - Renaming of files for Cluster Settings related code (work done in  
> AMBARI-22196).
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  737b9b4 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  2bb450b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
>  d77b347 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
>  aef7fc1 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  ce61497 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  28b5c28 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  3117186 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  b8c1674 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
>  6a76fff 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
>  4cb6cd9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
>  fcda654 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
>  PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
> 878415b 
>   ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
> 07d28ce 
> 
> 
> Diff: https://reviews.apache.org/r/63205/diff/2/
> 
> 
> Testing
> ---
> 
> **Testing on 2.6 stack** (stack version in general has no effect on what we 
> are testing here)
> 
> 
> - **GET http://:/api/v1/stacks/HDP/versions/2.6/settings**
> 
> 
> {
>   "href" : "http://:/api/v1/stacks/HDP/versions/2.6/settings",
>   "items" : [
> {
>   "href" : 
> "http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_features",
>   "StackSettingsInfo" : {
> "property_name" : "stack_features",
> "stack_name" : "HDP",
> "stack_version" : "2.6"
>   }
> },
> {
>   "href" : 
> "http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_name",
>   "St

Re: Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-23 Thread Swapan Shridhar

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

(Updated Oct. 24, 2017, 1:55 a.m.)


Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.


Changes
---

Changed API name from :

- "http://:/api/v1/stacks/HDP/versions/2.6/stack_settings", to
 
- "http://:/api/v1/stacks/HDP/versions/2.6/settings".


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


Repository: ambari


Description (updated)
---

This JIRA work assumes the following things to be present in the stack (3.0 
onwards) coming from the mpack (as there is no inheritance in stacks, given the 
flat stack structure coming from mpacks):

- **settings.xml** file in 
**/var/lib/ambari-server/resources/stacks///configuration**

- **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
present in 
**/var/lib/ambari-server/resources/stacks///properties/**
 directory.


Above work is done as part of JIRA : AMBARI-22285


--


**Work done in this Rveiew Request:**

- Implement the new read only 
http://:/api/v1/stacks//versions//settings 
API.
It serves the following settings : **stack_features**, **stack_name**, 
**stack_packages**, **stack_root** and **stack_tools**.

- Renaming of files for Cluster Settings related code (work done in  
AMBARI-22196).


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 737b9b4 
  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 2bb450b 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
 d77b347 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
 aef7fc1 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
 ce61497 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 28b5c28 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 3117186 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 b8c1674 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 6a76fff 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
 4cb6cd9 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
 fcda654 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
878415b 
  ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
07d28ce 


Diff: https://reviews.apache.org/r/63205/diff/2/

Changes: https://reviews.apache.org/r/63205/diff/1-2/


Testing (updated)
---

**Testing on 2.6 stack** (stack version in general has no effect on what we are 
testing here)


- **GET http://:/api/v1/stacks/HDP/versions/2.6/settings**


{
  "href" : "http://:/api/v1/stacks/HDP/versions/2.6/settings",
  "items" : [
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_features",
  "StackSettingsInfo" : {
"property_name" : "stack_features",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_name",
  "StackSettingsInfo" : {
"property_name" : "stack_name",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_packages",
  "StackSettingsInfo" : {
"property_name" : "stack_packages",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_root",
  "StackSettingsInfo" : {
"property_name" : "stack_root",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/settings/stack_tools",
  "StackSettingsInfo" : {
"property_name" : "stack_tools",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
}
  ]
}


- **GET 
http://:/api/v1/sta

Review Request 63205: AMBARI-22198. Implement read only API for getting stack level settings.

2017-10-22 Thread Swapan Shridhar

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

Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.


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


Repository: ambari


Description
---

This JIRA work assumes the following things to be present in the stack (3.0 
onwards) coming from the mpack (as there is no inheritance in stacks, given the 
flat stack structure coming from mpacks):

- **settings.xml** file in 
**/var/lib/ambari-server/resources/stacks///configuration**

- **stack_features.json**, **stack_packages.json** and **stack_tools.json** 
present in 
**/var/lib/ambari-server/resources/stacks///properties/**
 directory.


Above work is done as part of JIRA : AMBARI-22285


--


**Work done in this Rveiew Request:**

- Implement the new read only 
http://:/api/v1/stacks//versions//stack_settings
 API.
It serves the following settings : **stack_features**, **stack_name**, 
**stack_packages**, **stack_root** and **stack_tools**.

- Renaming of files for Cluster Settings related code (work done in  
AMBARI-22196).


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
 737b9b4 
  
ambari-server/src/main/java/org/apache/ambari/server/api/resources/RootStackSettingsResourceDefinition.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
 2bb450b 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/RootClusterSettingService.java
 d77b347 
  
ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
 aef7fc1 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
 ce61497 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
 28b5c28 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
 3117186 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 b8c1674 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootStackSettingsResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 6a76fff 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
 4cb6cd9 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
 fcda654 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManager.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/resources/RootLevelSettingsManagerFactory.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/stack/StackModule.java 
878415b 
  ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
07d28ce 


Diff: https://reviews.apache.org/r/63205/diff/1/


Testing
---

**Testing on 2.6 stack** (stack version in general has no effect on what we are 
testing here)


- **GET http://:/api/v1/stacks/HDP/versions/2.6/stack_settings**


{
  "href" : "http://:/api/v1/stacks/HDP/versions/2.6/stack_settings",
  "items" : [
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_features",
  "StackSettingsInfo" : {
"property_name" : "stack_features",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_name",
  "StackSettingsInfo" : {
"property_name" : "stack_name",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_packages",
  "StackSettingsInfo" : {
"property_name" : "stack_packages",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_root",
  "StackSettingsInfo" : {
"property_name" : "stack_root",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
},
{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_tools",
  "StackSettingsInfo" : {
"property_name" : "stack_tools",
"stack_name" : "HDP",
"stack_version" : "2.6"
  }
}
  ]
}


- **GET 
http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_feature**

{
  "href" : 
"http://:/api/v1/stacks/HDP/versions/2.6/stack_settings/stack_feature",
  "StackSettingsInfo" : {
"final" : "false",
"property_depends_on" : [ ],
"property_de

Re: Review Request 63034: AMBARI-22244. Update service component API call to work for second service instance

2017-10-17 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Oct. 17, 2017, 6:34 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63034/
> ---
> 
> (Updated Oct. 17, 2017, 6:34 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Jayush Luniya, Madhuvanthi 
> Radhakrishnan, Sandor Magyari, and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-22244
> https://issues.apache.org/jira/browse/AMBARI-22244
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Replaced `serviceName` with `serviceType` in `getService` and `getComponent` 
> calls where found to be necessary.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
>  ff13d0bc5334922e138ed622f9120a94c6c05883 
>   
> ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
>  bb298d5a5ceda4619de958c7a529101c6e4f2e3f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/alerts/ComponentVersionAlertRunnable.java
>  45cc97348e89cdf5bd73a5d4d6139f808bc23180 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  2bb450bd0ac6a0da064d892e74bbdd05e2475dd6 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ComponentService.java
>  60230f6b9fe476deed40ed0f4083ec24bea742f5 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ComponentsExistInRepoCheck.java
>  69492574f8756006c9bd7aab495efb269265cfb7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesUpCheck.java
>  5ecce88a84bb8897788fe881f0059fcb553c776f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
>  0f6eb90803ca6b7a5fb9791294a269aaf4e45fb9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
>  ff35e8042846767adf858a112d0e9da729b81b84 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  58f1cbd464e3b4176cbc5535b92904cd27d8fb3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
>  ca80961ab3634960e8f12cc56b876109afae33ec 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
>  ba5a4e78aebb49dbcc24d220c35abfd46fe3dbc0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
>  f7559c6d3422f4902e28b4f205564bc0ac0aaefa 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
>  ba5fccc1dc1d6ace00ba0f9f36820b055a66ce3b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
>  252d7726e392307e1a8a0688b8de4e95e4982e8e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
>  8c2198bc185da616200bf2701acd4cb8a31f7022 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java
>  0cd55c31a90a17bcd3a8b17783156dc92b2a6a57 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
>  cae330b3466982923deb388ac5323c67fffea02d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
>  e3f4e1a005c358ef5a7801691b56c9b91c9aaa11 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/DefaultServiceCalculatedState.java
>  603e650894ab27d12cbe2b9c49daf299e5818d5f 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
>  765e6fcaaa75086d2bc37e058b6e69e1268be8c2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
>  704b4b96fbe5b54a7c36c22280f27142c0a8cfe9 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
>  5e23f0b592519746c111dd89afbda37a79c425b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/OozieServiceCalculatedState.java
>  6c5eab4090a18dce7

Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar
ttingsInfo": {
"final": "false",
"property_depends_on": [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://:/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: 'non-existing-setting', in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar
gs/agent_mounts_ignore_list";,
"ClusterSettingsInfo": {
"property_name": "agent_mounts_ignore_list"
}
},
{
"href": 
"http://172.22.102.6:8080/api/v1/cluster_settings/alerts_repeat_tolerance";,
"ClusterSettingsInfo": {
"property_name": "alerts_repeat_tolerance"
}
},
...
...
}


**Get specific cluster-setting**

**http://:/api/v1/cluster_settings/agent_mounts_ignore_list

{
"href": 
"http://172.22.102.6:8080/api/v1/cluster_settings/agent_mounts_ignore_list";,
"ClusterSettingsInfo": {
"final": "false",
"property_depends_on": [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://:/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar
er_settings/agent_mounts_ignore_list";,
"ClusterSettingsInfo": {
"final": "false",
"property_depends_on": [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://:/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar
rty_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://:/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar
l": "false",
"property_depends_on": [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://172.22.102.6:8080/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar


> On Oct. 11, 2017, 6:38 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
> > Lines 78 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851606#file1851606line78>
> >
> > RootClusterSetting

Done.


- Swapan


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


On Oct. 11, 2017, 5:27 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62802/
> ---
> 
> (Updated Oct. 11, 2017, 5:27 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22196
> https://issues.apache.org/jira/browse/AMBARI-22196
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **Following done as part of this JIRA:**
> 
> - Move all non-stack specific configs in **cluster-env.xml** to 
> **cluster-settings.xml**.
> - For example **cluster-env/security_enabled** is a cluster setting and 
> shouldn't be associated with any **stack/mpack**. 
> {code}
>   
> security_enabled
> false
> Hadoop Security
> 
>   
> {code}
> 
> - Add new file as : **/var/lib/ambari-server/resources/cluster-settings.xml** 
> which includes all the read only cluster specific settings.
> 
> 
> - **New API Endpoint serving the cluster-settings** : api/v1/cluster_settings
> 
> 
> **Followup work :**
> 
> - **AMBARI-22197** takes care of removing **cluster-env.xml** and associated 
> code and API once we have **AMBARI-22198** completed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ConfigurationNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  7431f9d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  fd15105 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
>  67d3a15 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  f2c4c52 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  e9fa8db 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  c56483d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ReadOnlyConfigurationResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceLevelClusterSettingRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
>  fb31c19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationRequest.java
>  ea67207 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java
>  d33b5cb 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  0c5a579 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
>  f8feef2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
>  6f5b0f8 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java
>  819507b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
>  a364c4c 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManager.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/resources/ResourceLevelClusterSettingManagerFactory.java
>  

Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar


> On Oct. 11, 2017, 6:29 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
> > Lines 777 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851590#file1851590line777>
> >
> > PropertyNotFoundException instead?

Done.


> On Oct. 11, 2017, 6:29 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
> > Lines 778 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851590#file1851590line778>
> >
> > Remove cluster-settings.xml hardcodings. Use constant instead.

Done.


> On Oct. 11, 2017, 6:29 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
> > Lines 53 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851591#file1851591line53>
> >
> > Rename to RootClusterSettingService()? 
> > 
> > Lets reserve ClusterSettingService for 
> > api/v1/clusters//settings

Done.


> On Oct. 11, 2017, 6:29 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterSettingResourceProvider.java
> > Lines 1 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851602#file1851602line1>
> >
> > Rename to RootClusterSettingsResourceProvider?

Done.


- Swapan


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


On Oct. 11, 2017, 5:27 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62802/
> ---
> 
> (Updated Oct. 11, 2017, 5:27 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22196
> https://issues.apache.org/jira/browse/AMBARI-22196
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **Following done as part of this JIRA:**
> 
> - Move all non-stack specific configs in **cluster-env.xml** to 
> **cluster-settings.xml**.
> - For example **cluster-env/security_enabled** is a cluster setting and 
> shouldn't be associated with any **stack/mpack**. 
> {code}
>   
> security_enabled
> false
> Hadoop Security
> 
>   
> {code}
> 
> - Add new file as : **/var/lib/ambari-server/resources/cluster-settings.xml** 
> which includes all the read only cluster specific settings.
> 
> 
> - **New API Endpoint serving the cluster-settings** : api/v1/cluster_settings
> 
> 
> **Followup work :**
> 
> - **AMBARI-22197** takes care of removing **cluster-env.xml** and associated 
> code and API once we have **AMBARI-22198** completed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ConfigurationNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  7431f9d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  fd15105 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
>  67d3a15 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  f2c4c52 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  e9fa8db 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  c56483d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ReadOnlyConfigurationResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceLevelClusterSettingRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
>  fb31c19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigu

Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-11 Thread Swapan Shridhar


> On Oct. 11, 2017, 6:38 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
> > Lines 25 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851588#file1851588line25>
> >
> > RootClusterSettingsResourceDefinition

Done.


> On Oct. 11, 2017, 6:38 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceLevelClusterSettingRequest.java
> > Lines 22 (patched)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851597#file1851597line22>
> >
> > RootClusterSettingRequest?

Done.


> On Oct. 11, 2017, 6:38 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
> > Line 31 (original)
> > <https://reviews.apache.org/r/62802/diff/1/?file=1851603#file1851603line32>
> >
> > Why do we need to remove StackConfigurationResponse()?

I renamed it to 'ReadOnlyConfigurationResponse.java' to make it generic.


- Swapan


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


On Oct. 11, 2017, 5:27 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62802/
> ---
> 
> (Updated Oct. 11, 2017, 5:27 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-22196
> https://issues.apache.org/jira/browse/AMBARI-22196
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **Following done as part of this JIRA:**
> 
> - Move all non-stack specific configs in **cluster-env.xml** to 
> **cluster-settings.xml**.
> - For example **cluster-env/security_enabled** is a cluster setting and 
> shouldn't be associated with any **stack/mpack**. 
> {code}
>   
> security_enabled
> false
> Hadoop Security
> 
>   
> {code}
> 
> - Add new file as : **/var/lib/ambari-server/resources/cluster-settings.xml** 
> which includes all the read only cluster specific settings.
> 
> 
> - **New API Endpoint serving the cluster-settings** : api/v1/cluster_settings
> 
> 
> **Followup work :**
> 
> - **AMBARI-22197** takes care of removing **cluster-env.xml** and associated 
> code and API once we have **AMBARI-22198** completed.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ConfigurationNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/ResourcesPathNotFoundException.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterSettingResourceDefinition.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
>  7431f9d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  fd15105 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterSettingService.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
>  67d3a15 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementController.java
>  f2c4c52 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  e9fa8db 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
>  c56483d 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ReadOnlyConfigurationResponse.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceLevelClusterSettingRequest.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
>  fb31c19 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationRequest.java
>  ea67207 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/StackLevelConfigurationResponse.java
>  d33b5cb 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
>  0c5a579 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterS

Re: Review Request 62802: AMBARI-22196. Refactor non-stack cluster-env configs to cluster settings.

2017-10-10 Thread Swapan Shridhar
;: 
"http://172.22.102.6:8080/api/v1/cluster_settings/agent_mounts_ignore_list";,
"ClusterSettingsInfo": {
"final": "false",
"property_depends_on": [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://172.22.102.6:8080/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Review Request 62802: clusterSettingsCode10thoctWithCHanges_ReadOnlyConfigurationResponse.patch

2017-10-10 Thread Swapan Shridhar
: [],
"property_description": "Comma separated list of the mounts which would be 
ignored by Ambari during property values suggestion by Stack Advisor",
"property_name": "agent_mounts_ignore_list",
"property_type": [],
"property_value": "",
"property_value_attributes": {
"visible": true,
"keyStore": false,
"empty_value_valid": true
},
"type": "cluster-settings.xml"
}
}


**Get specific non-existing cluster-setting**

**http://172.22.102.6:8080/api/v1/cluster_settings/non-existing-setting**

{
"status": 404,
"message": "The requested resource doesn't exist: non-existing-setting, in 
cluster-settings.xml"
}


Thanks,

Swapan Shridhar



Re: Review Request 62699: Devdeploy: HiveServer2 Interactive Start failed

2017-09-29 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Sept. 29, 2017, 10:14 p.m., Madhuvanthi Radhakrishnan wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62699/
> ---
> 
> (Updated Sept. 29, 2017, 10:14 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-22100
> https://issues.apache.org/jira/browse/AMBARI-22100
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Change temp directory for jceks file from service level to component level.
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
> 8a433c83f4 
> 
> 
> Diff: https://reviews.apache.org/r/62699/diff/1/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Madhuvanthi Radhakrishnan
> 
>



Re: Review Request 62364: Set tez.runtime.shuffle.ssl.enable=false in Ambari for HSI

2017-09-18 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Sept. 18, 2017, 5:46 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62364/
> ---
> 
> (Updated Sept. 18, 2017, 5:46 p.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Jayush Luniya, Swapan Shridhar, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-21973
> https://issues.apache.org/jira/browse/AMBARI-21973
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Add tez.runtime.shuffle.ssl.enable=false to tez-interactive-site.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/tez-interactive-site.xml
>  c1a42b0 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
> 5618e14 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
>  9f77065 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  8824de5 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml 
> a6d7a49 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> 2a61034 
>   ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml 
> c67e4cf 
>   
> ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
>  b49fdbf 
>   ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
> af885e1 
> 
> 
> Diff: https://reviews.apache.org/r/62364/diff/2/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 62364: Set tez.runtime.shuffle.ssl.enable=false in Ambari for HSI

2017-09-18 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Sept. 16, 2017, 12:45 a.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62364/
> ---
> 
> (Updated Sept. 16, 2017, 12:45 a.m.)
> 
> 
> Review request for Ambari, Dmytro Grinenko, Jayush Luniya, Swapan Shridhar, 
> and Sid Wagle.
> 
> 
> Bugs: AMBARI-21973
> https://issues.apache.org/jira/browse/AMBARI-21973
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Add tez.runtime.shuffle.ssl.enable=false to tez-interactive-site.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/tez-interactive-site.xml
>  c1a42b0 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
> 75a8782 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
>  07bc8a4 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  850f725 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml 
> 9a42098 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> ea58559 
>   ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/config-upgrade.xml 
> c67e4cf 
>   
> ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml
>  b49fdbf 
>   ambari-server/src/main/resources/stacks/HDP/2.6/upgrades/upgrade-2.6.xml 
> af885e1 
> 
> 
> Diff: https://reviews.apache.org/r/62364/diff/1/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 62249: Do not export YARN_CONF_DIR in 'yarn-env.sh' file

2017-09-12 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On Sept. 12, 2017, 4:47 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62249/
> ---
> 
> (Updated Sept. 12, 2017, 4:47 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-21936
> https://issues.apache.org/jira/browse/AMBARI-21936
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> yarn-env.sh exports YARN_CONF_DIR 
> {code:title=yarn-env.sh}
># resolve links - $0 may be a softlink
>   export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
> {code}
> 
> This causes in not respecting --config option for yarn daemon.
> Hence please remove the export
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/configuration/yarn-env.xml
>  aaa72d1 
> 
> 
> Diff: https://reviews.apache.org/r/62249/diff/2/
> 
> 
> Testing
> ---
> 
> TODO
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 62169: Server returns 500 error for create config group request

2017-09-07 Thread Swapan Shridhar

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


Ship it!




LGTM.

- Swapan Shridhar


On Sept. 7, 2017, 7:49 p.m., Sid Wagle wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62169/
> ---
> 
> (Updated Sept. 7, 2017, 7:49 p.m.)
> 
> 
> Review request for Ambari, Aravindan Vijayan, Jonathan Hurley, and Swapan 
> Shridhar.
> 
> 
> Bugs: AMBARI-21908
> https://issues.apache.org/jira/browse/AMBARI-21908
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Cannot create config group, server returns 500 error.
> 
> Form data:
> {code}
> {noformat}
> [{"ConfigGroup":{"group_name":"11","tag":"HDFS","description":"","desired_configs":[],"hosts":[]},"serviceName":"HDFS"}]
> {noformat}
> {code}
> 
> Exception:
> {noformat}
> {
>   "status" : 400,
>   "message" : "The properties [ConfigGroup/serviceName] specified in the 
> request or predicate are not supported for the resource type ConfigGroup."
> }
> {noformat}
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupRequest.java
>  efa1a7e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
>  0ea54cb 
>   
> ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
>  da517f3 
>   ambari-server/src/main/resources/properties.json 80a86b8 
> 
> 
> Diff: https://reviews.apache.org/r/62169/diff/1/
> 
> 
> Testing
> ---
> 
> Manually verified.
> Affected unit tests are green.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>



Re: Review Request 61917: AMBARI-21824. MultiEverything : Make services as sub-resource of ServiceGroups and use Servicegroup while doing Creation, Update and retrieval of HostComponents and ServiceCo

2017-08-29 Thread Swapan Shridhar
i-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
 01e0aac 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java
 f94b979 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
 89f75f3 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java
 64261b3 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/DatabaseChecker.java
 95352bf 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/DefaultServiceCalculatedState.java
 5e02a64 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/FlumeServiceCalculatedState.java
 ca4fe6e 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HBaseServiceCalculatedState.java
 eac0dce 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HDFSServiceCalculatedState.java
 7bbad2a 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/HiveServiceCalculatedState.java
 77e44a5 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/OozieServiceCalculatedState.java
 1803f70 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/state/YARNServiceCalculatedState.java
 2f1619f 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceComponentInstalledEvent.java
 0ba4ac2 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceComponentUninstalledEvent.java
 8acc401 
  ambari-server/src/main/java/org/apache/ambari/server/events/ServiceEvent.java 
08f739e 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceInstalledEvent.java
 1f341d9 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceRemovedEvent.java
 de96342 
  
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
 2eb89a2 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterServiceDAO.java
 09419ec 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentDesiredStateDAO.java
 57e409c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java
 ad6867e 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceComponentDesiredStateDAO.java
 dfe7d7b 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 dc997b0 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntity.java
 2af9a47 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterServiceEntityPK.java
 578edea 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentDesiredStateEntity.java
 36a7a25 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
 0d295a4 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentDesiredStateEntity.java
 e0f52c6 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceComponentVersionEntity.java
 ffb3b82 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntity.java
 fc26478 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceDesiredStateEntityPK.java
 3fa5289 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 cd9d2c8 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/models/HostComponentSummary.java
 f5b12b5 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
ce4c961 
  ambari-server/src/main/java/org/apache/ambari/server/state/Service.java 
65189ca 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponent.java
 9fb2aba 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentHost.java
 5ff9e37 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceComponentImpl.java
 5f85e38 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceFactory.java 
a4c953f 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 
0247774 
  ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java 
1494488 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 605cb7a 
  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
3ceaa48 
  
ambari-server/src/main/java/org/apache/ambari/server/state/repository/VersionDefinitionXml.java
 45d8e8e 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
 230b031 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
 e9359ef 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 662f9aa 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b1a13d3 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 2beee0f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 190eb8b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0f6b075 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 668d1e7 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql d7afe73 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
 58d4c3e 
  ambari-web/app/app.js 2c638e4 
  ambari-web/app/controllers/global/update_controller.js 8a3f984 
  ambari-web/app/controllers/main/admin/kerberos/step3_controller.js 15be4f9 
  ambari-web/app/controllers/main/service/add_controller.js c11bcf2 
  ambari-web/app/controllers/wizard/step8_controller.js cc06b5b 
  ambari-web/app/controllers/wizard/step9_controller.js 9f27f65 
  ambari-web/app/mappers/service_mapper.js 3523379 
  ambari-web/app/mappers/service_metrics_mapper.js 87b6149 
  ambari-web/app/mixins/common/configs/configs_saver.js dafee79 
  ambari-web/app/mixins/wizard/wizardProgressPageController.js 9d9d000 
  ambari-web/app/utils/ajax/ajax.js 4a1f9ef 


Diff: https://reviews.apache.org/r/61917/diff/3/


Testing (updated)
---

Manually tested by deploying cluster via UI.


Thanks,

Swapan Shridhar



Re: Review Request 61917: AMBARI-21824. MultiEverything : Make services as sub-resource of ServiceGroups and use Servicegroup while doing Creation, Update and retrieval of HostComponents and ServiceCo

2017-08-29 Thread Swapan Shridhar
  
ambari-server/src/main/java/org/apache/ambari/server/state/repository/VersionDefinitionXml.java
 45d8e8e 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
 230b031 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
 e9359ef 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 662f9aa 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b1a13d3 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 2beee0f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 190eb8b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0f6b075 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 668d1e7 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql d7afe73 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
 58d4c3e 
  ambari-web/app/app.js 2c638e4 
  ambari-web/app/controllers/global/update_controller.js 8a3f984 
  ambari-web/app/controllers/main/admin/kerberos/step3_controller.js 15be4f9 
  ambari-web/app/controllers/main/service/add_controller.js c11bcf2 
  ambari-web/app/controllers/wizard/step8_controller.js cc06b5b 
  ambari-web/app/controllers/wizard/step9_controller.js 9f27f65 
  ambari-web/app/mappers/service_mapper.js 3523379 
  ambari-web/app/mappers/service_metrics_mapper.js 87b6149 
  ambari-web/app/mixins/common/configs/configs_saver.js dafee79 
  ambari-web/app/mixins/wizard/wizardProgressPageController.js 9d9d000 
  ambari-web/app/utils/ajax/ajax.js 4a1f9ef 


Diff: https://reviews.apache.org/r/61917/diff/3/

Changes: https://reviews.apache.org/r/61917/diff/2-3/


Testing
---

Manually tested by deplyoying cluster via UI.


Thanks,

Swapan Shridhar



Re: Review Request 61917: AMBARI-21824. MultiEverything : Make services as sub-resource of ServiceGroups and use Servicegroup while doing Creation, Update and retrieval of HostComponents and ServiceCo

2017-08-29 Thread Swapan Shridhar
java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 605cb7a 
  ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java 
3ceaa48 
  
ambari-server/src/main/java/org/apache/ambari/server/state/repository/VersionDefinitionXml.java
 45d8e8e 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
 230b031 
  
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
 e9359ef 
  
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
 662f9aa 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b1a13d3 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 2beee0f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 190eb8b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0f6b075 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 668d1e7 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql d7afe73 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
 58d4c3e 
  ambari-web/app/app.js 2c638e4 
  ambari-web/app/controllers/global/update_controller.js 8a3f984 
  ambari-web/app/controllers/main/admin/kerberos/step3_controller.js 15be4f9 
  ambari-web/app/controllers/main/service/add_controller.js c11bcf2 
  ambari-web/app/controllers/wizard/step8_controller.js cc06b5b 
  ambari-web/app/controllers/wizard/step9_controller.js 9f27f65 
  ambari-web/app/mappers/service_mapper.js 3523379 
  ambari-web/app/mappers/service_metrics_mapper.js 87b6149 
  ambari-web/app/mixins/common/configs/configs_saver.js dafee79 
  ambari-web/app/mixins/wizard/wizardProgressPageController.js 9d9d000 
  ambari-web/app/utils/ajax/ajax.js 4a1f9ef 


Diff: https://reviews.apache.org/r/61917/diff/2/

Changes: https://reviews.apache.org/r/61917/diff/1-2/


Testing
---

Manually tested by deplyoying cluster via UI.


Thanks,

Swapan Shridhar



Review Request 61917: AMBARI-21824. MultiEverything : Make services as sub-resource of ServiceGroups and use Servicegroup while doing Creation, Update and retrieval of HostComponents and ServiceCompon

2017-08-28 Thread Swapan Shridhar
a
 662f9aa 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b1a13d3 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 2beee0f 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 190eb8b 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 0f6b075 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 668d1e7 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql d7afe73 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 
  
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalogHelper.java
 58d4c3e 
  ambari-web/app/app.js 2c638e4 
  ambari-web/app/controllers/global/update_controller.js 8a3f984 
  ambari-web/app/controllers/main/admin/kerberos/step3_controller.js 15be4f9 
  ambari-web/app/controllers/main/service/add_controller.js c11bcf2 
  ambari-web/app/controllers/wizard/step8_controller.js cc06b5b 
  ambari-web/app/controllers/wizard/step9_controller.js 9f27f65 
  ambari-web/app/mappers/service_mapper.js 3523379 
  ambari-web/app/mappers/service_metrics_mapper.js 87b6149 
  ambari-web/app/mixins/common/configs/configs_saver.js dafee79 
  ambari-web/app/mixins/wizard/wizardProgressPageController.js 9d9d000 
  ambari-web/app/utils/ajax/ajax.js 4a1f9ef 


Diff: https://reviews.apache.org/r/61917/diff/1/


Testing
---

Manually tested by deplyoying cluster via UI.


Thanks,

Swapan Shridhar



Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-08-02 Thread Swapan Shridhar
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
 3912138 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 3228a7f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
 248abad 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 1994501 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
9a5ee79 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupInstalledEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupRemovedEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
 c22449c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/servicegroup/ServiceGroupServerAction.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
9597ba1 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 c950d67 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 0595e07 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6275ddc 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 451eb87 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4c539fa 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 6bf2203 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0462dd9 
  ambari-server/src/main/resources/META-INF/persistence.xml 4f0099b 
  
ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
 fe44815 
  
ambari-server/src/test/java/org/apache/ambari/server/api/resources/ClusterResourceDefinitionTest.java
 ace60d5 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
 e1dc9a0 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
 a390276 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
 c803dd6 


Diff: https://reviews.apache.org/r/61201/diff/5/

Changes: https://reviews.apache.org/r/61201/diff/4-5/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-08-02 Thread Swapan Shridhar


> On Aug. 1, 2017, 5:51 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
> > Lines 234 (patched)
> > <https://reviews.apache.org/r/61201/diff/4/?file=1786100#file1786100line234>
> >
> > Shouldn't this be
> > for(ServiceGroupRequest request : requests) {
> >   deleteStatusMetaData.addDeletedKey(request.getClusterName() + "/" + 
> > request.getServiceGroupName());
> > }
> 
> Swapan Shridhar wrote:
> request already has these 2 values only. 
> This is the result with : 'requests.toString()'
> 
> 
> {
>   "deleteResult" : [
> {
>   "deleted" : {
> "key" : "[clusterName=c1, serviceGroupName=CORE]"
>   }
> }
>   ]
> }
> 
> Jayush Luniya wrote:
> what I meant was for bulk delete should it be adding a deleted key for 
> each?

Done.


- Swapan


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


On July 31, 2017, 9:06 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 31, 2017, 9:06 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-08-01 Thread Swapan Shridhar


> On Aug. 1, 2017, 5:51 a.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
> > Lines 234 (patched)
> > <https://reviews.apache.org/r/61201/diff/4/?file=1786100#file1786100line234>
> >
> > Shouldn't this be
> > for(ServiceGroupRequest request : requests) {
> >   deleteStatusMetaData.addDeletedKey(request.getClusterName() + "/" + 
> > request.getServiceGroupName());
> > }

request already has these 2 values only. 
This is the result with : 'requests.toString()'


{
  "deleteResult" : [
{
  "deleted" : {
"key" : "[clusterName=c1, serviceGroupName=CORE]"
  }
}
  ]
}


- Swapan


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


On July 31, 2017, 9:06 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 31, 2017, 9:06 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-31 Thread Swapan Shridhar
org/apache/ambari/server/controller/ControllerModule.java
 28c0d10 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
 3912138 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 3228a7f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
 248abad 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 1994501 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
9a5ee79 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupInstalledEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupRemovedEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
 c22449c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/servicegroup/ServiceGroupServerAction.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
9597ba1 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 c950d67 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 0595e07 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6275ddc 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 451eb87 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4c539fa 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 6bf2203 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0462dd9 
  ambari-server/src/main/resources/META-INF/persistence.xml 4f0099b 
  
ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
 fe44815 
  
ambari-server/src/test/java/org/apache/ambari/server/api/resources/ClusterResourceDefinitionTest.java
 ace60d5 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
 e1dc9a0 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
 a390276 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
 c803dd6 


Diff: https://reviews.apache.org/r/61201/diff/4/

Changes: https://reviews.apache.org/r/61201/diff/3-4/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-31 Thread Swapan Shridhar


> On July 28, 2017, 10:47 p.m., Madhuvanthi Radhakrishnan wrote:
> > We also need to add ServiceGroupResourceProvider initialization in 
> > DefaultProviderModule
> 
> Swapan Shridhar wrote:
> I dont think that required, as I dont see CLuster, Service, HostComponent 
> added there. Suggest ?
> 
> Madhuvanthi Radhakrishnan wrote:
> True, it does not break anything if added or not added. Since 
> DefaultResourceProvider defaults to getting the ResourceProvider from 
> AbstractControllerResourceProvider, if we define it in DefaultProviderModule 
> it need not go that extra step. You can mark this as fixed. Thank you.

Done.


- Swapan


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


On July 31, 2017, 6:53 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 31, 2017, 6:53 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
&

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-31 Thread Swapan Shridhar


> On July 28, 2017, 10:42 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/resources/properties.json
> > Lines 15 (patched)
> > <https://reviews.apache.org/r/61201/diff/2/?file=1785447#file1785447line15>
> >
> > Do we want to avoid using properties.json? You can directly define it 
> > in the ResourceProvider

Done.


- Swapan


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


On July 31, 2017, 6:53 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 31, 2017, 6:53 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1&quo

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-31 Thread Swapan Shridhar


> On July 28, 2017, 10:42 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/resources/key_properties.json
> > Lines 9 (patched)
> > <https://reviews.apache.org/r/61201/diff/2/?file=1785446#file1785446line9>
> >
> > Do we want to avoid using key_properties.json? You can directly define 
> > it in the ResourceProvider

Done.


- Swapan


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


On July 31, 2017, 6:53 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 31, 2017, 6:53 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1&quo

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-30 Thread Swapan Shridhar
org/apache/ambari/server/controller/ControllerModule.java
 28c0d10 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ResourceProviderFactory.java
 3912138 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 3228a7f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 1994501 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
9a5ee79 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupInstalledEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupRemovedEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
 c22449c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/servicegroup/ServiceGroupServerAction.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
9597ba1 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 c950d67 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 0595e07 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6275ddc 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 451eb87 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4c539fa 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 6bf2203 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0462dd9 
  ambari-server/src/main/resources/META-INF/persistence.xml 4f0099b 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 
  
ambari-server/src/test/java/org/apache/ambari/server/agent/AgentResourceTest.java
 fe44815 
  
ambari-server/src/test/java/org/apache/ambari/server/api/resources/ClusterResourceDefinitionTest.java
 ace60d5 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProviderTest.java
 e1dc9a0 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProviderTest.java
 a390276 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserResourceProviderTest.java
 c803dd6 


Diff: https://reviews.apache.org/r/61201/diff/3/

Changes: https://reviews.apache.org/r/61201/diff/2-3/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-30 Thread Swapan Shridhar


> On July 28, 2017, 10:47 p.m., Madhuvanthi Radhakrishnan wrote:
> > We also need to add ServiceGroupResourceProvider initialization in 
> > DefaultProviderModule

I dont think that required, as I dont see CLuster, Service, HostComponent added 
there. Suggest ?


- Swapan


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


On July 28, 2017, 10 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 28, 2017, 10 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
>

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-30 Thread Swapan Shridhar


> On July 28, 2017, 10:42 p.m., Madhuvanthi Radhakrishnan wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
> > Lines 230 (patched)
> > <https://reviews.apache.org/r/61201/diff/2/?file=1785423#file1785423line230>
> >
> > You can also choose to send a response back informing which key was 
> > deleted or any other information using
> > DeleteStatusMetaData, the invoke method and return a 
> > DeleteStatusMetaData object instead of RequestStatusResponse and then you 
> > can do an 
> > deleteStatusMetaData.addDeletedKey());
> > 
> > getRequestStatus(null, null, deleteStatusMetaData);

Done.

Response after delete:

{
  "deleteResult" : [
{
  "deleted" : {
"key" : "[clusterName=c1, serviceGroupName=EDW]"
  }
}
  ]
}


- Swapan


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


On July 28, 2017, 10 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 28, 2017, 10 p.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> 

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-28 Thread Swapan Shridhar
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupRequest.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 3228a7f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 1994501 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
9a5ee79 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupInstalledEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupRemovedEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
 c22449c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/servicegroup/ServiceGroupServerAction.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
9597ba1 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 c950d67 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 0595e07 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6275ddc 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 451eb87 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4c539fa 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 6bf2203 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0462dd9 
  ambari-server/src/main/resources/META-INF/persistence.xml 4f0099b 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 


Diff: https://reviews.apache.org/r/61201/diff/2/

Changes: https://reviews.apache.org/r/61201/diff/1-2/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-28 Thread Swapan Shridhar


> On July 28, 2017, 6:51 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
> > Lines 43 (patched)
> > <https://reviews.apache.org/r/61201/diff/1/?file=1785053#file1785053line43>
> >
> > service group id instead

Fixed.


> On July 28, 2017, 6:51 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
> > Lines 159 (patched)
> > <https://reviews.apache.org/r/61201/diff/1/?file=1785063#file1785063line159>
> >
> > primary key should be service group id.

Fixed.


- Swapan


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


On July 28, 2017, 3:48 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 28, 2017, 3:48 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
>

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-28 Thread Swapan Shridhar


> On July 28, 2017, 6:49 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
> > Lines 57 (patched)
> > <https://reviews.apache.org/r/61201/diff/1/?file=1785052#file1785052line57>
> >
> > Primary key in DB should be service group id and not service group name

Fixed.


- Swapan


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


On July 28, 2017, 3:48 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 28, 2017, 3:48 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
>

Re: Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-28 Thread Swapan Shridhar


> On July 28, 2017, 6:46 p.m., Jayush Luniya wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceGroupService.java
> > Lines 201 (patched)
> > <https://reviews.apache.org/r/61201/diff/1/?file=1785036#file1785036line201>
> >
> > Bulk update for multiple service groups shouldnt take 
> > "serviceGroupName" path param.

Removed the parameter.


- Swapan


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


On July 28, 2017, 3:48 a.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61201/
> ---
> 
> (Updated July 28, 2017, 3:48 a.m.)
> 
> 
> Review request for Ambari, Jayush Luniya and Madhuvanthi Radhakrishnan.
> 
> 
> Bugs: AMBARI-21594
> https://issues.apache.org/jira/browse/AMBARI-21594
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> **ServiceGroup (SG)** : is defined as sub-resource of cluster. It would later 
> be used to logically group a set of services (coming out of Management Pack 
> selected).
>  
> **Example of a Service groups can be a:** 
> - “Core” Service Group  containing HDFS and Zookeeper. This will be formed by 
> default.
> - “Streaming” Service Group containing Kafka, Storm, Nifi.
> - “Data Science” Service Group containing Hive, Spark, Zeppelin.
> - “EDW” Service Group containing Hive, Spark.
> 
> As part of this review, following has been implemented:
> - SG added as sub-resource of cluster.
> - GET, POST and DELETE API for SG.
> 
> 
> 
> *API calls and response:*
> 
> *1.* 
> 
> POST:
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups
> *Body :*
> 
> 
> [
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "CORE"
>   }
> },
> {
>   "ServiceGroupInfo" : {
> "cluster_id": "2",
> "service_group_name": "EDW"
>   }
> }
> ]
> 
> 
> *Response:* 201 CREATED
> 
> 
> {
>   "resources" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 804,
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
> "cluster_name" : "c1",
> "service_group_id" : 803,
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> *2.*
> ===
> GET :
> ===
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/";,
>   "items" : [
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "CORE"
>   }
> },
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/EDW";,
>   "ServiceGroupInfo" : {
> "cluster_name" : "c1",
> "service_group_name" : "EDW"
>   }
> }
>   ]
> }
> 
> 
> API: http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE
> 
> *Body:*
> 
> []
> 
> 
> *Response:* 200 OK
> 
> {
>   "href" : 
> "http://c6404.ambari.apache.org:8080/api/v1/clusters/c1/servicegroups/CORE";,
>   "ServiceGroupInfo" : {
> "cluster_id" : 2,
>

Review Request 61201: AMBARI-21594. MultiEverything : Add Servicegroup as a subresource of Cluster.

2017-07-27 Thread Swapan Shridhar
ver/src/main/java/org/apache/ambari/server/controller/ServiceGroupResponse.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
 3228a7f 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceGroupResourceProvider.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
 1994501 
  ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 
9a5ee79 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupInstalledEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/events/ServiceGroupRemovedEvent.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ServiceGroupDAO.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
 c22449c 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntity.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ServiceGroupEntityPK.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/serveraction/servicegroup/ServiceGroupServerAction.java
 PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
9597ba1 
  ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroup.java 
PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupFactory.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/ServiceGroupImpl.java
 PRE-CREATION 
  
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
 c950d67 
  ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql 0595e07 
  ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql 6275ddc 
  ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql 451eb87 
  ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4c539fa 
  ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql 6bf2203 
  ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 0462dd9 
  ambari-server/src/main/resources/META-INF/persistence.xml 4f0099b 
  ambari-server/src/main/resources/key_properties.json 5d76062 
  ambari-server/src/main/resources/properties.json 11ca7f6 


Diff: https://reviews.apache.org/r/61201/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 59475: Provide additional logging for config audit log

2017-06-02 Thread Swapan Shridhar

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


Ship it!




- Swapan Shridhar


On June 1, 2017, 9:57 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59475/
> ---
> 
> (Updated June 1, 2017, 9:57 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Swapan Shridhar, and Sid Wagle.
> 
> 
> Bugs: AMBARI-21096
> https://issues.apache.org/jira/browse/AMBARI-21096
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Improve logging of ambari-config-changes.log to include names, timestamps, 
> and versions.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  25b12de 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
>  cf6b717 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
>  c244107 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
>  228cf79 
> 
> 
> Diff: https://reviews.apache.org/r/59475/diff/2/
> 
> 
> Testing
> ---
> 
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>



Review Request 58860: AMBARI-20895. Fixing sizing for Hive-interactive-site's Tez AM's.

2017-04-28 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

AMBARI-20895. Fixing sizing for Hive-interactive-site's Tez AM's.


Diffs
-

  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
b6aca4c 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py c9106df 


Diff: https://reviews.apache.org/r/58860/diff/1/


Testing
---

Python UT added.
Python UT's pass.


Thanks,

Swapan Shridhar



Review Request 58862: AMBARI-20895. Fixing sizing for Hive-interactive-site's Tez AM's.

2017-04-28 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

AMBARI-20895. Fixing sizing for Hive-interactive-site's Tez AM's


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 34fe117 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
2a1113a 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 77a06fe 


Diff: https://reviews.apache.org/r/58862/diff/1/


Testing
---

Added Python UT's
Python UT passes.


Thanks,

Swapan Shridhar



Re: Review Request 58634: HDP 3.0 support for HBase with configs, kerberos, widgets, metrics, quicklinks, and themes

2017-04-21 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On April 21, 2017, 11:34 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58634/
> ---
> 
> (Updated April 21, 2017, 11:34 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Swapan Shridhar, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-20326
> https://issues.apache.org/jira/browse/AMBARI-20326
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> HDP 3.0 support for Hbase with configs, kerberos, widgets, metrics, 
> quicklinks, and themes.'
> 
> Flatten from HDP 2.0.6 - 2.6 into common-services, and reference in HDP 3.0.
> 
> In HDP 3.0, we have created a new stack definition that does not inherit from 
> other stacks, in order to reduce the complexity of having to analyze older 
> stacks.
> 
> This means that we need to create a service definition (metainfo.xml, 
> configs, kerberos, widgets, metrics, quicklinks, and themes) that is 
> equivalent to what is inherit and deleted from all of the previous stacks.
> 
> A merge needs to account for additions, overrides, and deletions.
> metainfo.xml and configs perform a merge of older versions
> kerberos.json always seems to override the previous file
> Because the bits for this service may not yet be available in the HDP 3.0 
> repo, 
> the task is to ensure that 
> /api/v1/stacks/HDP/versions/2.6/services/HBASE(which uses inheritance) is 
> equivalent to the flattening of 
> /api/v1/stacks/HDP/versions/3.0/services/HBASE .
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/alerts.json 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-env.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-log4j.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-policy.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-site.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-audit.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-plugin-properties.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-policymgr-ssl.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-security.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/kerberos.json
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/metainfo.xml 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/metrics.json 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/draining_servers.rb
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/hbase-smoke-cleanup.sh
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/hbaseSmokeVerify.sh
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/__init__.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/functions.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_client.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_decommission.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_master.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_regionserver.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts

Re: Review Request 58634: HDP 3.0 support for HBase with configs, kerberos, widgets, metrics, quicklinks, and themes

2017-04-21 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On April 21, 2017, 9:41 p.m., Alejandro Fernandez wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58634/
> ---
> 
> (Updated April 21, 2017, 9:41 p.m.)
> 
> 
> Review request for Ambari, Sumit Mohanty, Swapan Shridhar, Sid Wagle, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-20326
> https://issues.apache.org/jira/browse/AMBARI-20326
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> HDP 3.0 support for Hbase with configs, kerberos, widgets, metrics, 
> quicklinks, and themes.'
> 
> Flatten from HDP 2.0.6 - 2.6 into common-services, and reference in HDP 3.0.
> 
> In HDP 3.0, we have created a new stack definition that does not inherit from 
> other stacks, in order to reduce the complexity of having to analyze older 
> stacks.
> 
> This means that we need to create a service definition (metainfo.xml, 
> configs, kerberos, widgets, metrics, quicklinks, and themes) that is 
> equivalent to what is inherit and deleted from all of the previous stacks.
> 
> A merge needs to account for additions, overrides, and deletions.
> metainfo.xml and configs perform a merge of older versions
> kerberos.json always seems to override the previous file
> Because the bits for this service may not yet be available in the HDP 3.0 
> repo, 
> the task is to ensure that 
> /api/v1/stacks/HDP/versions/2.6/services/HBASE(which uses inheritance) is 
> equivalent to the flattening of 
> /api/v1/stacks/HDP/versions/3.0/services/HBASE .
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/alerts.json 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-env.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-log4j.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-policy.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/hbase-site.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-audit.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-plugin-properties.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-policymgr-ssl.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/configuration/ranger-hbase-security.xml
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/kerberos.json
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/metainfo.xml 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/metrics.json 
> PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/draining_servers.rb
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/hbase-smoke-cleanup.sh
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/files/hbaseSmokeVerify.sh
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/__init__.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/functions.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_client.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_decommission.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_master.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts/hbase_regionserver.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/2.0.0.3.0/package/scripts

Re: Review Request 58437: AMBARI-20763. Update YARN's ATS configs 'apptimelineserver_heapsize' and 'yarn.timeline-service.entity-group-fs-store.app-cache-size' logic in 2.6.

2017-04-13 Thread Swapan Shridhar

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

(Updated April 13, 2017, 11:08 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

Updated 'display name' and 'description' for 'apptimelineserver_heapsize'


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


Repository: ambari


Description
---

In 2.6, update the following YARN configs related to ATS:

- **'yarn.timeline-service.entity-group-fs-store.app-cache-size'** on cluster 
initialization/creation based on host memory.
- **'apptimelineserver_heapsize'** on : (1). cluster initialization/creation 
and/or (2). when a change is detected in value for 
'yarn.timeline-service.entity-group-fs-store.app-cache-size', using formula:
   
  ats_heapsize = long(min(math.floor(host_mem/2), 
long(yarn_timeline_app_cache_size) * 500 + 3072))  // Value in MB


Diffs (updated)
-

  
ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-env.xml
 d04c3c5 
  ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
53ff007 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 8576dcc 
  ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py 5bfa1a9 


Diff: https://reviews.apache.org/r/58437/diff/2/

Changes: https://reviews.apache.org/r/58437/diff/1-2/


Testing
---

Yes, 

- Python UTs added.
- Tested on cluster.


Thanks,

Swapan Shridhar



Re: Review Request 58438: AMBARI-20763. Update YARN's ATS configs 'apptimelineserver_heapsize' and 'yarn.timeline-service.entity-group-fs-store.app-cache-size' logic in 2.6.

2017-04-13 Thread Swapan Shridhar

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

(Updated April 13, 2017, 11:08 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

Updated 'display name' and 'description' for 'apptimelineserver_heapsize'


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


Repository: ambari


Description
---

In 2.6, update the following YARN configs related to ATS:

- **'yarn.timeline-service.entity-group-fs-store.app-cache-size'** on cluster 
initialization/creation based on host memory.
- **'apptimelineserver_heapsize'** on : (1). cluster initialization/creation 
and/or (2). when a change is detected in value for 
'yarn.timeline-service.entity-group-fs-store.app-cache-size', using formula:
   
  ats_heapsize = long(min(math.floor(host_mem/2), 
long(yarn_timeline_app_cache_size) * 500 + 3072))  // Value in MB


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 fc32001 
  
ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-env.xml
 d04c3c5 
  ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
7881917 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 4250681 
  ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py 5bfa1a9 


Diff: https://reviews.apache.org/r/58438/diff/2/

Changes: https://reviews.apache.org/r/58438/diff/1-2/


Testing
---

Yes, 

Python UTs added.
Tested on cluster.


Thanks,

Swapan Shridhar



Review Request 58438: AMBARI-20763. Update YARN's ATS configs 'apptimelineserver_heapsize' and 'yarn.timeline-service.entity-group-fs-store.app-cache-size' logic in 2.6.

2017-04-13 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

In 2.6, update the following YARN configs related to ATS:

- **'yarn.timeline-service.entity-group-fs-store.app-cache-size'** on cluster 
initialization/creation based on host memory.
- **'apptimelineserver_heapsize'** on : (1). cluster initialization/creation 
and/or (2). when a change is detected in value for 
'yarn.timeline-service.entity-group-fs-store.app-cache-size', using formula:
   
  ats_heapsize = long(min(math.floor(host_mem/2), 
long(yarn_timeline_app_cache_size) * 500 + 3072))  // Value in MB


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 fc32001 
  
ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-env.xml
 d04c3c5 
  ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
7881917 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 4250681 
  ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py 5bfa1a9 


Diff: https://reviews.apache.org/r/58438/diff/1/


Testing
---

Yes, 

Python UTs added.
Tested on cluster.


Thanks,

Swapan Shridhar



Review Request 58437: AMBARI-20763. Update YARN's ATS configs 'apptimelineserver_heapsize' and 'yarn.timeline-service.entity-group-fs-store.app-cache-size' logic in 2.6.

2017-04-13 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

In 2.6, update the following YARN configs related to ATS:

- **'yarn.timeline-service.entity-group-fs-store.app-cache-size'** on cluster 
initialization/creation based on host memory.
- **'apptimelineserver_heapsize'** on : (1). cluster initialization/creation 
and/or (2). when a change is detected in value for 
'yarn.timeline-service.entity-group-fs-store.app-cache-size', using formula:
   
  ats_heapsize = long(min(math.floor(host_mem/2), 
long(yarn_timeline_app_cache_size) * 500 + 3072))  // Value in MB


Diffs
-

  
ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-env.xml
 d04c3c5 
  ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
53ff007 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 42047d9 
  ambari-server/src/test/python/stacks/2.6/common/test_stack_advisor.py 5bfa1a9 


Diff: https://reviews.apache.org/r/58437/diff/1/


Testing
---

Yes, 

- Python UTs added.
- Tested on cluster.


Thanks,

Swapan Shridhar



Re: Review Request 57812: HDP 3.0 TP - create Service Advisor for Tez

2017-03-21 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On March 21, 2017, 4:45 p.m., Vitalyi Brodetskyi wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57812/
> ---
> 
> (Updated March 21, 2017, 4:45 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-20520
> https://issues.apache.org/jira/browse/AMBARI-20520
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Create a Service Advisor script for Tez in HDP 3.0 Tech Preview.
> The Service Advisor must encapsulate all of the logic inherited/overwritten 
> from HDP 2.0.6 through HDP 2.6.
> In HDP 3.0, Tez will use the same binary/RPM for both batch and interactive 
> mode.
> However, batch and interactive will use different config files.
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/resources/common-services/TEZ/0.9.0.3.0/service_advisor.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
>  e831d14 
>   ambari-server/src/main/resources/stacks/stack_advisor.py 0b81700 
> 
> 
> Diff: https://reviews.apache.org/r/57812/diff/1/
> 
> 
> Testing
> ---
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Vitalyi Brodetskyi
> 
>



Re: Review Request 57543: When agent retries commands it needs to handle credential store processing correctly

2017-03-13 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On March 12, 2017, 8:12 a.m., Sumit Mohanty wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57543/
> ---
> 
> (Updated March 12, 2017, 8:12 a.m.)
> 
> 
> Review request for Ambari, Madhuvanthi Radhakrishnan, Swapan Shridhar, and 
> Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-20407
> https://issues.apache.org/jira/browse/AMBARI-20407
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> When agent retries commands it needs to handle credential store processing 
> correctly (see bug for more details)
> 
> 
> Diffs
> -
> 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py 15ae03d 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
> ee34685 
>   ambari-agent/src/test/python/ambari_agent/TestActionQueue.py 8701a24 
> 
> 
> Diff: https://reviews.apache.org/r/57543/diff/1/
> 
> 
> Testing
> ---
> 
> Ran unit tests locally
> 
> [INFO] 
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Views .. SUCCESS [4.014s]
> [INFO] utility ... SUCCESS [1.311s]
> [INFO] Ambari Metrics Common . SUCCESS [8.301s]
> [INFO] Ambari Agent .. SUCCESS [1:36.871s]
> [INFO] 
> 
> [INFO] BUILD SUCCESS
> 
> 
> Thanks,
> 
> Sumit Mohanty
> 
>



Re: Review Request 56189: AMBARI-19827. HiveServer2 Interactive won't start in clusters with less memory.

2017-03-07 Thread Swapan Shridhar


> On Feb. 9, 2017, 7:22 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
> > Lines 919 (patched)
> > <https://reviews.apache.org/r/56189/diff/3/?file=1627962#file1627962line920>
> >
> > This change is also needed for YARN's Service Advisor in 3.0.0.3.0

Done as part of "AMBARI-20281" for trunk.


- Swapan


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


On Feb. 8, 2017, 11:57 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56189/
> ---
> 
> (Updated Feb. 8, 2017, 11:57 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-19827
> https://issues.apache.org/jira/browse/AMBARI-19827
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> HSI caluclations fails on cluster with small memory. Fixed the calulations 
> for that.
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
> 22d50e3 
>   ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 
> 9029dbb 
> 
> 
> Diff: https://reviews.apache.org/r/56189/diff/3/
> 
> 
> Testing
> ---
> 
> Python UT tests fixed and Passes.
> Tested on cluster.
> 
> 
> Thanks,
> 
> Swapan Shridhar
> 
>



Re: Review Request 57263: Fix values of ATS config params for HDP stack

2017-03-03 Thread Swapan Shridhar

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


Ship it!




Ship It!

- Swapan Shridhar


On March 3, 2017, 1:30 a.m., Sumit Mohanty wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57263/
> ---
> 
> (Updated March 3, 2017, 1:30 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Swapan Shridhar.
> 
> 
> Bugs: AMBARI-20284
> https://issues.apache.org/jira/browse/AMBARI-20284
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Fix values of ATS config params for HDP stack
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml 
> 000e902 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
>  7c9fb67 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml 
> 9f3f42d 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml 
> 8b00b05 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
>  c2e185d 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml 
> edc227a 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
> da036cf 
>   
> ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
>  f232118 
>   ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
> f0a4f05 
>   
> ambari-server/src/main/resources/stacks/HDP/2.6/services/YARN/configuration/yarn-site.xml
>  70a2cbe 
> 
> 
> Diff: https://reviews.apache.org/r/57263/diff/1/
> 
> 
> Testing
> ---
> 
> Ran all unit tests and manually tested through EU.
> 
> 
> Thanks,
> 
> Sumit Mohanty
> 
>



Review Request 57258: AMBARI-20279. HiveServerInteractive. Set value for "num_llap_nodes_for_llap_daemons" only if it exists in hive-interactive-site.

2017-03-02 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

Given that "num_llap_nodes_for_llap_daemons" only exists in 2.6 HDP stack, 
there can be a scenario  where "num_llap_nodes_for_llap_daemons" doesnt exist 
in hive-interactive-site. This can happen if we upgrade from Ambari 2.4 (with 
HDP 2.5) to Ambari 2.5.

**Fix:** Set this config in SA only if it present in hive-interactive-env.


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 3629f30 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
a450d4d 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py 2d7bcd3 


Diff: https://reviews.apache.org/r/57258/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 57256: Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP.

2017-03-02 Thread Swapan Shridhar

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

(Updated March 2, 2017, 9:43 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP 
from following bugs:

1. AMBARI-19827
2. AMBARI-19760
3. AMBARI-19686
4. AMBARI-19814
5. AMBARI-19971
6. AMBARI-19760


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 18938a3 


Diff: https://reviews.apache.org/r/57256/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 57256: Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP.

2017-03-02 Thread Swapan Shridhar

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

(Updated March 2, 2017, 9:29 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description (updated)
---

Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP 
from following bugs:

1. AMBARI-19827
2. AMBARI-19760
3. AMBARI-19686
4. AMBARI-19814
5. AMBARI-19971
6. AMBARI-19760


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 18938a3 


Diff: https://reviews.apache.org/r/57256/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Re: Review Request 57256: Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP.

2017-03-02 Thread Swapan Shridhar

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

(Updated March 2, 2017, 9:29 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

Updated Summary.


Summary (updated)
-

Porting changes made in 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP.


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


Repository: ambari


Description
---

Porting changes made 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP. 
from following bugs:

1. AMBARI-19827
2. AMBARI-19760
3. AMBARI-19686
4. AMBARI-19814
5. AMBARI-19971
6. AMBARI-19760


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 18938a3 


Diff: https://reviews.apache.org/r/57256/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Review Request 57256: ADDENDUM. AMBARI-19827. HiveServer2 Interactive won't start in clusters with less memory. (changes for service_advisor).

2017-03-02 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

Porting changes made 2.5/stack_advisor to 3.0/YARN/service_advisor for LLAP. 
from following bugs:

1. AMBARI-19827
2. AMBARI-19760
3. AMBARI-19686
4. AMBARI-19814
5. AMBARI-19971
6. AMBARI-19760


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 18938a3 


Diff: https://reviews.apache.org/r/57256/diff/1/


Testing
---


Thanks,

Swapan Shridhar



Review Request 57128: AMBARI-20225. Take care of hive-interactive-site's 'hive.tez.container.size' config during HDP upgrade from 2.5 to 2.6 and update default value for tez-interactive-site's config

2017-02-28 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

**Background :**
**--** 

We are dealing with 2 specific configs here. 
**(1).** 'tez.am.resource.memory.mb' for tez-interactive-site and 
**(2).** 'hive.tez.container.size' for hive-interactive-site. 

- 'tez.am.resource.memory.mb' already exists in tez-interactive-site from 
Ambari-2.4 onwards and recently its default value had been changed to 
'SET_ON_FIRST_INVOCATION' in its hive-interacive-site.
- 'hive.tez.container.size' was inherited and used from Hive1/hive-site in 
Ambari 2.4. Starting from Ambari 2.5, it was added as a config explicitly in 
hive-interactive-site with a default value of 'SET_ON_FIRST_INVOCATION'.

The non-standard 'SET_ON_FIRST_INVOCATION' was introduced, so as to give a hint 
in Stack Advisor (SA) call for the 1st time on Hive Server Interactive ON 
(enable_hive_interactive config), so that config values for both can be 
calculated and set for the 1st time. Subsequesnt calls in the lifecycle, will 
just read the value set by SA or if later changed by user manually.

**Problem :**
**-**

'SET_ON_FIRST_INVOCATION', being non-standard was breaking the code in upgrade 
scenario. 

**Fix:** 
****

Removing the use of 'SET_ON_FIRST_INVOCATION' and adding code for correct 
behavior of configs during HDP upgrade.
 
**Possible scenarios:**
**--**

**1. Ambari upgrade from 2.4 - > 2.5 having HDP 2.5. Implying 
2.5/stack_advisor.py code would have been updated with new LLAP GA logic.**
   - 'tez.am.resource.memory.mb' will already be there whether Hive Server 
Interactive (HSI) is ON or OFF after Ambari upgrade. 
  - If HSI if OFF before the upgrade was done, nothing to do over there.
  - If HSI on ON before AMbari upgrade, or is made ON after Ambari upgrade, 
SA logic has been updated to take of reading 'hive.tez.container.size' from 
hive-site as it wont exist in hive-interactive-site at this point. It will show 
up in hive-interative-site aftre the HDP upgrade to 2.6


**2. Ambari 2.4 having HDP 2.5 -> Upgrade to Ambari 2.5 -> Upgraded to HDP 2.6**
   - 'tez.am.resource.memory.mb' will already be there
   - As part of HDP 2.5 upgrade to HDP 2.6, 'hive.tez.container.size' would 
have got added, having current value picked from 
hive-site/hive.tez.container.size. SA code carries a calculation logic for 
config 'hive.tez.container.size', which is bound to yield different value 
compared to hive-site/'hive.tez.container.size'. The config's value will get 
updated/caluclated (1). when HSI is made ON (meaning 'enabled_hive_interactive' 
config detected as **True** in changed-configurations).
 
**3. Ambari 2.5 with HDP 2.5 -> Upgraded to HDP 2.6**
   - Both 'hive.tez.container.size' and 'tez.am.resource.memory.mb' (alreday 
present at HDP 2.5 in hive-interactive-site) will exist after the HDP upgrade.


**Note** that a fresh value for 'hive.tez.container.size' and 
'tez.am.resource.memory.mb' is caluclated at below conditions:

(1). when HSI is made ON, meaning 'enabled_hive_interactive' config detected as 
**True** in changed-configurations, or
(2). it's a cluster create operation, where HSI also is supposed to be started. 
(BP scenario)


Diffs
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 e1e03c1 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-site.xml
 8008bef 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/tez-interactive-site.xml
 1c5117e 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
6f3dfa7 
  ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
da334be 
  
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 d396033 
  ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
c01d11e 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py cf1c0ee 

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


Testing
---

Manually tested on cluster.


Thanks,

Swapan Shridhar



Review Request 56802: AMBARI-20072. Add heap dump option for tez-site config 'tez.am.launch.cmd-opts'.

2017-02-17 Thread Swapan Shridhar

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

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


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


Repository: ambari


Description
---

- Adding heap dump option for tez-site config 'tez.am.launch.cmd-opts'.
- The work done here is on same lines as the work done in BUG : AMBARI-19138 
and AMBARI-19574(upgrade code) for adding Tez config : 
'tez.task.launch.cmd-opts'


Diffs
-

  ambari-server/src/main/resources/stacks/HDP/2.3/services/stack_advisor.py 
30cbc7c 
  ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml 
7236186 
  
ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
 4fb68ed 
  ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml 
0a02734 
  ambari-server/src/main/resources/stacks/HDP/2.6/services/stack_advisor.py 
d8413b6 

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


Testing
---

Manually tested on cluster for fresh install.


Thanks,

Swapan Shridhar



Re: Review Request 56718: AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them the following configs for recommendation : (1). 'llap_concurrency', (2). 'llap_concurrency' max

2017-02-15 Thread Swapan Shridhar


> On Feb. 15, 2017, 8:53 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py, 
> > line 1037
> > <https://reviews.apache.org/r/56718/diff/1/?file=1634858#file1634858line1037>
> >
> > Please also make this change in YARN 3.0.0.3.0's service advisor.

Done.


- Swapan


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


On Feb. 15, 2017, 8:47 p.m., Swapan Shridhar wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56718/
> ---
> 
> (Updated Feb. 15, 2017, 8:47 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-20033
> https://issues.apache.org/jira/browse/AMBARI-20033
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them 
> the following configs for recommendation : (1). 'llap_concurrency', (2). 
> 'llap_concurrency' max value and (3). 'hive.llap.daemon.num.executors' max 
> value.
> 
> 
> Diffs
> -
> 
>   ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
> 4de9a41 
> 
> Diff: https://reviews.apache.org/r/56718/diff/
> 
> 
> Testing
> ---
> 
> Tested on cluster
> Python UT passes.
> 
> 
> Thanks,
> 
> Swapan Shridhar
> 
>



Re: Review Request 56718: AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them the following configs for recommendation : (1). 'llap_concurrency', (2). 'llap_concurrency' max

2017-02-15 Thread Swapan Shridhar

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

(Updated Feb. 15, 2017, 9:21 p.m.)


Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


Changes
---

Updated changed in Service Advisor.


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


Repository: ambari


Description
---

AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them 
the following configs for recommendation : (1). 'llap_concurrency', (2). 
'llap_concurrency' max value and (3). 'hive.llap.daemon.num.executors' max 
value.


Diffs (updated)
-

  
ambari-server/src/main/resources/common-services/YARN/3.0.0.3.0/service_advisor.py
 aecf1e3 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
4de9a41 

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


Testing
---

Tested on cluster
Python UT passes.


Thanks,

Swapan Shridhar



Review Request 56718: AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them the following configs for recommendation : (1). 'llap_concurrency', (2). 'llap_concurrency' max valu

2017-02-15 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez and Sumit Mohanty.


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


Repository: ambari


Description
---

AMBARI-20033. Typecasting to 'long' from earlier 'float', before setting them 
the following configs for recommendation : (1). 'llap_concurrency', (2). 
'llap_concurrency' max value and (3). 'hive.llap.daemon.num.executors' max 
value.


Diffs
-

  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
4de9a41 

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


Testing
---

Tested on cluster
Python UT passes.


Thanks,

Swapan Shridhar



Review Request 56608: AMBARI-19995. Improve logging for HSI's llapstatus command polling.

2017-02-14 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez, Sumit Mohanty, and Siddharth 
Seth.


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


Repository: ambari


Description
---

AMBARI-19995. Improve logging for HSI's llapstatus command polling.


Diffs
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 2ab48ae 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/llap-cli-log4j2.xml
 a40c200 

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


Testing
---

Yes, tested on cluster.
Python UT passes.


Thanks,

Swapan Shridhar



Review Request 56563: AMBARI-19971. HiveServerInteractive. (1). Use the correct value for Node(s) used for running LLAP Daemon(s). (2). Set 'num_llap_nodes' calculated value only for non Ambari manage

2017-02-10 Thread Swapan Shridhar

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

Review request for Ambari, Alejandro Fernandez, Sumit Mohanty, and Siddharth 
Seth.


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


Repository: ambari


Description
---

**(1). Use the correct value for Node(s) used for running LLAP Daemon(s).** 

- **Existing :** While starting LLAP, it was not taken into account removing 
the Nodes used for SLider and Tez AM from 'num_llap_nodes' value, before using 
it for starting LLAP by passing 'num_llap_nodes''s value to --instances 
parameter.
- **Fix:** Introduced new config 'num_llap_nodes_for_llap_daemons' which has 
the updated value substracting the nodes used by Tez and SLider AM's.


**(2). Set 'num_llap_nodes' calculated value only for non Ambari managed 
queue.**

**Fix:** With AMBARI-19814 patch, UI shows 'num_llap_nodes' slider as READ only 
for non Ambari managed queue for LLAP. We will be setting the calculated 
'num_llap_nodes' slider value only for non-Ambari managed queue. For Ambari 
managed queue named 'llap', user has the liberty of entering the value. We may 
end up using less nodes than that, as part of calculation, but we dont want to 
override the User entered value.


Diffs
-

  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hive_server_interactive.py
 1f1d9a8 
  
ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/params_linux.py
 a5618ca 
  
ambari-server/src/main/resources/stacks/HDP/2.5/services/HIVE/configuration/hive-interactive-env.xml
 e636e0c 
  ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py 
99b6776 
  
ambari-server/src/main/resources/stacks/HDP/2.6/services/HIVE/configuration/hive-interactive-env.xml
 af656f4 
  ambari-server/src/test/python/stacks/2.5/common/test_stack_advisor.py ec56bad 

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


Testing
---

- Python UT's updated. Passes.
- 
- Tested on cluster manually.

Test where 'num_llap_nodes_for_llap_daemons' caluclated is different from 
'num_llap_nodes'
==

- YARN min container size and YARN NM node size : 12 GB 
- 'num_llap_nodes_for_llap_daemons' can be <= 'num_llap_nodes'.

**Screenshot showing 'num_llap_nodes'** : num_llap_nodes.png
**Screenshot showing 'num_llap_nodes_for_llap_daemons'** : 
num_llap_nodes_for_llap_daemons.png 


'num_llap_nodes_for_llap_daemons' config value is used as value for 
"--instances" in below comamnd, used to start LLAP.

===

/usr/hdp/current/hive-server2-hive2/bin/hive --service llap 
--slider-am-container-mb 12288 --size 12288m --cache 9216m --xmx 2457m 
--loglevel INFO  --output 
/var/lib/ambari-agent/tmp/llap-slider2017-02-10_21-31-47 --slider-placement 0 
--skiphadoopversion --skiphbasecp --instances 3 --logger query-routing --args " 
-XX:+AlwaysPreTouch -XX:+UseG1GC -XX:TLABSize=8m -XX:+ResizeTLAB -XX:+UseNUMA 
-XX:+AggressiveOpts -XX:InitiatingHeapOccupancyPercent=80 
-XX:MaxGCPauseMillis=200 -XX:MetaspaceSize=1024m"
===
===


File Attachments


num_llap_nodes
  
https://reviews.apache.org/media/uploaded/files/2017/02/10/a0c9e06f-1f1e-4ac4-bff7-e0900e4ad599__Screen_Shot_2017-02-10_at_1.43.45_PM.png
num_llap_nodes_for_llap_daemons
  
https://reviews.apache.org/media/uploaded/files/2017/02/10/fc9ff535-e4b7-4085-b39d-0b4951a4d176__Screen_Shot_2017-02-10_at_1.44.23_PM.png


Thanks,

Swapan Shridhar



  1   2   3   4   >