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