[jira] [Commented] (KYLIN-3482) Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer

2020-11-19 Thread Zhong Yanghong (Jira)


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

Zhong Yanghong commented on KYLIN-3482:
---

[~shaofengshi], It seems the patch for closing will have bad effect in 
*SparkCubingByLayer*. 

For example, after applying the patch
{code}
public void init() {
 KylinConfig kConfig = 
AbstractHadoopJob.loadKylinConfigFromHdfs(conf, metaUrl);
 try (KylinConfig.SetAndUnsetThreadLocalConfig autoUnset = 
KylinConfig
 .setAndUnsetThreadLocalConfig(kConfig)) {
 CubeInstance cubeInstance = 
CubeManager.getInstance(kConfig).getCube(cubeName);
 cubeDesc = cubeInstance.getDescriptor();
 aggregators = new MeasureAggregators(cubeDesc.getMeasures());
 measureNum = cubeDesc.getMeasures().size();
 }
 }
{code}

After init(), the KylinConfig will be removed. Then it will fail to call 
KylinConfig.getInstanceFromEnv(). 

> Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer
> ---
>
> Key: KYLIN-3482
> URL: https://issues.apache.org/jira/browse/KYLIN-3482
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: Jiatao Tao
>Priority: Minor
> Fix For: v2.5.0
>
>
> Here is related code:
> {code}
> KylinConfig kylinConfig = 
> AbstractHadoopJob.loadKylinConfigFromHdfs(sConf, metaUrl);
> 
> KylinConfig.setAndUnsetThreadLocalConfig(kylinConfig);
> {code}
> The return value from setAndUnsetThreadLocalConfig should be closed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (KYLIN-3482) Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer

2018-08-29 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KYLIN-3482:


Commit c8972772af60d0a6736acb063ff6c4b775790b4a in kylin's branch 
refs/heads/master from shaofengshi
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=c897277 ]

KYLIN-3482 Unclosed SetAndUnsetThreadLocalConfig in Spark engine


> Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer
> ---
>
> Key: KYLIN-3482
> URL: https://issues.apache.org/jira/browse/KYLIN-3482
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.5.0
>
>
> Here is related code:
> {code}
> KylinConfig kylinConfig = 
> AbstractHadoopJob.loadKylinConfigFromHdfs(sConf, metaUrl);
> 
> KylinConfig.setAndUnsetThreadLocalConfig(kylinConfig);
> {code}
> The return value from setAndUnsetThreadLocalConfig should be closed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KYLIN-3482) Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer

2018-08-28 Thread Ted Yu (JIRA)


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

Ted Yu commented on KYLIN-3482:
---

Some more occurrences of calling KylinConfig.setAndUnsetThreadLocalConfig 
without closing:

engine-spark/src/main/java/org/apache/kylin/engine/spark/SparkFactDistinct.java

> Unclosed SetAndUnsetThreadLocalConfig in SparkCubingByLayer
> ---
>
> Key: KYLIN-3482
> URL: https://issues.apache.org/jira/browse/KYLIN-3482
> Project: Kylin
>  Issue Type: Bug
>Reporter: Ted Yu
>Assignee: jiatao.tao
>Priority: Minor
> Fix For: v2.5.0
>
>
> Here is related code:
> {code}
> KylinConfig kylinConfig = 
> AbstractHadoopJob.loadKylinConfigFromHdfs(sConf, metaUrl);
> 
> KylinConfig.setAndUnsetThreadLocalConfig(kylinConfig);
> {code}
> The return value from setAndUnsetThreadLocalConfig should be closed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)