You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Robert Levas <rl...@hortonworks.com> on 2016/03/01 00:57:35 UTC

Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

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

Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.


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


Repository: ambari


Description
-------

Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 

#`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
```
  ...
  "jce_policy" : {
    "unlimited_key": "true",
    ...
  },
  "ciphers" : {
    ...
  }
  ...
```


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java 0f16966 
  ambari-server/src/main/resources/properties.json 01c15f2 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java 1b742af 

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


Testing
-------

Manually tested

# Jenkins test results: PENDING


Thanks,

Robert Levas


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On March 1, 2016, 2:08 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java, line 125
> > <https://reviews.apache.org/r/44188/diff/1/?file=1274878#file1274878line125>
> >
> >     Probably not queried often, but can't this data be cached after first retrieval? It can't change in the running VM, can it?
> 
> Robert Levas wrote:
>     It can be cached, but I thought that it would be best to re-query for the data rather and eat up some cycles rather than hold on to memory for data that will be rarely querried for.  If we this this is an issue, I can try to return the data only if explicitly asked for.

The web client's model is to query the same endpoints until the end of time. In some cases, they batch their queries together, so that if a single resource provider held up the request, the entire web client would hang. I don't know how expensive this logic is; if we're talking millis, then it's probably fine. But if this stuff takes on the order of 500ms to 1s, then it's probably best to cache it. 

Your call; thought I'd point it out.


- Jonathan


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


On March 1, 2016, 11:26 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44188/
> -----------------------------------------------------------
> 
> (Updated March 1, 2016, 11:26 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15232
>     https://issues.apache.org/jira/browse/AMBARI-15232
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 
> 
> #`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
> ```
>   ...
>   "jce_policy" : {
>     "unlimited_key": "true",
>     ...
>   },
>   "ciphers" : {
>     ...
>   }
>   ...
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java 0f16966 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java 1b742af 
> 
> Diff: https://reviews.apache.org/r/44188/diff/
> 
> 
> Testing
> -------
> 
> Manually tested
> 
> # Jenkins test results: 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 01:34 h
> [INFO] Finished at: 2016-03-01T08:00:41+00:00
> [INFO] Final Memory: 139M/508M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Robert Levas <rl...@hortonworks.com>.

> On March 1, 2016, 2:08 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java, line 125
> > <https://reviews.apache.org/r/44188/diff/1/?file=1274878#file1274878line125>
> >
> >     Probably not queried often, but can't this data be cached after first retrieval? It can't change in the running VM, can it?

It can be cached, but I thought that it would be best to re-query for the data rather and eat up some cycles rather than hold on to memory for data that will be rarely querried for.  If we this this is an issue, I can try to return the data only if explicitly asked for.


> On March 1, 2016, 2:08 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java, lines 172-174
> > <https://reviews.apache.org/r/44188/diff/1/?file=1274878#file1274878line172>
> >
> >     Log it at least? You know that in 2 years, this will be throwing an exception and it'll take you a whole day to figure out what's wrong :)

you are correct.. I will log something here.


- Robert


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


On March 1, 2016, 11:26 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44188/
> -----------------------------------------------------------
> 
> (Updated March 1, 2016, 11:26 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15232
>     https://issues.apache.org/jira/browse/AMBARI-15232
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 
> 
> #`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
> ```
>   ...
>   "jce_policy" : {
>     "unlimited_key": "true",
>     ...
>   },
>   "ciphers" : {
>     ...
>   }
>   ...
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java 0f16966 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java 1b742af 
> 
> Diff: https://reviews.apache.org/r/44188/diff/
> 
> 
> Testing
> -------
> 
> Manually tested
> 
> # Jenkins test results: 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 01:34 h
> [INFO] Finished at: 2016-03-01T08:00:41+00:00
> [INFO] Final Memory: 139M/508M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44188/#review121465
-----------------------------------------------------------


Ship it!





ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java (line 124)
<https://reviews.apache.org/r/44188/#comment183175>

    Probably not queried often, but can't this data be cached after first retrieval? It can't change in the running VM, can it?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java (lines 171 - 173)
<https://reviews.apache.org/r/44188/#comment183174>

    Log it at least? You know that in 2 years, this will be throwing an exception and it'll take you a whole day to figure out what's wrong :)


- Jonathan Hurley


On March 1, 2016, 11:26 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44188/
> -----------------------------------------------------------
> 
> (Updated March 1, 2016, 11:26 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15232
>     https://issues.apache.org/jira/browse/AMBARI-15232
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 
> 
> #`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
> ```
>   ...
>   "jce_policy" : {
>     "unlimited_key": "true",
>     ...
>   },
>   "ciphers" : {
>     ...
>   }
>   ...
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java 0f16966 
>   ambari-server/src/main/resources/properties.json 01c15f2 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java 1b742af 
> 
> Diff: https://reviews.apache.org/r/44188/diff/
> 
> 
> Testing
> -------
> 
> Manually tested
> 
> # Jenkins test results: 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 01:34 h
> [INFO] Finished at: 2016-03-01T08:00:41+00:00
> [INFO] Final Memory: 139M/508M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Oliver Szabo <os...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44188/#review122069
-----------------------------------------------------------


Ship it!




Ship It!

- Oliver Szabo


On March 4, 2016, 10:17 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44188/
> -----------------------------------------------------------
> 
> (Updated March 4, 2016, 10:17 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15232
>     https://issues.apache.org/jira/browse/AMBARI-15232
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 
> 
> #`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
> ```
>   ...
>   "jce_policy" : {
>     "unlimited_key": "true",
>     ...
>   },
>   "ciphers" : {
>     ...
>   }
>   ...
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java ff9b4e4 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProvider.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProviderTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/44188/diff/
> 
> 
> Testing
> -------
> 
> Manually tested
> 
> # Jenkins test results: 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 01:34 h
> [INFO] Finished at: 2016-03-01T08:00:41+00:00
> [INFO] Final Memory: 139M/508M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44188/#review122068
-----------------------------------------------------------


Ship it!




Ship It!

- Jonathan Hurley


On March 4, 2016, 5:17 a.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/44188/
> -----------------------------------------------------------
> 
> (Updated March 4, 2016, 5:17 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-15232
>     https://issues.apache.org/jira/browse/AMBARI-15232
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 
> 
> #`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
> ```
>   ...
>   "jce_policy" : {
>     "unlimited_key": "true",
>     ...
>   },
>   "ciphers" : {
>     ...
>   }
>   ...
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java ff9b4e4 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProvider.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProviderTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/44188/diff/
> 
> 
> Testing
> -------
> 
> Manually tested
> 
> # Jenkins test results: 
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 01:34 h
> [INFO] Finished at: 2016-03-01T08:00:41+00:00
> [INFO] Final Memory: 139M/508M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44188/
-----------------------------------------------------------

(Updated March 4, 2016, 5:17 a.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.


Changes
-------

Reworked patch to perform the work of retrieving and caching the cipher data only upon request and in a PropertyProvider, rather than in the ResourceProvider.


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


Repository: ambari


Description
-------

Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 

#`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
```
  ...
  "jce_policy" : {
    "unlimited_key": "true",
    ...
  },
  "ciphers" : {
    ...
  }
  ...
```


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java ff9b4e4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProvider.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentPropertyProviderTest.java PRE-CREATION 

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


Testing
-------

Manually tested

# Jenkins test results: 

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:34 h
[INFO] Finished at: 2016-03-01T08:00:41+00:00
[INFO] Final Memory: 139M/508M
[INFO] ------------------------------------------------------------------------


Thanks,

Robert Levas


Re: Review Request 44188: Provide details on the JCE policy installed in the JVM used by Ambari

Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/44188/
-----------------------------------------------------------

(Updated March 1, 2016, 11:26 a.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, Oliver Szabo, and Yusaku Sako.


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


Repository: ambari


Description
-------

Provide details on the JCE policy installed in the JVM used by Ambari. This data should be retrievable when querying the REST API 

#`GET /api/v1/services/AMBARI/components/AMBARI_SERVER`
```
  ...
  "jce_policy" : {
    "unlimited_key": "true",
    ...
  },
  "ciphers" : {
    ...
  }
  ...
```


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java 0f16966 
  ambari-server/src/main/resources/properties.json 01c15f2 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java 1b742af 

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


Testing (updated)
-------

Manually tested

# Jenkins test results: 

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:34 h
[INFO] Finished at: 2016-03-01T08:00:41+00:00
[INFO] Final Memory: 139M/508M
[INFO] ------------------------------------------------------------------------


Thanks,

Robert Levas