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

(Updated Nov. 11, 2016, 10:56 a.m.)


Review request for Ambari, Nate Cole and Robert Levas.


Changes
-------

Threw in a test for good measure...


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


Repository: ambari


Description
-------

When creating an upgrade, the serialized {{UpgradeType}} is quoted causing 
problems with the python code:

{code}
    "commandParams": {
        "upgrade_direction": "upgrade",
        "service_package_folder": "common-services/ZOOKEEPER/3.4.5/package",
        "script": "scripts/zookeeper_server.py",
        "hooks_folder": "HDP/2.0.6/hooks",
        "upgrade_type": "\"host_ordered_upgrade\"",
{code}

The problem is the Gson, when converting the enum into a String, is giving back 
a JSON-ready String which includes the quotes.


Diffs (updated)
-----

  
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
 1713b64 
  
ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java
 17e4f2d 

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


Testing
-------

Verified that the serialized value is corrected.


Thanks,

Jonathan Hurley

Reply via email to