You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/09/29 10:57:16 UTC
[15/15] kylin git commit: Merge commit
'f11f184b0aca368e3859a90efcab0e9a9df43948'
Merge commit 'f11f184b0aca368e3859a90efcab0e9a9df43948'
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ef7d2908
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ef7d2908
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ef7d2908
Branch: refs/heads/master
Commit: ef7d29083e45714722875bf6ce20bccd88a547d2
Parents: c865ad5 f11f184
Author: Li Yang <li...@apache.org>
Authored: Fri Sep 29 18:28:44 2017 +0800
Committer: Li Yang <li...@apache.org>
Committed: Fri Sep 29 18:28:44 2017 +0800
----------------------------------------------------------------------
.../cuboid/algorithm/AlgorithmTestBase.java | 310 --
.../cuboid/algorithm/CuboidStatsUtilTest.java | 2 +-
.../cuboid/algorithm/GeneticAlgorithmTest.java | 59 -
.../cuboid/algorithm/GreedyAlgorithmTest.java | 58 -
core-cube/src/test/resources/statistics.txt | 4092 ------------------
.../cuboid/algorithm/ITAlgorithmTestBase.java | 310 ++
.../algorithm/ITGeneticAlgorithmTest.java | 59 +
.../cuboid/algorithm/ITGreedyAlgorithmTest.java | 58 +
kylin-it/src/test/resources/statistics.txt | 4092 ++++++++++++++++++
9 files changed, 4520 insertions(+), 4520 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/ef7d2908/kylin-it/src/test/java/org/apache/kylin/cube/cuboid/algorithm/ITGeneticAlgorithmTest.java
----------------------------------------------------------------------
diff --cc kylin-it/src/test/java/org/apache/kylin/cube/cuboid/algorithm/ITGeneticAlgorithmTest.java
index 0000000,09c5cbe..f227789
mode 000000,100755..100755
--- a/kylin-it/src/test/java/org/apache/kylin/cube/cuboid/algorithm/ITGeneticAlgorithmTest.java
+++ b/kylin-it/src/test/java/org/apache/kylin/cube/cuboid/algorithm/ITGeneticAlgorithmTest.java
@@@ -1,0 -1,57 +1,59 @@@
+ /*
+ * 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.cube.cuboid.algorithm;
+
+ import java.util.List;
+
+ import org.apache.kylin.cube.cuboid.algorithm.generic.GeneticAlgorithm;
++import org.junit.Ignore;
+ import org.junit.Test;
+
++@Ignore("testBPUSCalculator() is unsable; whole test takes too long")
+ public class ITGeneticAlgorithmTest extends ITAlgorithmTestBase {
+
+ @Test
+ public void testBPUSCalculator() {
+ BenefitPolicy benefitPolicy = new BPUSCalculator(cuboidStats);
+ GeneticAlgorithm algorithm = new GeneticAlgorithm(-1, benefitPolicy, cuboidStats);
+
+ List<Long> recommendList = algorithm.recommend(10);
+ System.out.println("recommendList by BPUSCalculator: " + recommendList);
+ System.out.println("Cost evaluated for each query: " + getQueryCostRatio(cuboidStats, recommendList));
+ }
+
+ @Test
+ public void testPBPUSCalculator() {
+ BenefitPolicy benefitPolicy = new PBPUSCalculator(cuboidStats);
+ GeneticAlgorithm algorithm = new GeneticAlgorithm(-1, benefitPolicy, cuboidStats);
+
+ List<Long> recommendList = algorithm.recommend(10);
+ System.out.println("recommendList by PBPUSCalculator:" + recommendList);
+ System.out.println("Cost evaluated for each query: " + getQueryCostRatio(cuboidStats, recommendList));
+ }
+
+ @Test
+ public void testSPBPUSCalculator() {
+ BenefitPolicy benefitPolicy = new SPBPUSCalculator(cuboidStats);
+ GeneticAlgorithm algorithm = new GeneticAlgorithm(-1, benefitPolicy, cuboidStats);
+
+ List<Long> recommendList = algorithm.recommend(10);
+ System.out.println("recommendList by SPBPUSCalculator:" + recommendList);
+ System.out.println("Cost evaluated for each query: " + getQueryCostRatio(cuboidStats, recommendList));
+ }
+ }