You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by bhuvnesh chaudhary <bc...@pivotal.io> on 2015/11/25 01:54:11 UTC
Review Request 40682: PXF should get secured when security is enabled
on cluster via kerberos wizard on ambari
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/
-----------------------------------------------------------
Review request for Ambari, jun aoki and Oleksandr Diachenko.
Bugs: AMBARI-14053
https://issues.apache.org/jira/browse/AMBARI-14053
Repository: ambari
Description
-------
PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
Diffs
-----
ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
Diff: https://reviews.apache.org/r/40682/diff/
Testing
-------
yes
Thanks,
bhuvnesh chaudhary
Re: Review Request 40682: PXF should get secured when security is
enabled on cluster via kerberos wizard on ambari
Posted by Alexandr Antonenko <hi...@gmail.com>.
> On Nov. 25, 2015, 1:11 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py, line 106
> > <https://reviews.apache.org/r/40682/diff/1/?file=1139399#file1139399line106>
> >
> > I noticed ConfigDictionary is used before it is passed to one of Resources (in this case XmlConfig). I know ConfigDictionary is to make a dictionary immutable. But Is it necessary for this use case?
>
> bhuvnesh chaudhary wrote:
> Not necessary, tested without it as well it works. Checked couple of instances in the code where whenever a json is read or config is read, it was made immutable by ConfigDictionary probably to avoid further modification of the dictionary, thus used ConfigDictionary.
> example
> ambari-common/src/main/python/resource_management/libraries/script/script.py: Script.config = ConfigDictionary(json.load(f))
> ambari-server/src/main/resources/scripts/Ambaripreupload.py: hdfs_site = ConfigDictionary({'dfs.webhdfs.enabled':False,
> may be someone in the community can comment on the preference / usage of ConfigDictionary.
>
> jun aoki wrote:
> Thanks Bhuvnesh.
> Does anyone insightful know a reason why it MUST be ConfigDictionary, or it can be a regular dictionary? And especially want to see why this particular dictionary has to be immutable, or does not have to be.
Hi Jun. Using ConfigDictionary is a matter of design, it's immutable to be able to prevent developer errors where it's possible. In this particular case we can use dict as well, but it will be inconsistent with current codebase so it's better to stick with current approach.
- Alexandr
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/#review107884
-----------------------------------------------------------
On Nov. 25, 2015, 1:16 a.m., bhuvnesh chaudhary wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40682/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2015, 1:16 a.m.)
>
>
> Review request for Ambari, Alejandro Fernandez, jun aoki, and Oleksandr Diachenko.
>
>
> Bugs: AMBARI-14053
> https://issues.apache.org/jira/browse/AMBARI-14053
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
>
> Diff: https://reviews.apache.org/r/40682/diff/
>
>
> Testing
> -------
>
> yes
>
>
> Thanks,
>
> bhuvnesh chaudhary
>
>
Re: Review Request 40682: PXF should get secured when security is
enabled on cluster via kerberos wizard on ambari
Posted by jun aoki <ju...@gmail.com>.
> On Nov. 25, 2015, 1:11 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py, line 106
> > <https://reviews.apache.org/r/40682/diff/1/?file=1139399#file1139399line106>
> >
> > I noticed ConfigDictionary is used before it is passed to one of Resources (in this case XmlConfig). I know ConfigDictionary is to make a dictionary immutable. But Is it necessary for this use case?
>
> bhuvnesh chaudhary wrote:
> Not necessary, tested without it as well it works. Checked couple of instances in the code where whenever a json is read or config is read, it was made immutable by ConfigDictionary probably to avoid further modification of the dictionary, thus used ConfigDictionary.
> example
> ambari-common/src/main/python/resource_management/libraries/script/script.py: Script.config = ConfigDictionary(json.load(f))
> ambari-server/src/main/resources/scripts/Ambaripreupload.py: hdfs_site = ConfigDictionary({'dfs.webhdfs.enabled':False,
> may be someone in the community can comment on the preference / usage of ConfigDictionary.
Thanks Bhuvnesh.
Does anyone insightful know a reason why it MUST be ConfigDictionary, or it can be a regular dictionary? And especially want to see why this particular dictionary has to be immutable, or does not have to be.
- jun
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/#review107884
-----------------------------------------------------------
On Nov. 25, 2015, 1:16 a.m., bhuvnesh chaudhary wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40682/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2015, 1:16 a.m.)
>
>
> Review request for Ambari, Alejandro Fernandez, jun aoki, and Oleksandr Diachenko.
>
>
> Bugs: AMBARI-14053
> https://issues.apache.org/jira/browse/AMBARI-14053
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
>
> Diff: https://reviews.apache.org/r/40682/diff/
>
>
> Testing
> -------
>
> yes
>
>
> Thanks,
>
> bhuvnesh chaudhary
>
>
Re: Review Request 40682: PXF should get secured when security is
enabled on cluster via kerberos wizard on ambari
Posted by bhuvnesh chaudhary <bc...@pivotal.io>.
> On Nov. 25, 2015, 1:11 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py, line 106
> > <https://reviews.apache.org/r/40682/diff/1/?file=1139399#file1139399line106>
> >
> > I noticed ConfigDictionary is used before it is passed to one of Resources (in this case XmlConfig). I know ConfigDictionary is to make a dictionary immutable. But Is it necessary for this use case?
Not necessary, tested without it as well it works. Checked couple of instances in the code where whenever a json is read or config is read, it was made immutable by ConfigDictionary probably to avoid further modification of the dictionary, thus used ConfigDictionary.
example
ambari-common/src/main/python/resource_management/libraries/script/script.py: Script.config = ConfigDictionary(json.load(f))
ambari-server/src/main/resources/scripts/Ambaripreupload.py: hdfs_site = ConfigDictionary({'dfs.webhdfs.enabled':False,
may be someone in the community can comment on the preference / usage of ConfigDictionary.
- bhuvnesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/#review107884
-----------------------------------------------------------
On Nov. 25, 2015, 12:54 a.m., bhuvnesh chaudhary wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40682/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2015, 12:54 a.m.)
>
>
> Review request for Ambari, jun aoki and Oleksandr Diachenko.
>
>
> Bugs: AMBARI-14053
> https://issues.apache.org/jira/browse/AMBARI-14053
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
>
> Diff: https://reviews.apache.org/r/40682/diff/
>
>
> Testing
> -------
>
> yes
>
>
> Thanks,
>
> bhuvnesh chaudhary
>
>
Re: Review Request 40682: PXF should get secured when security is
enabled on cluster via kerberos wizard on ambari
Posted by bhuvnesh chaudhary <bc...@pivotal.io>.
> On Nov. 25, 2015, 1:11 a.m., jun aoki wrote:
> > ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py, line 106
> > <https://reviews.apache.org/r/40682/diff/1/?file=1139399#file1139399line106>
> >
> > I noticed ConfigDictionary is used before it is passed to one of Resources (in this case XmlConfig). I know ConfigDictionary is to make a dictionary immutable. But Is it necessary for this use case?
>
> bhuvnesh chaudhary wrote:
> Not necessary, tested without it as well it works. Checked couple of instances in the code where whenever a json is read or config is read, it was made immutable by ConfigDictionary probably to avoid further modification of the dictionary, thus used ConfigDictionary.
> example
> ambari-common/src/main/python/resource_management/libraries/script/script.py: Script.config = ConfigDictionary(json.load(f))
> ambari-server/src/main/resources/scripts/Ambaripreupload.py: hdfs_site = ConfigDictionary({'dfs.webhdfs.enabled':False,
> may be someone in the community can comment on the preference / usage of ConfigDictionary.
>
> jun aoki wrote:
> Thanks Bhuvnesh.
> Does anyone insightful know a reason why it MUST be ConfigDictionary, or it can be a regular dictionary? And especially want to see why this particular dictionary has to be immutable, or does not have to be.
>
> Alexandr Antonenko wrote:
> Hi Jun. Using ConfigDictionary is a matter of design, it's immutable to be able to prevent developer errors where it's possible. In this particular case we can use dict as well, but it will be inconsistent with current codebase so it's better to stick with current approach.
Thank you Alexandr for the info.
- bhuvnesh
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/#review107884
-----------------------------------------------------------
On Nov. 25, 2015, 1:16 a.m., bhuvnesh chaudhary wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40682/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2015, 1:16 a.m.)
>
>
> Review request for Ambari, Alejandro Fernandez, jun aoki, and Oleksandr Diachenko.
>
>
> Bugs: AMBARI-14053
> https://issues.apache.org/jira/browse/AMBARI-14053
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
>
> Diff: https://reviews.apache.org/r/40682/diff/
>
>
> Testing
> -------
>
> yes
>
>
> Thanks,
>
> bhuvnesh chaudhary
>
>
Re: Review Request 40682: PXF should get secured when security is
enabled on cluster via kerberos wizard on ambari
Posted by jun aoki <ju...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40682/#review107884
-----------------------------------------------------------
ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py (line 106)
<https://reviews.apache.org/r/40682/#comment167219>
I noticed ConfigDictionary is used before it is passed to one of Resources (in this case XmlConfig). I know ConfigDictionary is to make a dictionary immutable. But Is it necessary for this use case?
- jun aoki
On Nov. 25, 2015, 12:54 a.m., bhuvnesh chaudhary wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40682/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2015, 12:54 a.m.)
>
>
> Review request for Ambari, jun aoki and Oleksandr Diachenko.
>
>
> Bugs: AMBARI-14053
> https://issues.apache.org/jira/browse/AMBARI-14053
>
>
> Repository: ambari
>
>
> Description
> -------
>
> PXF should get secured when security is enabled on cluster via kerberos wizard on ambari. Need to add kerberos.json and the relevant code.
>
>
> Diffs
> -----
>
> ambari-server/src/main/resources/common-services/PXF/3.0.0/kerberos.json PRE-CREATION
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/params.py a4986c9
> ambari-server/src/main/resources/common-services/PXF/3.0.0/package/scripts/pxf.py dd0031c
>
> Diff: https://reviews.apache.org/r/40682/diff/
>
>
> Testing
> -------
>
> yes
>
>
> Thanks,
>
> bhuvnesh chaudhary
>
>