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

Yaguang Jia commented on KYLIN-5687:
------------------------------------

h2. RC

The asyn query task class *org.apache.kylin.query.engine.AsyncQueryApplication* 
inherits from {*}org.apache.kylin.engine.spark.application.SparkApplication{*}.

These update behaviors are parent class behaviors and are not overridden by 
specific subclasses.

While asyn query does not have corresponding task metadata in Kylin5, If the 
update-related methods are not rewritten, it will eventually result in a 
NullPointerException due to the inability to find task metadata. However, it 
does not affect task execution.

The reason for the abnormal log of detecting resources for building tasks is 
the same as above.
h2. Fix Design

Rewrite update metadata related methods in subclasses (rewrite to not require 
any implementation)
The details are as follows:
1, in the detection of resources step corresponding to the class to rewrite the 
wait for resources method 
*org.apache.kylin.engine.spark.application.SparkApplication#waiteForResource*
*org.apache.kylin.engine.spark.application.SparkApplication#waiteForResourceSuccess*

 

2, asyn query tasks in the class to rewrite the wait for resources method, the 
task completion of the update method and task failure update method

*org.apache.kylin.engine.spark.application.SparkApplication#waiteForResourceSuccess*
*org.apache.kylin.engine.spark.application.SparkApplication#logJobInfo*
*org.apache.kylin.engine.spark.application.SparkApplication#updateJobErrorInfo*

 
----
h3. RC

异步查询任务类org.apache.kylin.query.engine.AsyncQueryApplication继承自org.apache.kylin.engine.spark.application.SparkApplication。issue中的这些更新行为都是父类的行为,具体的子类并没有重写。而异步查询在Kylin5中并没有相对应的任务元数据,如果不重写更新相关的方法,最终会导致找不到任务元数据而报空指针异常。但是,不影响任务执行。构建任务的检测资源异常日志原因同上。
h3. Fix Design

在子类中重写更新元数据相关方法(重写为不需要任何实现)

具体如下:
1、在检测资源step对应的类中重写等待资源方法

org.apache.kylin.engine.spark.application.SparkApplication#waiteForResource
org.apache.kylin.engine.spark.application.SparkApplication#waiteForResourceSuccess

 

2、异步查询任务的类中重写等待资源方法、任务完成后的更新方法以及任务失败的更新方法

org.apache.kylin.engine.spark.application.SparkApplication#waiteForResourceSuccess

org.apache.kylin.engine.spark.application.SparkApplication#logJobInfo

org.apache.kylin.engine.spark.application.SparkApplication#updateJobErrorInfo

> Remove the log information added abnormally during job execution
> ----------------------------------------------------------------
>
>                 Key: KYLIN-5687
>                 URL: https://issues.apache.org/jira/browse/KYLIN-5687
>             Project: Kylin
>          Issue Type: Bug
>          Components: Job Engine
>    Affects Versions: 5.0-alpha
>            Reporter: Yaguang Jia
>            Assignee: sibing.zhang
>            Priority: Minor
>             Fix For: 5.0-beta
>
>
> Remove the log information added abnormally during job execution



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to