yangyichao-mango opened a new issue #2922:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/2922


   **Describe the bug**
   
   There is a Serde Exception in `TaskNode`, because we use Jackson UDSerde 
`JSONUtils.JsonDataSerializer` and `JSONUtils.JsonDataDeserializer` in 
`TaskNode` fields.
   
   The UDSerde can convert "[]" to ""[]"" because the `JsonDataDeserializer` 
node.toString() implement.
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   
   `public static void main(String[] args) {
           String a = 
"{\"conditionResult\":\"{\\\"successNode\\\":[\\\"\\\"],\\\"failedNode\\\":[\\\"\\\"]}\","
                   + 
"\"conditionsTask\":false,\"depList\":[],\"dependence\":\"{}\",\"forbidden\":false,"
                   + 
"\"id\":\"tasks-86823\",\"maxRetryTimes\":1,\"name\":\"shell test\","
                   + 
"\"params\":\"{\\\"resourceList\\\":[],\\\"localParams\\\":[],\\\"rawScript\\\":\\\"echo
 "
                   + 
"'yyc'\\\"}\",\"preTasks\":\"[]\",\"retryInterval\":1,\"runFlag\":\"NORMAL\","
                   + 
"\"taskInstancePriority\":\"HIGHEST\",\"taskTimeoutParameter\":{\"enable\":false,\"interval\":0},"
                   + 
"\"timeout\":\"{}\",\"type\":\"SHELL\",\"workerGroup\":\"default\"}";
   
           TaskNode taskNode = JSONUtils.parseObject(a, TaskNode.class);
       }`
   
   
   **Expected behavior**
   `com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot 
deserialize instance of `java.util.ArrayList` out of VALUE_STRING token
    at [Source: (String)""[]""; line: 1, column: 1]`
   
   **Screenshots**
   
![image](https://user-images.githubusercontent.com/29545877/83968921-f98abc80-a8fe-11ea-8765-94829ce5dedd.png)
   
   
   **Which version of Dolphin Scheduler:**
    -[1.3.0]
   
   **Requirement or improvement
   - We can remove the UDSerde `JSONUtils.JsonDataSerializer` and 
`JSONUtils.JsonDataDeserializer` in JSONUtils.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to