ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sid Wagle" <swa...@hortonworks.com>
Subject Re: Review Request 22320: Agent Custom Command Output Coerces Integers to Floats
Date Mon, 09 Jun 2014 16:58:41 GMT

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

Ship it!


Ship It!

- Sid Wagle


On June 9, 2014, 4:06 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22320/
> -----------------------------------------------------------
> 
> (Updated June 9, 2014, 4:06 p.m.)
> 
> 
> Review request for Ambari, Myroslav Papirkovskyy, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-6056
>     https://issues.apache.org/jira/browse/AMBARI-6056
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The JSON in the structured output is returned as a string to the server from the agent.
When using gson, integers are converted to doubles when there is no first-class object mapping.
The overall problem is that structured_output is very ambiguous and we'd need to provide contracts
for each possible returned entity. This is something for another Jira that I will open up.

> 
> In the meantime, using Jackson returns the correctly output JSON structure.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/ActionQueue.py 749e8c1 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 492e025 
>   ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 00d0c0a

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
87b915f 
>   ambari-server/src/main/resources/custom_actions/check_host.py f98492b 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/TaskResourceProviderTest.java
537d999 
>   ambari-server/src/test/python/TestCheckHost.py 0ba0386 
>   ambari-server/src/test/resources/custom_actions/invalid_check.json PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/22320/diff/
> 
> 
> Testing
> -------
> 
> Added extra tests around invalid data and fixed up existing tests to validate the integers.
> 
> [INFO] Ambari Main ....................................... SUCCESS [2.044s]
> [INFO] Apache Ambari Project POM ......................... SUCCESS [0.243s]
> [INFO] Ambari Web ........................................ SUCCESS [9.719s]
> [INFO] Ambari Views ...................................... SUCCESS [1.339s]
> [INFO] Ambari Server ..................................... SUCCESS [13:27.097s]
> [INFO] Ambari Agent ...................................... SUCCESS [6.897s]
> [INFO] Ambari Client ..................................... SUCCESS [0.034s]
> [INFO] Ambari Python Client .............................. SUCCESS [0.269s]
> [INFO] Ambari Groovy Client .............................. SUCCESS [2.735s]
> [INFO] Ambari Shell ...................................... SUCCESS [4.303s]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


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