You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Tom Beerbower <tb...@hortonworks.com> on 2014/02/05 22:21:14 UTC

Review Request 17756: Expose Ambari config properties through View context.

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

Review request for Ambari, Artem Baranchuk and Nate Cole.


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


Repository: ambari


Description
-------

Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.

{code}
/**
   * Get a property for the given key from the ambari configuration.
   *
   * @param key  the property key
   *
   * @return the property value; null indicates that the configuration contains no mapping for the key
   */
  public String getAmbariProperty(String key);
{code}


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
  ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
  ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
  ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 

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


Testing
-------

New unit test added.


Thanks,

Tom Beerbower


Re: Review Request 17756: Expose Ambari config properties through View context.

Posted by Artem Baranchuk <ab...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17756/#review33728
-----------------------------------------------------------

Ship it!


Ship It!

- Artem Baranchuk


On Feb. 5, 2014, 9:21 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17756/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 9:21 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk and Nate Cole.
> 
> 
> Bugs: AMBARI-4538
>     https://issues.apache.org/jira/browse/AMBARI-4538
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.
> 
> {code}
> /**
>    * Get a property for the given key from the ambari configuration.
>    *
>    * @param key  the property key
>    *
>    * @return the property value; null indicates that the configuration contains no mapping for the key
>    */
>   public String getAmbariProperty(String key);
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 
> 
> Diff: https://reviews.apache.org/r/17756/diff/
> 
> 
> Testing
> -------
> 
> New unit test added.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 17756: Expose Ambari config properties through View context.

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17756/#review33732
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Feb. 5, 2014, 4:21 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17756/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 4:21 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk and Nate Cole.
> 
> 
> Bugs: AMBARI-4538
>     https://issues.apache.org/jira/browse/AMBARI-4538
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.
> 
> {code}
> /**
>    * Get a property for the given key from the ambari configuration.
>    *
>    * @param key  the property key
>    *
>    * @return the property value; null indicates that the configuration contains no mapping for the key
>    */
>   public String getAmbariProperty(String key);
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 
> 
> Diff: https://reviews.apache.org/r/17756/diff/
> 
> 
> Testing
> -------
> 
> New unit test added.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 17756: Expose Ambari config properties through View context.

Posted by Nate Cole <nc...@hortonworks.com>.

> On Feb. 5, 2014, 5:41 p.m., Nate Cole wrote:
> > Would there ever be an instance of needing a handle other than a string property?  The Configuration instance has a lot of convenience methods that may otherwise be useful (auth ports, etc etc).  Should the Configuration itself be exposed?
> 
> Tom Beerbower wrote:
>     Thanks Nate. 
>     
>     Maybe we will need to expand on it but right now there is no requirement.  The problem is a dependency issue.  Configuration lives in ambari-server.  ambari-server depends on ambari-views.  ViewContext lives in ambari-views.  So... ViewContext can not depend on Configuration.

Ah, yes.  Ok, sounds good.


- Nate


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


On Feb. 5, 2014, 4:21 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17756/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 4:21 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk and Nate Cole.
> 
> 
> Bugs: AMBARI-4538
>     https://issues.apache.org/jira/browse/AMBARI-4538
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.
> 
> {code}
> /**
>    * Get a property for the given key from the ambari configuration.
>    *
>    * @param key  the property key
>    *
>    * @return the property value; null indicates that the configuration contains no mapping for the key
>    */
>   public String getAmbariProperty(String key);
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 
> 
> Diff: https://reviews.apache.org/r/17756/diff/
> 
> 
> Testing
> -------
> 
> New unit test added.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 17756: Expose Ambari config properties through View context.

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Feb. 5, 2014, 10:41 p.m., Nate Cole wrote:
> > Would there ever be an instance of needing a handle other than a string property?  The Configuration instance has a lot of convenience methods that may otherwise be useful (auth ports, etc etc).  Should the Configuration itself be exposed?

Thanks Nate. 

Maybe we will need to expand on it but right now there is no requirement.  The problem is a dependency issue.  Configuration lives in ambari-server.  ambari-server depends on ambari-views.  ViewContext lives in ambari-views.  So... ViewContext can not depend on Configuration.


- Tom


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


On Feb. 5, 2014, 9:21 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17756/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 9:21 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk and Nate Cole.
> 
> 
> Bugs: AMBARI-4538
>     https://issues.apache.org/jira/browse/AMBARI-4538
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.
> 
> {code}
> /**
>    * Get a property for the given key from the ambari configuration.
>    *
>    * @param key  the property key
>    *
>    * @return the property value; null indicates that the configuration contains no mapping for the key
>    */
>   public String getAmbariProperty(String key);
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 
> 
> Diff: https://reviews.apache.org/r/17756/diff/
> 
> 
> Testing
> -------
> 
> New unit test added.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Re: Review Request 17756: Expose Ambari config properties through View context.

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17756/#review33727
-----------------------------------------------------------


Would there ever be an instance of needing a handle other than a string property?  The Configuration instance has a lot of convenience methods that may otherwise be useful (auth ports, etc etc).  Should the Configuration itself be exposed?

- Nate Cole


On Feb. 5, 2014, 4:21 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17756/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2014, 4:21 p.m.)
> 
> 
> Review request for Ambari, Artem Baranchuk and Nate Cole.
> 
> 
> Bugs: AMBARI-4538
>     https://issues.apache.org/jira/browse/AMBARI-4538
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Views will need to access the Ambari configuration.  Add a method to the view context that exposes the Ambari configuration properties.
> 
> {code}
> /**
>    * Get a property for the given key from the ambari configuration.
>    *
>    * @param key  the property key
>    *
>    * @return the property value; null indicates that the configuration contains no mapping for the key
>    */
>   public String getAmbariProperty(String key);
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 0106c1d 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewDefinition.java 8a60667 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java a653415 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewDefinitionTest.java 5cf871e 
>   ambari-views/src/main/java/org/apache/ambari/view/ViewContext.java 37bf6d5 
> 
> Diff: https://reviews.apache.org/r/17756/diff/
> 
> 
> Testing
> -------
> 
> New unit test added.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>