You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "xiejialong (Jira)" <ji...@apache.org> on 2022/12/01 13:26:00 UTC
[jira] [Updated] (KYLIN-5327) kylin.cube.aggrgroup.is-mandatory-only-valid参数配置与Cuboid缺失
[ https://issues.apache.org/jira/browse/KYLIN-5327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xiejialong updated KYLIN-5327:
------------------------------
Description:
h4. 背景:
我在线上构建cube时发现必要维度的cuboid组合有时会不被构建。
只有当kylin.cube.aggrgroup.is-mandatory-only-valid=true时才会构建。可是kylin.cube.aggrgroup.is-mandatory-only-valid参数解释是:是否允许 Cube 只包含 Base Cuboid,默认值为 FALSE,当使用 Spark Cubing 时需设置为 TRUE。这个解释看起来有点抽象。
h4. 我的困惑:
1.kylin.cube.aggrgroup.is-mandatory-only-valid中的base cuboid是指什么,是指必要维度组的组合吗?
2.该参数解释为当使用 Spark Cubing 时需设置为 TRUE,为何设置为false会导致cuboid构建缺失
h4. 问题还原:
测试集的cube kylin_sales_model这个model构建以下的维度组合。 !image-2022-12-01-21-16-08-040.png|width=558,height=245!
当设置参数为false时 !image-2022-12-01-21-17-19-725.png|width=413,height=267! 会不构建必要维度的cuboid。
h4. 源码中影响的位置
org.apache.kylin.cube.cuboid.DefaultCuboidScheduler#getOnTreeParents(long, org.apache.kylin.cube.model.AggregationGroup) 影响了cuboid的生成,如果为false
{code:java}
if (agg.getMandatoryColumnMask() != 0L) {
if (agg.isMandatoryOnlyValid()) {
if (fillBit(tmpChild, agg.getMandatoryColumnMask(), parentCandidate)) {
return parentCandidate;
}
} else {
tmpChild |= agg.getMandatoryColumnMask();
}
}
for (Long normal : agg.getNormalDims()) {
fillBit(tmpChild, normal, parentCandidate);
} {code}
会跳过必要组合作为LowestCuboid。是否改在for循环调用前加入
fillBit(tmpChild, agg.getMandatoryColumnMask(), parentCandidate)
was:
我在线上构建cube时发现必要维度的cuboid组合有时会不被构建。
只有当kylin.cube.aggrgroup.is-mandatory-only-valid=true时才会构建。可是kylin.cube.aggrgroup.is-mandatory-only-valid参数解释是:是否允许 Cube 只包含 Base Cuboid,默认值为 FALSE,当使用 Spark Cubing 时需设置为 TRUE。这个解释看起来有点抽象。
问题还原:
测试集的cube kylin_sales_model这个model构建以下的维度组合。 !image-2022-12-01-21-16-08-040.png|width=558,height=245!
当设置参数为false时 !image-2022-12-01-21-17-19-725.png|width=413,height=267! 会不构建必要维度的cuboid。
查看源码org.apache.kylin.cube.cuboid.DefaultCuboidScheduler#getOnTreeParents(long, org.apache.kylin.cube.model.AggregationGroup) 影响了cuboid的生成,如果为false
{code:java}
if (agg.getMandatoryColumnMask() != 0L) {
if (agg.isMandatoryOnlyValid()) {
if (fillBit(tmpChild, agg.getMandatoryColumnMask(), parentCandidate)) {
return parentCandidate;
}
} else {
tmpChild |= agg.getMandatoryColumnMask();
}
} for (Long normal : agg.getNormalDims()) {
fillBit(tmpChild, normal, parentCandidate);
} {code}
会跳过必要组合作为LowestCuboid。
> kylin.cube.aggrgroup.is-mandatory-only-valid参数配置与Cuboid缺失
> ---------------------------------------------------------
>
> Key: KYLIN-5327
> URL: https://issues.apache.org/jira/browse/KYLIN-5327
> Project: Kylin
> Issue Type: Improvement
> Components: Modeling
> Affects Versions: v4.0.2
> Reporter: xiejialong
> Priority: Major
> Attachments: image-2022-12-01-21-16-08-040.png, image-2022-12-01-21-17-19-725.png
>
>
> h4. 背景:
> 我在线上构建cube时发现必要维度的cuboid组合有时会不被构建。
> 只有当kylin.cube.aggrgroup.is-mandatory-only-valid=true时才会构建。可是kylin.cube.aggrgroup.is-mandatory-only-valid参数解释是:是否允许 Cube 只包含 Base Cuboid,默认值为 FALSE,当使用 Spark Cubing 时需设置为 TRUE。这个解释看起来有点抽象。
> h4. 我的困惑:
> 1.kylin.cube.aggrgroup.is-mandatory-only-valid中的base cuboid是指什么,是指必要维度组的组合吗?
> 2.该参数解释为当使用 Spark Cubing 时需设置为 TRUE,为何设置为false会导致cuboid构建缺失
>
> h4. 问题还原:
> 测试集的cube kylin_sales_model这个model构建以下的维度组合。 !image-2022-12-01-21-16-08-040.png|width=558,height=245!
> 当设置参数为false时 !image-2022-12-01-21-17-19-725.png|width=413,height=267! 会不构建必要维度的cuboid。
> h4. 源码中影响的位置
> org.apache.kylin.cube.cuboid.DefaultCuboidScheduler#getOnTreeParents(long, org.apache.kylin.cube.model.AggregationGroup) 影响了cuboid的生成,如果为false
> {code:java}
> if (agg.getMandatoryColumnMask() != 0L) {
> if (agg.isMandatoryOnlyValid()) {
> if (fillBit(tmpChild, agg.getMandatoryColumnMask(), parentCandidate)) {
> return parentCandidate;
> }
> } else {
> tmpChild |= agg.getMandatoryColumnMask();
> }
> }
> for (Long normal : agg.getNormalDims()) {
> fillBit(tmpChild, normal, parentCandidate);
> } {code}
> 会跳过必要组合作为LowestCuboid。是否改在for循环调用前加入
> fillBit(tmpChild, agg.getMandatoryColumnMask(), parentCandidate)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)