Repository: kylin Updated Branches: refs/heads/master 24353d1b1 -> 4a0ae6c7b
KYLIN-1584 remove region_size from CubeDesc Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4a0ae6c7 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4a0ae6c7 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4a0ae6c7 Branch: refs/heads/master Commit: 4a0ae6c7baa4b5b4e4bb50ac8b6e01cc2f8accc4 Parents: 24353d1 Author: Jason <jiat...@163.com> Authored: Wed May 11 16:26:54 2016 +0800 Committer: Jason <jiat...@163.com> Committed: Wed May 11 16:26:54 2016 +0800 ---------------------------------------------------------------------- .../org/apache/kylin/cube/model/CubeDesc.java | 14 -------- .../storage/hbase/steps/CreateHTableJob.java | 2 +- .../kylin/storage/hbase/steps/RegionSize.java | 35 -------------------- webapp/app/js/controllers/cubeSchema.js | 4 --- webapp/app/js/model/cubeDescModel.js | 3 +- .../cubeDesigner/advanced_settings.html | 16 --------- 6 files changed, 2 insertions(+), 72 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java index 7b6e4f7..33466b8 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/model/CubeDesc.java @@ -145,10 +145,6 @@ public class CubeDesc extends RootPersistentEntity { private long[] autoMergeTimeRanges; @JsonProperty("retention_range") private long retentionRange = 0; - - @JsonProperty("region_size") - private float regionSize = 0;//https://issues.apache.org/jira/browse/KYLIN-1584 - @JsonProperty("engine_type") private int engineType = IEngineAware.ID_MR_V1; @JsonProperty("storage_type") @@ -413,15 +409,6 @@ public class CubeDesc extends RootPersistentEntity { this.overrideKylinProps = overrideKylinProps; } - public float getRegionSize() { - return regionSize; - } - - public void setRegionSize(float regionSize){ - this.regionSize = regionSize; - } - - @Override public boolean equals(Object o) { if (this == o) @@ -1050,7 +1037,6 @@ public class CubeDesc extends RootPersistentEntity { newCubeDesc.setAggregationGroups(cubeDesc.getAggregationGroups()); newCubeDesc.setOverrideKylinProps(cubeDesc.getOverrideKylinProps()); newCubeDesc.setConfig((KylinConfigExt) cubeDesc.getConfig()); - newCubeDesc.setRegionSize(cubeDesc.getRegionSize()); newCubeDesc.updateRandomUuid(); return newCubeDesc; } http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java index 2cecfd8..e1f8818 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/CreateHTableJob.java @@ -160,7 +160,7 @@ public class CreateHTableJob extends AbstractHadoopJob { public static byte[][] getRegionSplitsFromCuboidStatistics(final Map<Long, Double> cubeSizeMap, final KylinConfig kylinConfig, final CubeSegment cubeSegment, final Path hfileSplitsOutputFolder) throws IOException { final CubeDesc cubeDesc = cubeSegment.getCubeDesc(); - float cut = RegionSize.getReionSize(kylinConfig, cubeDesc); + float cut = cubeDesc.getConfig().getKylinHBaseRegionCut(); logger.info("Cut for HBase region is " + cut + "GB"); http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RegionSize.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RegionSize.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RegionSize.java deleted file mode 100644 index b825b6f..0000000 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/RegionSize.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * * Licensed to the Apache Software Foundation (ASF) under one - * * or more contributor license agreements. See the NOTICE file - * * distributed with this work for additional information - * * regarding copyright ownership. The ASF licenses this file - * * to you under the Apache License, Version 2.0 (the - * * "License"); you may not use this file except in compliance - * * with the License. You may obtain a copy of the License at - * * - * * http://www.apache.org/licenses/LICENSE-2.0 - * * - * * Unless required by applicable law or agreed to in writing, software - * * distributed under the License is distributed on an "AS IS" BASIS, - * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * * See the License for the specific language governing permissions and - * * limitations under the License. - * / - */ - -package org.apache.kylin.storage.hbase.steps; - -import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.cube.model.CubeDesc; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class RegionSize { - protected static final Logger logger = LoggerFactory.getLogger(CreateHTableJob.class); - - public static float getReionSize(KylinConfig config, CubeDesc cubeDesc) { - return cubeDesc.getConfig().getKylinHBaseRegionCut(); - } - -} http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/webapp/app/js/controllers/cubeSchema.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/controllers/cubeSchema.js b/webapp/app/js/controllers/cubeSchema.js index a470024..77909df 100755 --- a/webapp/app/js/controllers/cubeSchema.js +++ b/webapp/app/js/controllers/cubeSchema.js @@ -274,10 +274,6 @@ KylinApp.controller('CubeSchemaCtrl', function ($scope, QueryService, UserServic errors.push("At most one 'shard by' column is allowed."); } - if($scope.cubeMetaFrame.region_size<0.01 || $scope.cubeMetaFrame.region_size>100){ - errors.push("Please input a region size between 0.01 and 100 (G)."); - } - var errorInfo = ""; angular.forEach(errors,function(item){ errorInfo+="\n"+item; http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/webapp/app/js/model/cubeDescModel.js ---------------------------------------------------------------------- diff --git a/webapp/app/js/model/cubeDescModel.js b/webapp/app/js/model/cubeDescModel.js index 30821d3..6f25326 100644 --- a/webapp/app/js/model/cubeDescModel.js +++ b/webapp/app/js/model/cubeDescModel.js @@ -56,8 +56,7 @@ KylinApp.service('CubeDescModel', function () { "status_need_notify":['ERROR', 'DISCARDED', 'SUCCEED'], "auto_merge_time_ranges": [604800000, 2419200000], "engine_type": 2, - "storage_type":2, - "region_size":1 + "storage_type":2 }; return cubeMeta; http://git-wip-us.apache.org/repos/asf/kylin/blob/4a0ae6c7/webapp/app/partials/cubeDesigner/advanced_settings.html ---------------------------------------------------------------------- diff --git a/webapp/app/partials/cubeDesigner/advanced_settings.html b/webapp/app/partials/cubeDesigner/advanced_settings.html index 135a328..d59ad0c 100755 --- a/webapp/app/partials/cubeDesigner/advanced_settings.html +++ b/webapp/app/partials/cubeDesigner/advanced_settings.html @@ -285,22 +285,6 @@ </button> </div> - <div class="form-group"> - <h4 style="margin-left:42px;border-bottom:1px solid #ddd;padding-bottom:10px;">Region</h4> - <ng-form class="form-horizontal"> - <div class="form-group form-group-lg"> - <label class="col-sm-2 control-label" for="regionsize">Region Size</label> - <div class="col-sm-9" ng-style='{"padding-top":(state.mode=="edit"?0:7)+"px"}'> - <input type="text" id="regionsize" class="form-control ng-scope ng-pristine ng-valid" - placeholder="input a number between 0.01 and 100 as region size" ng-model="cubeMetaFrame.region_size" - ng-if="state.mode=='edit'"> - <small class="help-block text-red" ng-show="state.mode=='edit'">region size should between 0.01 and 100 (G)</small> - <span ng-if="state.mode=='view'&&cubeMetaFrame.region_size">{{cubeMetaFrame.region_size}} (G)</span> - </div> - </div> - </ng-form> - </div> - </div> <div class="box box-solid" style="margin-left:22px;">