ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Szabo" <osz...@hortonworks.com>
Subject Re: Review Request 38673: Improve error checking for blueprint resource creation
Date Thu, 24 Sep 2015 15:23:01 GMT

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

(Updated Sept. 24, 2015, 3:23 p.m.)


Review request for Ambari, Robert Levas and Robert Nettleton.


Changes
-------

refactored message & added some tests


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


Repository: ambari


Description
-------

Improve error checking for blueprint resource creation.
----
To avoid NPE during blueprint resource creation (when request body is missing)

Question:
- if this validation is in better place at resource service level, we could include bean-validation
libary and use @NotNull (or something similar) on specific POST methods where needed ... or
a maybe private method enough for BlueprintService to check the body (as like: ClusterService#hasPermission)


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
5fa6655 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
4a5ff46 

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


Testing
-------

Unit testing done.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:24 h
[INFO] Finished at: 2015-09-23T16:47:06+00:00
[INFO] Final Memory: 48M/589M
[INFO] ------------------------------------------------------------------------

Functional tessting: manually, POST blueprint resource without body


Thanks,

Oliver Szabo


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message