ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitro Lisnichenko" <dlysniche...@hortonworks.com>
Subject Re: Review Request 18708: Error in getting host components with state INSTALL_FAILED
Date Thu, 13 Mar 2014 15:58:12 GMT

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

(Updated March 13, 2014, 3:58 p.m.)


Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Tom Beerbower.


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


Repository: ambari


Description
-------

The general idea is to replace "state" property at user predicate (for HostComponent update
requests) with desired_state to comply with current usage and keep all hack in one place.
This is done at UpdateHandler. 
We can not do that later, because request type information (GET or PUT) is not available at
this time. Changing url parameters before compiling predicate seems more hacky for me. That's
why I implemented a visitor that iterates over predicate and replaces properties. The code
that is executed afterwards transparently works with "desired_state" property instead of "state"
property. Get requests are processed at natural way, "state" is mapped to live state for all
requests except update requests.

Need more work on replacing "state" property in request body.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
5f85d83 
  ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceComponentHostRequest.java
d9c7928 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
89d53ae 

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


Testing
-------

Here is a preview version of patch (without unit tests).  Not wll-tested end2end yet.


Thanks,

Dmitro Lisnichenko


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