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