-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27435/
-----------------------------------------------------------
Review request for Ambari, Jonathan Hurley and Nate Cole.
Bugs: AMBARI-8069
https://issues.apache.org/jira/browse/AMBARI-8069
Repository: ambari
Description
-------
The view registry lazily caches the sub-resources of each view/version. If a
request for the sub-resources is made before the view is fully deployed, the
cached set of sub-resource may be incomplete.
STR:
1. deployed a view
2. created an instance
3. stopped server, deleted JAR and work dir
4. put jar in place, start server
5. deploy occurs
6. when deploy is complete, in the admin ui, the existing instance (from step
#2) shows up
7. i click on the instance and it fails (get a 400). No errors in logs
{code}
http://c6401.ambari.apache.org:8080/api/v1/views/FILES/versions/0.1.0/instances/FILES_1?_=1414708973511&fields=privileges%2FPrivilegeInfo,ViewInstanceInfo,resources
{code}
{code}
{
"status" : 400,
"message" : "The properties [resources] specified in the request or predicate
are not supported for the resource type ViewInstance."
}
{code}
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
b53147b
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
f2173ac
ambari-server/src/test/java/org/apache/ambari/server/view/ViewRegistryTest.java
1bd47f3
Diff: https://reviews.apache.org/r/27435/diff/
Testing
-------
Manually tested the steps above.
All tests pass ...
Results :
Tests run: 2126, Failures: 0, Errors: 0, Skipped: 15
...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18:54 min
[INFO] Finished at: 2014-10-31T14:09:54-04:00
[INFO] Final Memory: 39M/334M
[INFO] ------------------------------------------------------------------------
Thanks,
Tom Beerbower