[
https://issues.apache.org/jira/browse/KYLIN-5731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17798436#comment-17798436
]
ASF GitHub Bot commented on KYLIN-5731:
---------------------------------------
weiwei121723 commented on code in PR #2161:
URL: https://github.com/apache/kylin/pull/2161#discussion_r1430942237
##########
src/common-server/src/main/java/org/apache/kylin/rest/controller/NEpochController.java:
##########
@@ -48,7 +51,11 @@ public class NEpochController extends NBasicController {
@PostMapping(value = "", produces = { HTTP_VND_APACHE_KYLIN_JSON,
HTTP_VND_APACHE_KYLIN_V4_PUBLIC_JSON })
@ResponseBody
public EnvelopeResponse<String> updateEpochOwner(@RequestBody EpochRequest
epochRequest) {
- checkCollectionRequiredArg("projects", epochRequest.getProjects());
+ if (Objects.isNull(epochRequest.getProjects())) {
+ // Avoid following NPEs.
+ epochRequest.setProjects(new ArrayList<>(0));
+ }
+ // Empty projects has specified meanings: all projects do change epoch.
Review Comment:
我主要担心这个接口,忘记传projects参数,不小心更新了所有的epoch。如果为空或者emptyList,应该直接报错比较稳妥些;
感觉/api/epoch/all 更适合做这个事情
> When there is a null value in the Kafka source data, the build job reports an
> error
> -----------------------------------------------------------------------------------
>
> Key: KYLIN-5731
> URL: https://issues.apache.org/jira/browse/KYLIN-5731
> Project: Kylin
> Issue Type: Bug
> Affects Versions: 5.0-beta
> Reporter: zhong.zhu
> Assignee: zhong.zhu
> Priority: Minor
> Fix For: 5.0.0
>
>
> If the field value in kafka json data is null, the task will report an error.
> Null value field "clue_source_2_name":null
> Field type is varchar
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)