Skip to content

Commit

Permalink
[KYUUBI #4119][FOLLOWUP] Do not fail on unknown properties to keep ky…
Browse files Browse the repository at this point in the history
…uubi-ctl compatiblity

### _Why are the changes needed?_

```
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "appStartTime" (class org.apache.kyuubi.client.api.v1.dto.Batch), not marked as ignorable (13 known properties: "appDiagnostic", "createTime", "kyuubiInstance", "user", "appUrl", "appState", "state", "batchType", "cluster", "id", "appId", "endTime", "name"])
```

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #4208 from turboFei/ignore_unknown.

Closes #4119

0e81ac7 [fwang12] save

Authored-by: fwang12 <fwang12@ebay.com>
Signed-off-by: fwang12 <fwang12@ebay.com>
(cherry picked from commit 750eb6a)
Signed-off-by: fwang12 <fwang12@ebay.com>
  • Loading branch information
turboFei committed Jan 29, 2023
1 parent 1b6e1e7 commit cec0694
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@

package org.apache.kyuubi.client.util;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.kyuubi.client.exception.KyuubiRestException;

public final class JsonUtils {

private static final ObjectMapper MAPPER = new ObjectMapper();
private static final ObjectMapper MAPPER =
new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

public static String toJson(Object object) {
try {
Expand Down

0 comments on commit cec0694

Please sign in to comment.