public static CubeDesc generateKylinCubeDesc(String tableName, int storageType, List<DimensionDesc> dimensionDescList, List<MeasureDesc> measureDescList, RowKeyDesc rowKeyDesc, AggregationGroup aggGroup, HBaseMappingDesc hBaseMapping, Map<String, String> overrideProperties) { CubeDesc desc = new CubeDesc(); desc.setName(tableName.replace('.', '_')); desc.setModelName(tableName.replace('.', '_')); desc.setDescription(""); desc.setLastModified(0L); desc.setDimensions(dimensionDescList); desc.setMeasures(measureDescList); desc.setRowkey(rowKeyDesc); desc.setHbaseMapping(hBaseMapping); desc.setNotifyList(Lists.<String> newArrayList()); desc.setStatusNeedNotify(Lists.newArrayList(JobStatusEnum.ERROR.toString())); desc.setAutoMergeTimeRanges(new long[] { 86400000L, 604800000L, 2419200000L }); desc.setEngineType(IEngineAware.ID_MR_V2); desc.setStorageType(storageType); desc.setAggregationGroups(Lists.newArrayList(aggGroup)); desc.getOverrideKylinProps().putAll(overrideProperties); desc.updateRandomUuid(); return desc; }
@PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN + " or hasPermission(#project, 'ADMINISTRATION') or hasPermission(#project, 'MANAGEMENT')") public CubeDesc saveCube(CubeDesc desc, ProjectInstance project) throws IOException { Message msg = MsgPicker.getMsg(); desc.setDraft(false); if (desc.getUuid() == null) desc.updateRandomUuid(); try { createCubeAndDesc(project, desc); } catch (AccessDeniedException accessDeniedException) { throw new ForbiddenException(msg.getUPDATE_CUBE_NO_RIGHT()); } if (desc.isBroken()) { throw new BadRequestException(desc.getErrorsAsString()); } return desc; }
newCubeDesc.updateRandomUuid(); newCubeDesc.init(kylinConfig); newCubeDesc.setPartitionDateEnd(partitionDate);
newCubeDesc.updateRandomUuid(); newCubeDesc.init(kylinConfig); newCubeDesc.setPartitionDateEnd(partitionDate);
newCubeDesc.setSnapshotTableDescList(cubeDesc.getSnapshotTableDescList()); newCubeDesc.setMandatoryDimensionSetList(cubeDesc.getMandatoryDimensionSetList()); newCubeDesc.updateRandomUuid(); return newCubeDesc;
public static CubeDesc generateKylinCubeDesc(String tableName, int storageType, List<DimensionDesc> dimensionDescList, List<MeasureDesc> measureDescList, RowKeyDesc rowKeyDesc, AggregationGroup aggGroup, HBaseMappingDesc hBaseMapping, Map<String, String> overrideProperties) { CubeDesc desc = new CubeDesc(); desc.setName(tableName.replace('.', '_')); desc.setModelName(tableName.replace('.', '_')); desc.setDescription(""); desc.setLastModified(0L); desc.setDimensions(dimensionDescList); desc.setMeasures(measureDescList); desc.setRowkey(rowKeyDesc); desc.setHbaseMapping(hBaseMapping); desc.setNotifyList(Lists.<String> newArrayList()); desc.setStatusNeedNotify(Lists.newArrayList(JobStatusEnum.ERROR.toString())); desc.setAutoMergeTimeRanges(new long[] { 86400000L, 604800000L, 2419200000L }); desc.setEngineType(IEngineAware.ID_MR_V2); desc.setStorageType(storageType); desc.setAggregationGroups(Lists.newArrayList(aggGroup)); desc.getOverrideKylinProps().putAll(overrideProperties); desc.setSignature(desc.calculateSignature()); desc.updateRandomUuid(); return desc; }
newCubeDesc.updateRandomUuid(); newCubeDesc.init(kylinConfig); newCubeDesc.setPartitionDateEnd(partitionDate);
newCubeDesc.updateRandomUuid(); newCubeDesc.init(kylinConfig); newCubeDesc.setPartitionDateEnd(partitionDate);
public static CubeDesc getCopyOf(CubeDesc cubeDesc) { CubeDesc newCubeDesc = new CubeDesc(); newCubeDesc.setName(cubeDesc.getName()); newCubeDesc.setModelName(cubeDesc.getModelName()); newCubeDesc.setDescription(cubeDesc.getDescription()); newCubeDesc.setNullStrings(cubeDesc.getNullStrings()); newCubeDesc.setDimensions(cubeDesc.getDimensions()); newCubeDesc.setMeasures(cubeDesc.getMeasures()); newCubeDesc.setRowkey(cubeDesc.getRowkey()); newCubeDesc.setHbaseMapping(cubeDesc.getHbaseMapping()); newCubeDesc.setSignature(cubeDesc.getSignature()); newCubeDesc.setNotifyList(cubeDesc.getNotifyList()); newCubeDesc.setAutoMergeTimeRanges(cubeDesc.getAutoMergeTimeRanges()); newCubeDesc.setRetentionRange(cubeDesc.getRetentionRange()); newCubeDesc.setConfig(cubeDesc.getConfig()); newCubeDesc.updateRandomUuid(); return newCubeDesc; }
newCubeDesc.setSnapshotTableDescList(cubeDesc.getSnapshotTableDescList()); newCubeDesc.setMandatoryDimensionSetList(cubeDesc.getMandatoryDimensionSetList()); newCubeDesc.updateRandomUuid(); return newCubeDesc;