You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "zhangwei (JIRA)" <ji...@apache.org> on 2019/02/26 07:56:00 UTC

[jira] [Commented] (KYLIN-3831) 唯独超过62生成cuboid 错误

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

zhangwei commented on KYLIN-3831:
---------------------------------

kylin.cube.rowkey.max-size 这个参数其实不能设置超过默认的63 因为生成cuboid的算法对64位的long做位移,一旦维度过多就会算出cuboid = -1 导致无法生成cube

测试代码
public class TestBitIndex { public static void main(String[] args) { long fullMask = 0L; for (int i = 62; i >=0 ; i--) { fullMask |= 1L << i; } System.out.println(fullMask); } }

9223372036854775807

public class TestBitIndex { public static void main(String[] args) { long fullMask = 0L; for (int i = 65; i >=0 ; i--) { fullMask |= 1L << i; } System.out.println(fullMask); } }

-1

DefaultCuboidScheduler
    @Override
    public List<Long> getSpanningCuboid(long cuboid) {
        if (cuboid > max || cuboid < 0) {
            throw new IllegalArgumentException("Cuboid " + cuboid + " is out of scope 0-" + max);
        }

        List<Long> spanning = parent2child.get(cuboid);
        if (spanning == null) {
            return Collections.EMPTY_LIST;
        }
        return spanning;
    }

> 唯独超过62生成cuboid 错误
> -----------------
>
>                 Key: KYLIN-3831
>                 URL: https://issues.apache.org/jira/browse/KYLIN-3831
>             Project: Kylin
>          Issue Type: Wish
>          Components: Others
>    Affects Versions: v2.3.1
>            Reporter: zhangwei
>            Priority: Minor
>




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