You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Zhong,Jason (JIRA)" <ji...@apache.org> on 2016/11/22 03:08:58 UTC

[jira] [Commented] (KYLIN-2209) Potential NPE in StreamingController#deserializeTableDesc()

    [ https://issues.apache.org/jira/browse/KYLIN-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15685519#comment-15685519 ] 

Zhong,Jason commented on KYLIN-2209:
------------------------------------

looks good to me

> Potential NPE in StreamingController#deserializeTableDesc()
> -----------------------------------------------------------
>
>                 Key: KYLIN-2209
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2209
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Ted Yu
>            Assignee:  Kaige Liu
>            Priority: Minor
>         Attachments: KYLIN-2209-fix-potential-NPE.patch
>
>
> {code}
>         TableDesc desc = null;
>         try {
>             logger.debug("Saving TableDesc " + streamingRequest.getTableData());
>             desc = JsonUtil.readValue(streamingRequest.getTableData(), TableDesc.class);
>         } catch (JsonParseException e) {
>             logger.error("The TableDesc definition is invalid.", e);
>             updateRequest(streamingRequest, false, e.getMessage());
> ...
>         String[] dbTable = HadoopUtil.parseHiveTableName(desc.getName());
> {code}
> There is a chance that desc is null by the time we get to HadoopUtil.parseHiveTableName().
> We should check for null.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)