> On March 4, 2016, 7:36 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java,
> >  line 953
> > <https://reviews.apache.org/r/42032/diff/1/?file=1186442#file1186442line953>
> >
> >     I believe this can lead to more confusion.
> >     Especially if it is to be used by View X but not by View y.
> 
> Greg Hill wrote:
>     Any view that wants to use the API uses this method, as far as I can 
> tell.  I don't think there is any other method for getting the API hostname 
> in the Ambari codebase.  At lesat I couldn't find one. Most of the views 
> don't use the API, but a few do.  The rest just worked out of the box.
> 
> Alejandro Fernandez wrote:
>     Greg, I think the best way to handle this is to use another approach that 
> will only impact the views that want to consume it.
>     E.g., come up with another attribute such as "local_name" in something 
> like /api/v1/server 
>     Changing the hostname that the server returns globally just sounds like 
> it will cause more grief than benefit.

So, masterHostname is only used by 
AmbariManagementControllerImpl.getAmbariServerURI(), which denotes that it's 
specifically for getting a URI, not a system hostname.  Other code that wants 
the hostname does not call this method, only the views currently call this 
method.  But say some new code comes along that needs the URI for the server, I 
want that to always return the FQDN and not the local hostname, which makes 
this the desired change.  I could rename the config option to be more clear if 
that would help.  server.uri.fqdn maybe?


- Greg


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


On Jan. 7, 2016, 8:23 p.m., Greg Hill wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42032/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2016, 8:23 p.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-12916
>     https://issues.apache.org/jira/browse/AMBARI-12916
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This lets you configure the hostname that the Ambari server passes to the 
> views and agent so you can specify it differently from the system hostname.  
> This is useful in cases where you want to use a fqdn for API access but a 
> local hostname for local cluster communication.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
>  371d5d2 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  a7f206a 
> 
> Diff: https://reviews.apache.org/r/42032/diff/
> 
> 
> Testing
> -------
> 
> Honestly, not much.  There weren't any existing unit tests for the code I 
> modified and I'm not a Java developer so I didn't really know where to start 
> with creating them.  It's a pretty simple change and doesn't break any 
> existing tests, but I'm happy to do some more testing if someone can provide 
> some direction.
> 
> 
> Thanks,
> 
> Greg Hill
> 
>

Reply via email to