private boolean isUsePutRowKeyToHllNewAlgorithm(CubeDesc cubeDesc) { boolean isUsePutRowKeyToHllNewAlgorithm; if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; logger.info("Found KylinVersion: {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion: {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion()); } return isUsePutRowKeyToHllNewAlgorithm; }
if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; hf = Hashing.murmur3_32(); logger.info("Found KylinVersion : {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion : {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion());
if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; logger.info("Found KylinVersion : {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion : {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion());
KylinVersion cubeVersion = new KylinVersion(getVersion()); KylinVersion kylinVersion = KylinVersion.getCurrentVersion(); if (!kylinVersion.isCompatibleWith(cubeVersion)) {
private TblColRef initDimensionColRef(DimensionDesc dim, String colName) { TblColRef col = model.findColumn(dim.getTable(), colName); // for backward compatibility if (KylinVersion.isBefore200(getVersion())) { // always use FK instead PK, FK could be shared by more than one lookup tables JoinDesc join = dim.getJoin(); if (join != null) { int idx = ArrayUtils.indexOf(join.getPrimaryKeyColumns(), col); if (idx >= 0) { col = join.getForeignKeyColumns()[idx]; } } } return initDimensionColRef(col); }
newCubeDesc.setConfig((KylinConfigExt) cubeDesc.getConfig()); newCubeDesc.setPartitionOffsetStart(cubeDesc.getPartitionOffsetStart()); newCubeDesc.setVersion(cubeDesc.getVersion()); newCubeDesc.setParentForward(cubeDesc.getParentForward()); newCubeDesc.setSnapshotTableDescList(cubeDesc.getSnapshotTableDescList());
private boolean isUsePutRowKeyToHllNewAlgorithm(CubeDesc cubeDesc) { boolean isUsePutRowKeyToHllNewAlgorithm; if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; logger.info("Found KylinVersion: {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion: {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion()); } return isUsePutRowKeyToHllNewAlgorithm; }
if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; hf = Hashing.murmur3_32(); logger.info("Found KylinVersion : {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion : {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion());
if (KylinVersion.isBefore200(cubeDesc.getVersion())) { isUsePutRowKeyToHllNewAlgorithm = false; logger.info("Found KylinVersion : {}. Use old algorithm for cuboid sampling.", cubeDesc.getVersion()); } else { isUsePutRowKeyToHllNewAlgorithm = true; logger.info( "Found KylinVersion : {}. Use new algorithm for cuboid sampling. About the details of the new algorithm, please refer to KYLIN-2518", cubeDesc.getVersion());
KylinVersion cubeVersion = new KylinVersion(getVersion()); KylinVersion kylinVersion = KylinVersion.getCurrentVersion(); if (!kylinVersion.isCompatibleWith(cubeVersion)) {
private TblColRef initDimensionColRef(DimensionDesc dim, String colName) { TblColRef col = model.findColumn(dim.getTable(), colName); // for backward compatibility if (KylinVersion.isBefore200(getVersion())) { // always use FK instead PK, FK could be shared by more than one lookup tables JoinDesc join = dim.getJoin(); if (join != null) { int idx = ArrayUtils.indexOf(join.getPrimaryKeyColumns(), col); if (idx >= 0) { col = join.getForeignKeyColumns()[idx]; } } } return initDimensionColRef(col); }
newCubeDesc.setConfig((KylinConfigExt) cubeDesc.getConfig()); newCubeDesc.setPartitionOffsetStart(cubeDesc.getPartitionOffsetStart()); newCubeDesc.setVersion(cubeDesc.getVersion()); newCubeDesc.setParentForward(cubeDesc.getParentForward()); newCubeDesc.setSnapshotTableDescList(cubeDesc.getSnapshotTableDescList());