[1/4] kylin git commit: refine StorageCleanupJob [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 9ae4376ae -> 97d675de6 (forced update) refine StorageCleanupJob Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/de9f3ad0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/de9f3ad0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/de9f3ad0 Branch: refs/heads/yang21-cdh5.7 Commit: de9f3ad0a49ec145ec4166bd1938d8855f425e7b Parents: 01d68fa Author: Hongbin MaAuthored: Tue Nov 1 13:31:04 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 13:31:04 2016 +0800 -- .../kylin/storage/hbase/util/StorageCleanupJob.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/de9f3ad0/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java index dffce36..c91de7b 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java @@ -267,16 +267,21 @@ public class StorageCleanupJob extends AbstractApplication { List allHiveTablesNeedToBeDeleted = new ArrayList(); List workingJobList = new ArrayList(); +StringBuilder sb = new StringBuilder(); for (String jobId : allJobs) { // only remove FINISHED and DISCARDED job intermediate table final ExecutableState state = executableManager.getOutput(jobId).getState(); if (!state.isFinalState()) { workingJobList.add(jobId); -logger.info("Skip intermediate hive table with job id " + jobId + " with job status " + state); +sb.append(jobId).append("(").append(state).append("), "); } } +logger.info("Working jobIDs: " + workingJobList); while ((line = reader.readLine()) != null) { + +logger.info("Checking table " + line); + if (!line.startsWith(preFix)) continue; @@ -295,12 +300,15 @@ public class StorageCleanupJob extends AbstractApplication { if (UUId_PATTERN.matcher(uuid).matches()) { //Check whether it's a hive table in use if (isTableInUse(uuid, workingJobList)) { +logger.info("Skip because not isTableInUse"); isNeedDel = false; } } else { +logger.info("Skip because not match pattern"); isNeedDel = false; } } else { +logger.info("Skip because length not qualified"); isNeedDel = false; }
[4/4] kylin git commit: KYLIN-1672 support kylin on cdh 5.7
KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/97d675de Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/97d675de Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/97d675de Branch: refs/heads/yang21-cdh5.7 Commit: 97d675de622722a67a3013f3784d9ccf2f73a678 Parents: eb39c46 Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Tue Nov 1 13:39:20 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/97d675de/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..ebd8cde 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]+ + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/97d675de/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/97d675de/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/97d675de/examples/test_case_data/sandbox/core-site.xml -- diff --git a/examples/test_case_data/sandbox/core-site.xml
[2/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
[3/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/eb39c46c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/eb39c46c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/eb39c46c Branch: refs/heads/yang21-cdh5.7 Commit: eb39c46c406468aa32f76d6edfa5453e71eeb8fd Parents: de9f3ad Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 13:37:32 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[1/3] kylin git commit: refine StorageCleanupJob [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-hbase1.x e60bcb0c8 -> eb39c46c4 (forced update) refine StorageCleanupJob Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/de9f3ad0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/de9f3ad0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/de9f3ad0 Branch: refs/heads/yang21-hbase1.x Commit: de9f3ad0a49ec145ec4166bd1938d8855f425e7b Parents: 01d68fa Author: Hongbin MaAuthored: Tue Nov 1 13:31:04 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 13:31:04 2016 +0800 -- .../kylin/storage/hbase/util/StorageCleanupJob.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/de9f3ad0/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java index dffce36..c91de7b 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java @@ -267,16 +267,21 @@ public class StorageCleanupJob extends AbstractApplication { List allHiveTablesNeedToBeDeleted = new ArrayList(); List workingJobList = new ArrayList(); +StringBuilder sb = new StringBuilder(); for (String jobId : allJobs) { // only remove FINISHED and DISCARDED job intermediate table final ExecutableState state = executableManager.getOutput(jobId).getState(); if (!state.isFinalState()) { workingJobList.add(jobId); -logger.info("Skip intermediate hive table with job id " + jobId + " with job status " + state); +sb.append(jobId).append("(").append(state).append("), "); } } +logger.info("Working jobIDs: " + workingJobList); while ((line = reader.readLine()) != null) { + +logger.info("Checking table " + line); + if (!line.startsWith(preFix)) continue; @@ -295,12 +300,15 @@ public class StorageCleanupJob extends AbstractApplication { if (UUId_PATTERN.matcher(uuid).matches()) { //Check whether it's a hive table in use if (isTableInUse(uuid, workingJobList)) { +logger.info("Skip because not isTableInUse"); isNeedDel = false; } } else { +logger.info("Skip because not match pattern"); isNeedDel = false; } } else { +logger.info("Skip because length not qualified"); isNeedDel = false; }
[3/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/eb39c46c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/eb39c46c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/eb39c46c Branch: refs/heads/yang21-hbase1.x Commit: eb39c46c406468aa32f76d6edfa5453e71eeb8fd Parents: de9f3ad Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 13:37:32 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[2/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/eb39c46c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
kylin git commit: refine StorageCleanupJob
Repository: kylin Updated Branches: refs/heads/yang21 01d68fac8 -> de9f3ad0a refine StorageCleanupJob Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/de9f3ad0 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/de9f3ad0 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/de9f3ad0 Branch: refs/heads/yang21 Commit: de9f3ad0a49ec145ec4166bd1938d8855f425e7b Parents: 01d68fa Author: Hongbin MaAuthored: Tue Nov 1 13:31:04 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 13:31:04 2016 +0800 -- .../kylin/storage/hbase/util/StorageCleanupJob.java | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/de9f3ad0/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java index dffce36..c91de7b 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java @@ -267,16 +267,21 @@ public class StorageCleanupJob extends AbstractApplication { List allHiveTablesNeedToBeDeleted = new ArrayList(); List workingJobList = new ArrayList(); +StringBuilder sb = new StringBuilder(); for (String jobId : allJobs) { // only remove FINISHED and DISCARDED job intermediate table final ExecutableState state = executableManager.getOutput(jobId).getState(); if (!state.isFinalState()) { workingJobList.add(jobId); -logger.info("Skip intermediate hive table with job id " + jobId + " with job status " + state); +sb.append(jobId).append("(").append(state).append("), "); } } +logger.info("Working jobIDs: " + workingJobList); while ((line = reader.readLine()) != null) { + +logger.info("Checking table " + line); + if (!line.startsWith(preFix)) continue; @@ -295,12 +300,15 @@ public class StorageCleanupJob extends AbstractApplication { if (UUId_PATTERN.matcher(uuid).matches()) { //Check whether it's a hive table in use if (isTableInUse(uuid, workingJobList)) { +logger.info("Skip because not isTableInUse"); isNeedDel = false; } } else { +logger.info("Skip because not match pattern"); isNeedDel = false; } } else { +logger.info("Skip because length not qualified"); isNeedDel = false; }
[1/4] kylin git commit: bug fix in integer as partition column [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 7dab3bed5 -> 9ae4376ae (forced update) bug fix in integer as partition column Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/01d68fac Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/01d68fac Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/01d68fac Branch: refs/heads/yang21-cdh5.7 Commit: 01d68fac8a80f08aff065c4a7aba0ab84f36baaa Parents: d155263 Author: Hongbin MaAuthored: Tue Nov 1 09:40:46 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 09:40:46 2016 +0800 -- .../org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/01d68fac/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java index b4a82d4..8ceb841 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java @@ -24,10 +24,10 @@ import org.apache.commons.lang.StringUtils; import org.apache.kylin.common.util.ByteArray; import org.apache.kylin.common.util.DateFormat; import org.apache.kylin.common.util.Pair; -import org.apache.kylin.metadata.model.ISegment; import org.apache.kylin.dimension.AbstractDateDimEnc; import org.apache.kylin.gridtable.GTInfo; import org.apache.kylin.metadata.datatype.DataType; +import org.apache.kylin.metadata.model.ISegment; public class SegmentGTStartAndEnd { private ISegment segment; @@ -67,7 +67,7 @@ public class SegmentGTStartAndEnd { value = DateFormat.formatToDateStr(ts); } else if (partitionColType.isTimeFamily()) { value = DateFormat.formatToTimeWithoutMilliStr(ts); -} else if (partitionColType.isStringFamily()) { +} else if (partitionColType.isStringFamily() || partitionColType.isIntegerFamily()) {//integer like 20160101 String partitionDateFormat = segment.getModel().getPartitionDesc().getPartitionDateFormat(); if (StringUtils.isEmpty(partitionDateFormat)) partitionDateFormat = DateFormat.DEFAULT_DATE_PATTERN;
[3/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e60bcb0c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e60bcb0c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e60bcb0c Branch: refs/heads/yang21-cdh5.7 Commit: e60bcb0c86c8b1207ec274eb4f81ee49d9e3f576 Parents: 01d68fa Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 09:41:59 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[2/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
[4/4] kylin git commit: KYLIN-1672 support kylin on cdh 5.7
KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9ae4376a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9ae4376a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9ae4376a Branch: refs/heads/yang21-cdh5.7 Commit: 9ae4376ae8f692c1e1052608bdd17db14d4224e0 Parents: e60bcb0 Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Tue Nov 1 09:43:55 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9ae4376a/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..ebd8cde 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]+ + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/9ae4376a/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/9ae4376a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/9ae4376a/examples/test_case_data/sandbox/core-site.xml -- diff --git a/examples/test_case_data/sandbox/core-site.xml
[1/3] kylin git commit: bug fix in integer as partition column [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-hbase1.x b701c7ec9 -> e60bcb0c8 (forced update) bug fix in integer as partition column Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/01d68fac Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/01d68fac Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/01d68fac Branch: refs/heads/yang21-hbase1.x Commit: 01d68fac8a80f08aff065c4a7aba0ab84f36baaa Parents: d155263 Author: Hongbin MaAuthored: Tue Nov 1 09:40:46 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 09:40:46 2016 +0800 -- .../org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/01d68fac/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java -- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java index b4a82d4..8ceb841 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/gridtable/SegmentGTStartAndEnd.java @@ -24,10 +24,10 @@ import org.apache.commons.lang.StringUtils; import org.apache.kylin.common.util.ByteArray; import org.apache.kylin.common.util.DateFormat; import org.apache.kylin.common.util.Pair; -import org.apache.kylin.metadata.model.ISegment; import org.apache.kylin.dimension.AbstractDateDimEnc; import org.apache.kylin.gridtable.GTInfo; import org.apache.kylin.metadata.datatype.DataType; +import org.apache.kylin.metadata.model.ISegment; public class SegmentGTStartAndEnd { private ISegment segment; @@ -67,7 +67,7 @@ public class SegmentGTStartAndEnd { value = DateFormat.formatToDateStr(ts); } else if (partitionColType.isTimeFamily()) { value = DateFormat.formatToTimeWithoutMilliStr(ts); -} else if (partitionColType.isStringFamily()) { +} else if (partitionColType.isStringFamily() || partitionColType.isIntegerFamily()) {//integer like 20160101 String partitionDateFormat = segment.getModel().getPartitionDesc().getPartitionDateFormat(); if (StringUtils.isEmpty(partitionDateFormat)) partitionDateFormat = DateFormat.DEFAULT_DATE_PATTERN;
[2/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
[3/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/e60bcb0c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/e60bcb0c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/e60bcb0c Branch: refs/heads/yang21-hbase1.x Commit: e60bcb0c86c8b1207ec274eb4f81ee49d9e3f576 Parents: 01d68fa Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Tue Nov 1 09:41:59 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/e60bcb0c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[1/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 371523c94 -> 7dab3bed5 (forced update) http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin();
[3/3] kylin git commit: KYLIN-1672 support kylin on cdh 5.7
KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/7dab3bed Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/7dab3bed Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/7dab3bed Branch: refs/heads/yang21-cdh5.7 Commit: 7dab3bed5d14dc51ba077cf4a8095aab02275b01 Parents: b701c7e Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Mon Oct 31 18:34:28 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/7dab3bed/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..ebd8cde 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]+ + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/7dab3bed/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/7dab3bed/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/7dab3bed/examples/test_case_data/sandbox/core-site.xml -- diff --git a/examples/test_case_data/sandbox/core-site.xml
[2/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b701c7ec Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b701c7ec Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b701c7ec Branch: refs/heads/yang21-cdh5.7 Commit: b701c7ec9bf8ae04b6e07bf2e253c30717211062 Parents: d155263 Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 18:32:46 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[1/2] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-hbase1.x 90027c2cc -> b701c7ec9 (forced update) http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin();
[2/2] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b701c7ec Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b701c7ec Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b701c7ec Branch: refs/heads/yang21-hbase1.x Commit: b701c7ec9bf8ae04b6e07bf2e253c30717211062 Parents: d155263 Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 18:32:46 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b701c7ec/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[2/2] kylin git commit: KYLIN-1851 Link into DictionaryGenerator, half way
KYLIN-1851 Link into DictionaryGenerator, half way Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/3fedee9f Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/3fedee9f Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/3fedee9f Branch: refs/heads/KYLIN-1851 Commit: 3fedee9fe76c979572594b85fbc6a660eb61f963 Parents: 0359fb3 Author: Li YangAuthored: Mon Oct 31 18:21:36 2016 +0800 Committer: Li Yang Committed: Mon Oct 31 18:21:43 2016 +0800 -- .../java/org/apache/kylin/dict/DictionaryGenerator.java | 4 ++-- .../apache/kylin/dict/TrieDictionaryForestBuilder.java | 4 .../java/org/apache/kylin/dict/lookup/SnapshotTable.java | 11 ++- 3 files changed, 12 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/3fedee9f/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryGenerator.java -- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryGenerator.java b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryGenerator.java index 0adf40e..f2c4507 100644 --- a/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryGenerator.java +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/DictionaryGenerator.java @@ -137,7 +137,7 @@ public class DictionaryGenerator { private static class StringDictBuilder implements IDictionaryBuilder { @Override public Dictionary build(DictionaryInfo dictInfo, IDictionaryValueEnumerator valueEnumerator, int baseId, int nSamples, ArrayList returnSamples) throws IOException { -TrieDictionaryBuilder builder = new TrieDictionaryBuilder(new StringBytesConverter()); +TrieDictionaryForestBuilder builder = new TrieDictionaryForestBuilder(new StringBytesConverter(), baseId); byte[] value; while (valueEnumerator.moveNext()) { value = valueEnumerator.current(); @@ -148,7 +148,7 @@ public class DictionaryGenerator { if (returnSamples.size() < nSamples && returnSamples.contains(v) == false) returnSamples.add(v); } -return builder.build(baseId); +return builder.build(); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/3fedee9f/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForestBuilder.java -- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForestBuilder.java b/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForestBuilder.java index 494ee71..4cc74ce 100755 --- a/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForestBuilder.java +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForestBuilder.java @@ -49,6 +49,10 @@ public class TrieDictionaryForestBuilder { private int curOffset; +public TrieDictionaryForestBuilder(BytesConverter bytesConverter) { +this(bytesConverter, 0); +} + public TrieDictionaryForestBuilder(BytesConverter bytesConverter, int baseId) { this.bytesConverter = bytesConverter; this.trieBuilder = new TrieDictionaryBuilder(bytesConverter); http://git-wip-us.apache.org/repos/asf/kylin/blob/3fedee9f/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java -- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java index db1a170..a60b70d 100644 --- a/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/lookup/SnapshotTable.java @@ -27,7 +27,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import com.google.common.base.Strings; import org.apache.commons.io.IOUtils; import org.apache.commons.lang.ArrayUtils; import org.apache.kylin.common.persistence.ResourceStore; @@ -36,6 +35,7 @@ import org.apache.kylin.common.util.Dictionary; import org.apache.kylin.dict.StringBytesConverter; import org.apache.kylin.dict.TrieDictionary; import org.apache.kylin.dict.TrieDictionaryBuilder; +import org.apache.kylin.dict.TrieDictionaryForestBuilder; import org.apache.kylin.metadata.model.ColumnDesc; import org.apache.kylin.metadata.model.TableDesc; import org.apache.kylin.source.ReadableTable; @@ -43,6 +43,7 @@ import org.apache.kylin.source.ReadableTable; import com.fasterxml.jackson.annotation.JsonAutoDetect; import
[1/2] kylin git commit: KYLIN-1851 New TrieDictionaryForest
Repository: kylin Updated Branches: refs/heads/KYLIN-1851 [created] 3fedee9fe KYLIN-1851 New TrieDictionaryForest Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0359fb30 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0359fb30 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0359fb30 Branch: refs/heads/KYLIN-1851 Commit: 0359fb303412dc019fde4aef44067edb6c3b8a92 Parents: b720b8d Author: xiefan46 Authored: Mon Oct 31 17:09:27 2016 +0800 Committer: Li Yang Committed: Mon Oct 31 17:26:33 2016 +0800 -- .../org/apache/kylin/dict/ByteComparator.java | 44 ++ .../apache/kylin/dict/TrieDictionaryForest.java | 406 .../kylin/dict/TrieDictionaryForestBuilder.java | 113 .../kylin/dict/TrieDictionaryForestTest.java| 657 +++ 4 files changed, 1220 insertions(+) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/0359fb30/core-dictionary/src/main/java/org/apache/kylin/dict/ByteComparator.java -- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/ByteComparator.java b/core-dictionary/src/main/java/org/apache/kylin/dict/ByteComparator.java new file mode 100644 index 000..74d5ec5 --- /dev/null +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/ByteComparator.java @@ -0,0 +1,44 @@ +/* + * 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.dict; + +import org.apache.kylin.common.util.ByteArray; + +import java.util.Comparator; + +/** + * Created by xiefan on 16-10-28. + */ +public class ByteComparator implements Comparator { +private BytesConverter converter; + +public ByteComparator(BytesConverter converter) { +this.converter = converter; +} + +@Override +public int compare(T o1, T o2) { +//return BytesUtil.safeCompareBytes(converter.convertToBytes(o1),converter.convertToBytes(o2)); +byte[] b1 = converter.convertToBytes(o1); +byte[] b2 = converter.convertToBytes(o2); +ByteArray ba1 = new ByteArray(b1, 0, b1.length); +ByteArray ba2 = new ByteArray(b2, 0, b2.length); +return ba1.compareTo(ba2); +} +} http://git-wip-us.apache.org/repos/asf/kylin/blob/0359fb30/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForest.java -- diff --git a/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForest.java b/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForest.java new file mode 100755 index 000..9fb422c --- /dev/null +++ b/core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryForest.java @@ -0,0 +1,406 @@ +/* + * 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.dict; + + +import org.apache.kylin.common.util.ByteArray; +import org.apache.kylin.common.util.BytesUtil; +import org.apache.kylin.common.util.ClassUtil; +import org.apache.kylin.common.util.Dictionary; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.ByteArrayOutputStream; +import java.io.DataInput; +import java.io.DataOutput;
kylin git commit: KYLIN-1672 support kylin on cdh 5.7 [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 dadec307d -> 371523c94 (forced update) KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/371523c9 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/371523c9 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/371523c9 Branch: refs/heads/yang21-cdh5.7 Commit: 371523c94478248920e2d32a788f4897a810e776 Parents: 90027c2 Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Mon Oct 31 18:14:12 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/371523c9/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..ebd8cde 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]+ + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/371523c9/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/371523c9/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/371523c9/examples/test_case_data/sandbox/core-site.xml
[1/4] kylin git commit: AbstractHadoopJob: set hive dependency filter as a config entry [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 0117ed42a -> dadec307d (forced update) AbstractHadoopJob: set hive dependency filter as a config entry Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d155263a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d155263a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d155263a Branch: refs/heads/yang21-cdh5.7 Commit: d155263a21c2a51f3fa0f693d0fb7db194dd50ec Parents: 28fb758 Author: Hongbin MaAuthored: Mon Oct 31 17:03:42 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:03:42 2016 +0800 -- .../java/org/apache/kylin/common/KylinConfigBase.java| 10 +++--- .../apache/kylin/engine/mr/common/AbstractHadoopJob.java | 11 --- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 784b2b1..e703a07 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,9 +22,9 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -426,7 +426,7 @@ abstract public class KylinConfigBase implements Serializable { public int getCubeAlgorithmAutoMapperLimit() { return Integer.parseInt(getOptional("kylin.cube.algorithm.auto.mapper.limit", "500")); } - + @Deprecated public int getCubeAggrGroupMaxSize() { return Integer.parseInt(getOptional("kylin.cube.aggrgroup.max.size", "12")); @@ -500,7 +500,7 @@ abstract public class KylinConfigBase implements Serializable { public boolean getBadQueryPersistentEnabled() { return Boolean.parseBoolean(getOptional("kylin.query.badquery.persistent.enable", "true")); } - + public String[] getQueryTransformers() { return getOptionalStringArray("kylin.query.transformers", new String[0]); } @@ -629,6 +629,10 @@ abstract public class KylinConfigBase implements Serializable { return this.getOptional("kylin.job.hive.database.for.intermediatetable", "default"); } +public String getHiveDependencyFilterList() { +return this.getOptional("kylin.job.dependency.filterlist", "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"); +} + public String getKylinOwner() { return this.getOptional("kylin.owner", ""); } http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index 5d85093..11d995c 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -80,7 +80,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { protected static final Option OPTION_JOB_NAME = OptionBuilder.withArgName(BatchConstants.ARG_JOB_NAME).hasArg().isRequired(true).withDescription("Job name. For example, Kylin_Cuboid_Builder-clsfd_v2_Step_22-D)").create(BatchConstants.ARG_JOB_NAME); protected static final Option OPTION_CUBE_NAME = OptionBuilder.withArgName(BatchConstants.ARG_CUBE_NAME).hasArg().isRequired(true).withDescription("Cube name. For exmaple, flat_item_cube").create(BatchConstants.ARG_CUBE_NAME); protected static final Option OPTION_CUBING_JOB_ID = OptionBuilder.withArgName(BatchConstants.ARG_CUBING_JOB_ID).hasArg().isRequired(false).withDescription("ID of cubing job executable").create(BatchConstants.ARG_CUBING_JOB_ID); -//@Deprecated +//@Deprecated protected static final Option OPTION_SEGMENT_NAME = OptionBuilder.withArgName(BatchConstants.ARG_SEGMENT_NAME).hasArg().isRequired(true).withDescription("Cube segment name").create(BatchConstants.ARG_SEGMENT_NAME); protected static final Option OPTION_SEGMENT_ID =
[4/4] kylin git commit: KYLIN-1672 support kylin on cdh 5.7
KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/dadec307 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/dadec307 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/dadec307 Branch: refs/heads/yang21-cdh5.7 Commit: dadec307dcbab68ebcd43c866d30b16955c4f84e Parents: 90027c2 Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Mon Oct 31 17:29:41 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/dadec307/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..5ceb789 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]*?\.jar + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/dadec307/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/dadec307/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/dadec307/examples/test_case_data/sandbox/core-site.xml -- diff --git a/examples/test_case_data/sandbox/core-site.xml
[2/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
[3/4] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/90027c2c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/90027c2c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/90027c2c Branch: refs/heads/yang21-cdh5.7 Commit: 90027c2cc36496a0f393f250863bbbed99a4b115 Parents: d155263 Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:28:01 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[3/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
KYLIN-1528 Create a branch for v1.5 with HBase 1.x API Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/90027c2c Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/90027c2c Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/90027c2c Branch: refs/heads/yang21-hbase1.x Commit: 90027c2cc36496a0f393f250863bbbed99a4b115 Parents: d155263 Author: shaofengshiAuthored: Wed Mar 23 17:07:05 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:28:01 2016 +0800 -- examples/test_case_data/sandbox/hbase-site.xml | 19 +--- .../kylin/provision/BuildCubeWithEngine.java| 13 ++- pom.xml | 12 +-- .../kylin/rest/security/AclHBaseStorage.java| 4 +- .../rest/security/MockAclHBaseStorage.java | 8 +- .../apache/kylin/rest/security/MockHTable.java | 95 .../rest/security/RealAclHBaseStorage.java | 9 +- .../apache/kylin/rest/service/AclService.java | 25 +++--- .../apache/kylin/rest/service/CubeService.java | 36 +++- .../apache/kylin/rest/service/QueryService.java | 24 +++-- .../apache/kylin/rest/service/UserService.java | 17 ++-- .../kylin/storage/hbase/HBaseConnection.java| 44 - .../kylin/storage/hbase/HBaseResourceStore.java | 31 +++ .../kylin/storage/hbase/HBaseStorage.java | 3 +- .../storage/hbase/cube/SimpleHBaseStore.java| 20 ++--- .../hbase/cube/v1/CubeSegmentTupleIterator.java | 11 +-- .../storage/hbase/cube/v1/CubeStorageQuery.java | 6 +- .../hbase/cube/v1/RegionScannerAdapter.java | 10 ++- .../cube/v1/SerializedHBaseTupleIterator.java | 4 +- .../observer/AggregateRegionObserver.java | 4 +- .../observer/AggregationScanner.java| 14 ++- .../observer/ObserverAggregationCache.java | 10 ++- .../coprocessor/observer/ObserverEnabler.java | 4 +- .../hbase/cube/v2/CubeHBaseEndpointRPC.java | 13 +-- .../storage/hbase/cube/v2/CubeHBaseScanRPC.java | 9 +- .../coprocessor/endpoint/CubeVisitService.java | 4 +- .../storage/hbase/steps/CubeHTableUtil.java | 16 ++-- .../storage/hbase/steps/DeprecatedGCStep.java | 23 ++--- .../storage/hbase/steps/HBaseCuboidWriter.java | 7 +- .../hbase/steps/HBaseStreamingOutput.java | 9 +- .../kylin/storage/hbase/steps/MergeGCStep.java | 23 ++--- .../storage/hbase/util/CleanHtableCLI.java | 12 +-- .../storage/hbase/util/CubeMigrationCLI.java| 36 .../hbase/util/CubeMigrationCheckCLI.java | 17 ++-- .../hbase/util/DeployCoprocessorCLI.java| 22 ++--- .../hbase/util/ExtendCubeToHybridCLI.java | 8 +- .../hbase/util/GridTableHBaseBenchmark.java | 34 +++ .../kylin/storage/hbase/util/HBaseClean.java| 18 ++-- .../hbase/util/HBaseRegionSizeCalculator.java | 35 .../kylin/storage/hbase/util/HBaseUsage.java| 9 +- .../storage/hbase/util/HbaseStreamingInput.java | 30 +++ .../hbase/util/HtableAlterMetadataCLI.java | 9 +- .../storage/hbase/util/OrphanHBaseCleanJob.java | 19 ++-- .../kylin/storage/hbase/util/PingHBaseCLI.java | 15 ++-- .../kylin/storage/hbase/util/RowCounterCLI.java | 11 +-- .../storage/hbase/util/StorageCleanupJob.java | 20 +++-- .../storage/hbase/util/UpdateHTableHostCLI.java | 17 ++-- .../observer/AggregateRegionObserverTest.java | 26 ++ .../v1/filter/TestFuzzyRowFilterV2EndToEnd.java | 5 +- 49 files changed, 408 insertions(+), 462 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/examples/test_case_data/sandbox/hbase-site.xml -- diff --git a/examples/test_case_data/sandbox/hbase-site.xml b/examples/test_case_data/sandbox/hbase-site.xml index 46d5345..734908e 100644 --- a/examples/test_case_data/sandbox/hbase-site.xml +++ b/examples/test_case_data/sandbox/hbase-site.xml @@ -190,22 +190,5 @@ zookeeper.znode.parent /hbase-unsecure - -hbase.client.pause -100 -General client pause value. Used mostly as value to wait -before running a retry of a failed get, region lookup, etc. -See hbase.client.retries.number for description of how we backoff from -this initial pause amount and how this pause works w/ retries. - - -hbase.client.retries.number -5 -Maximum retries. Used as maximum for all retryable -operations such as the getting of a cell's value, starting a row update, -etc. Retry interval is a rough function based on hbase.client.pause. At -first we retry at this interval but then with backoff, we pretty quickly reach -retrying every ten seconds. See
[1/3] kylin git commit: AbstractHadoopJob: set hive dependency filter as a config entry [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-hbase1.x a694c8be2 -> 90027c2cc (forced update) AbstractHadoopJob: set hive dependency filter as a config entry Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d155263a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d155263a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d155263a Branch: refs/heads/yang21-hbase1.x Commit: d155263a21c2a51f3fa0f693d0fb7db194dd50ec Parents: 28fb758 Author: Hongbin MaAuthored: Mon Oct 31 17:03:42 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:03:42 2016 +0800 -- .../java/org/apache/kylin/common/KylinConfigBase.java| 10 +++--- .../apache/kylin/engine/mr/common/AbstractHadoopJob.java | 11 --- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 784b2b1..e703a07 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,9 +22,9 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -426,7 +426,7 @@ abstract public class KylinConfigBase implements Serializable { public int getCubeAlgorithmAutoMapperLimit() { return Integer.parseInt(getOptional("kylin.cube.algorithm.auto.mapper.limit", "500")); } - + @Deprecated public int getCubeAggrGroupMaxSize() { return Integer.parseInt(getOptional("kylin.cube.aggrgroup.max.size", "12")); @@ -500,7 +500,7 @@ abstract public class KylinConfigBase implements Serializable { public boolean getBadQueryPersistentEnabled() { return Boolean.parseBoolean(getOptional("kylin.query.badquery.persistent.enable", "true")); } - + public String[] getQueryTransformers() { return getOptionalStringArray("kylin.query.transformers", new String[0]); } @@ -629,6 +629,10 @@ abstract public class KylinConfigBase implements Serializable { return this.getOptional("kylin.job.hive.database.for.intermediatetable", "default"); } +public String getHiveDependencyFilterList() { +return this.getOptional("kylin.job.dependency.filterlist", "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"); +} + public String getKylinOwner() { return this.getOptional("kylin.owner", ""); } http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index 5d85093..11d995c 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -80,7 +80,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { protected static final Option OPTION_JOB_NAME = OptionBuilder.withArgName(BatchConstants.ARG_JOB_NAME).hasArg().isRequired(true).withDescription("Job name. For example, Kylin_Cuboid_Builder-clsfd_v2_Step_22-D)").create(BatchConstants.ARG_JOB_NAME); protected static final Option OPTION_CUBE_NAME = OptionBuilder.withArgName(BatchConstants.ARG_CUBE_NAME).hasArg().isRequired(true).withDescription("Cube name. For exmaple, flat_item_cube").create(BatchConstants.ARG_CUBE_NAME); protected static final Option OPTION_CUBING_JOB_ID = OptionBuilder.withArgName(BatchConstants.ARG_CUBING_JOB_ID).hasArg().isRequired(false).withDescription("ID of cubing job executable").create(BatchConstants.ARG_CUBING_JOB_ID); -//@Deprecated +//@Deprecated protected static final Option OPTION_SEGMENT_NAME = OptionBuilder.withArgName(BatchConstants.ARG_SEGMENT_NAME).hasArg().isRequired(true).withDescription("Cube segment name").create(BatchConstants.ARG_SEGMENT_NAME); protected static final Option OPTION_SEGMENT_ID =
[2/3] kylin git commit: KYLIN-1528 Create a branch for v1.5 with HBase 1.x API
http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java index 5b2441c..2f7e164 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/MergeGCStep.java @@ -24,11 +24,11 @@ import java.util.Collections; import java.util.List; import org.apache.commons.lang.StringUtils; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; import org.apache.kylin.common.KylinConfig; -import org.apache.kylin.common.util.Bytes; import org.apache.kylin.job.exception.ExecuteException; import org.apache.kylin.job.execution.AbstractExecutable; import org.apache.kylin.job.execution.ExecutableContext; @@ -69,19 +69,20 @@ public class MergeGCStep extends AbstractExecutable { List oldTables = getOldHTables(); if (oldTables != null && oldTables.size() > 0) { String metadataUrlPrefix = KylinConfig.getInstanceFromEnv().getMetadataUrlPrefix(); -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin admin = null; +Admin admin = null; try { -admin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +admin = conn.getAdmin(); + for (String table : oldTables) { -if (admin.tableExists(table)) { -HTableDescriptor tableDescriptor = admin.getTableDescriptor(Bytes.toBytes(table)); +if (admin.tableExists(TableName.valueOf(table))) { +HTableDescriptor tableDescriptor = admin.getTableDescriptor(TableName.valueOf((table))); String host = tableDescriptor.getValue(IRealizationConstants.HTableTag); if (metadataUrlPrefix.equalsIgnoreCase(host)) { -if (admin.isTableEnabled(table)) { -admin.disableTable(table); +if (admin.isTableEnabled(TableName.valueOf(table))) { +admin.disableTable(TableName.valueOf(table)); } -admin.deleteTable(table); +admin.deleteTable(TableName.valueOf(table)); logger.debug("Dropped htable: " + table); output.append("HBase table " + table + " is dropped. \n"); } else { http://git-wip-us.apache.org/repos/asf/kylin/blob/90027c2c/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java -- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java index a150607..56f867a 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/CleanHtableCLI.java @@ -21,9 +21,11 @@ package org.apache.kylin.storage.hbase.util; import java.io.IOException; import org.apache.commons.cli.Options; -import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.client.HBaseAdmin; +import org.apache.hadoop.hbase.TableName; +import org.apache.hadoop.hbase.client.Admin; +import org.apache.hadoop.hbase.client.Connection; +import org.apache.kylin.common.KylinConfig; import org.apache.kylin.common.util.AbstractApplication; import org.apache.kylin.common.util.OptionsHelper; import org.apache.kylin.metadata.realization.IRealizationConstants; @@ -38,8 +40,8 @@ public class CleanHtableCLI extends AbstractApplication { protected static final Logger logger = LoggerFactory.getLogger(CleanHtableCLI.class); private void clean() throws IOException { -Configuration conf = HBaseConnection.getCurrentHBaseConfiguration(); -HBaseAdmin hbaseAdmin = new HBaseAdmin(conf); +Connection conn = HBaseConnection.get(KylinConfig.getInstanceFromEnv().getStorageUrl()); +Admin hbaseAdmin = conn.getAdmin(); for (HTableDescriptor descriptor : hbaseAdmin.listTables()) { String name =
kylin git commit: KYLIN-1672 support kylin on cdh 5.7 [Forced Update!]
Repository: kylin Updated Branches: refs/heads/yang21-cdh5.7 f76ec0ab8 -> 0117ed42a (forced update) KYLIN-1672 support kylin on cdh 5.7 Signed-off-by: Li YangProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/0117ed42 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0117ed42 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0117ed42 Branch: refs/heads/yang21-cdh5.7 Commit: 0117ed42a70307e478bf2cae4efcb3a467683d68 Parents: a694c8b Author: Lynne Jiang Authored: Mon May 16 03:33:27 2016 -0700 Committer: Hongbin Ma Committed: Mon Oct 31 17:24:07 2016 +0800 -- build/conf/kylin.properties | 3 + dev-support/test_all_against_hdp_2_2_4_2_2.sh | 0 .../kylin/engine/mr/steps/MockupMapContext.java | 15 +- examples/test_case_data/sandbox/core-site.xml | 146 +++--- examples/test_case_data/sandbox/hbase-site.xml | 162 ++ examples/test_case_data/sandbox/hdfs-site.xml | 259 ++ examples/test_case_data/sandbox/mapred-site.xml | 398 ++- examples/test_case_data/sandbox/yarn-site.xml | 496 ++- pom.xml | 16 +- server/pom.xml | 36 ++ .../storage/hbase/steps/MockupMapContext.java | 19 +- tool/pom.xml| 12 + 12 files changed, 431 insertions(+), 1131 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/0117ed42/build/conf/kylin.properties -- diff --git a/build/conf/kylin.properties b/build/conf/kylin.properties index ed86bdb..5ceb789 100644 --- a/build/conf/kylin.properties +++ b/build/conf/kylin.properties @@ -118,6 +118,9 @@ kylin.job.mapreduce.mapper.input.rows=100 kylin.job.step.timeout=7200 +# for secure cdh, filtering hive dependency is risky, so filter nothing +kylin.job.dependency.filterlist=[^,]*?\.jar + ### CUBE ### # 'auto', 'inmem', 'layer' or 'random' for testing http://git-wip-us.apache.org/repos/asf/kylin/blob/0117ed42/dev-support/test_all_against_hdp_2_2_4_2_2.sh -- diff --git a/dev-support/test_all_against_hdp_2_2_4_2_2.sh b/dev-support/test_all_against_hdp_2_2_4_2_2.sh old mode 100644 new mode 100755 http://git-wip-us.apache.org/repos/asf/kylin/blob/0117ed42/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java -- diff --git a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java index 847071d..9900465 100644 --- a/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java +++ b/engine-mr/src/test/java/org/apache/kylin/engine/mr/steps/MockupMapContext.java @@ -77,6 +77,7 @@ public class MockupMapContext { outKV[0] = key; outKV[1] = value; } + } @Override @@ -99,6 +100,7 @@ public class MockupMapContext { throw new NotImplementedException(); } + @Override public float getProgress() { throw new NotImplementedException(); @@ -195,17 +197,17 @@ public class MockupMapContext { } @Override -public RawComparator getSortComparator() { +public boolean userClassesTakesPrecedence() { throw new NotImplementedException(); } @Override -public String getJar() { +public RawComparator getSortComparator() { throw new NotImplementedException(); } @Override -public RawComparator getGroupingComparator() { +public String getJar() { throw new NotImplementedException(); } @@ -221,7 +223,7 @@ public class MockupMapContext { @Override public boolean getProfileEnabled() { -throw new NotImplementedException(); +return false; } @Override @@ -308,6 +310,11 @@ public class MockupMapContext { public RawComparator getCombinerKeyGroupingComparator() { throw new NotImplementedException(); } + +@Override +public RawComparator getGroupingComparator() { +return null; +} }); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/0117ed42/examples/test_case_data/sandbox/core-site.xml
kylin git commit: AbstractHadoopJob: set hive dependency filter as a config entry
Repository: kylin Updated Branches: refs/heads/v1.6.0-rc1 21ecfce6d -> a8922e87b AbstractHadoopJob: set hive dependency filter as a config entry Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/a8922e87 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/a8922e87 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/a8922e87 Branch: refs/heads/v1.6.0-rc1 Commit: a8922e87b1f483dc010185f4a08aae970898c45d Parents: 21ecfce Author: Hongbin MaAuthored: Mon Oct 31 17:03:42 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:11:01 2016 +0800 -- .../main/java/org/apache/kylin/common/KylinConfigBase.java | 8 ++-- .../apache/kylin/engine/mr/common/AbstractHadoopJob.java| 9 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/a8922e87/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 26c280b..011155f 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,9 +22,9 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -504,7 +504,7 @@ abstract public class KylinConfigBase implements Serializable { public boolean getBadQueryPersistentEnabled() { return Boolean.parseBoolean(getOptional("kylin.query.badquery.persistent.enable", "true")); } - + public String[] getQueryTransformers() { return getOptionalStringArray("kylin.query.transformers", new String[0]); } @@ -633,6 +633,10 @@ abstract public class KylinConfigBase implements Serializable { return this.getOptional("kylin.job.hive.database.for.intermediatetable", "default"); } +public String getHiveDependencyFilterList() { +return this.getOptional("kylin.job.dependency.filterlist", "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"); +} + public String getKylinOwner() { return this.getOptional("kylin.owner", ""); } http://git-wip-us.apache.org/repos/asf/kylin/blob/a8922e87/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index 72f4437..77791ce 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -96,8 +96,6 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { private static final String MAP_REDUCE_CLASSPATH = "mapreduce.application.classpath"; -private static final String KYLIN_HIVE_DEPENDENCY_JARS = "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"; - protected static void runJob(Tool job, String[] args) { try { int exitCode = ToolRunner.run(job, args); @@ -200,8 +198,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { kylinHiveDependency = kylinHiveDependency.replace(":", ","); logger.info("Hive Dependencies Before Filtered: " + kylinHiveDependency); -//String filteredHive = filterKylinHiveDependency(kylinHiveDependency); -String filteredHive = kylinHiveDependency; +String filteredHive = filterKylinHiveDependency(kylinHiveDependency, kylinConf); logger.info("Hive Dependencies After Filtered: " + filteredHive); StringUtil.appendWithSeparator(kylinDependency, filteredHive); @@ -259,13 +256,13 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { } } -private String filterKylinHiveDependency(String kylinHiveDependency) { +private String filterKylinHiveDependency(String kylinHiveDependency, KylinConfig config) { if (StringUtils.isBlank(kylinHiveDependency)) return "";
[2/2] kylin git commit: KYLIN-1321 Add derived checkbox for lookup table columns on Auto Generate Dimensions panel, style update
KYLIN-1321 Add derived checkbox for lookup table columns on Auto Generate Dimensions panel, style update Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/21ecfce6 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/21ecfce6 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/21ecfce6 Branch: refs/heads/v1.6.0-rc1 Commit: 21ecfce6d0593c891c4cf7a6360c5ee29b01710c Parents: d01a1f7 Author: JasonAuthored: Mon Oct 31 17:08:14 2016 +0800 Committer: Jason Committed: Mon Oct 31 17:10:07 2016 +0800 -- webapp/app/partials/cubeDesigner/dimensions.html | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/21ecfce6/webapp/app/partials/cubeDesigner/dimensions.html -- diff --git a/webapp/app/partials/cubeDesigner/dimensions.html b/webapp/app/partials/cubeDesigner/dimensions.html index 62ca5c9..9539250 100644 --- a/webapp/app/partials/cubeDesigner/dimensions.html +++ b/webapp/app/partials/cubeDesigner/dimensions.html @@ -240,10 +240,10 @@ {{table}}[FactTable] -Select All +Select All Name Columns - + @@ -266,10 +266,10 @@ {{table}}[LookupTable] -Select All +Select All Name Columns - + @@ -299,8 +299,8 @@ -OK Cancel +OK
[1/2] kylin git commit: KYLIN Add derived checkbox for lookup table columns on Auto Generate Dimensions panel
Repository: kylin Updated Branches: refs/heads/v1.6.0-rc1 5218c9f6b -> 21ecfce6d KYLIN Add derived checkbox for lookup table columns on Auto Generate Dimensions panel Signed-off-by: JasonProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d01a1f74 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d01a1f74 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d01a1f74 Branch: refs/heads/v1.6.0-rc1 Commit: d01a1f7433a2529c5075f09786a50a86d5ea4653 Parents: 5218c9f Author: chenzhx <346839...@qq.com> Authored: Fri Oct 28 15:45:22 2016 +0800 Committer: Jason Committed: Mon Oct 31 17:09:58 2016 +0800 -- webapp/app/js/controllers/cubeDimensions.js | 110 +++ .../app/partials/cubeDesigner/dimensions.html | 26 ++--- 2 files changed, 100 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d01a1f74/webapp/app/js/controllers/cubeDimensions.js -- diff --git a/webapp/app/js/controllers/cubeDimensions.js b/webapp/app/js/controllers/cubeDimensions.js index ba71c96..7cb850b 100644 --- a/webapp/app/js/controllers/cubeDimensions.js +++ b/webapp/app/js/controllers/cubeDimensions.js @@ -74,11 +74,12 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel,cub cols[i].isLookup = false; // Default not selected and not disabled. -factSelectAvailable[cols[i].name] = {name:cols[i].name ,selected: false, disabled: false}; +factSelectAvailable[cols[i].name] = {name:cols[i].name ,selected: false}; } $scope.availableColumns[factTable] = cols; +factSelectAvailable.all=false; $scope.selectedColumns[factTable] = factSelectAvailable; $scope.availableTables.push(factTable); @@ -96,10 +97,11 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel,cub cols2[k].isLookup = true; // Default not selected and not disabled. -lookupSelectAvailable[cols2[k].name] = {name:cols2[k].name,selected: false, disabled: false}; +lookupSelectAvailable[cols2[k].name] = {name:cols2[k].name,selected: false}; } $scope.availableColumns[lookups[j].table] = cols2; +lookupSelectAvailable.all=false; $scope.selectedColumns[lookups[j].table] = lookupSelectAvailable; if($scope.availableTables.indexOf(lookups[j].table)==-1){ $scope.availableTables.push(lookups[j].table); @@ -111,14 +113,22 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel,cub $scope.initColumnStatus = function () { angular.forEach($scope.cubeMetaFrame.dimensions, function (dim) { var cols = dimCols(dim); - angular.forEach(cols, function (colName) { if(dim.derived){ - $scope.selectedColumns[dim.table][colName] = {name:dim.name, selected: true, disabled: true,normal:"false"}; + $scope.selectedColumns[dim.table][colName] = {name:dim.name, selected: true, normal:"false"}; }else{ - $scope.selectedColumns[dim.table][colName] = {name:dim.name, selected: true, disabled: true,normal:"true"}; + $scope.selectedColumns[dim.table][colName] = {name:dim.name, selected: true, normal:"true"}; } - }); +}); +}); +angular.forEach($scope.selectedColumns,function(value,table){ + var all=true; + angular.forEach(value,function(col){ + if(col.selected==false& col=="object"){ +all=false; + } + }); + $scope.selectedColumns[table].all=all; }); }; @@ -300,9 +310,9 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel,cub var cols = dimCols(dim); angular.forEach(cols, function (colName) { if(dim.table==$scope.metaModel.model.fact_table){ - $scope.selectedColumns[dim.table][colName] = {name:colName,selected: false, disabled: false}; + $scope.selectedColumns[dim.table][colName] = {name:colName,selected: false}; }else{ - $scope.selectedColumns[dim.table][colName] = {name:colName,selected: false, disabled: false}; + $scope.selectedColumns[dim.table][colName] = {name:colName,selected: false}; } }); }; @@ -395,25 +405,77 @@ KylinApp.controller('CubeDimensionsCtrl', function ($scope, $modal,MetaModel,cub }; $scope.autoChange= function(table,name){ -
[1/2] kylin git commit: KYLIN-1321 Add derived checkbox for lookup table columns on Auto Generate Dimensions panel, style update
Repository: kylin Updated Branches: refs/heads/master ca976f319 -> b720b8dc9 KYLIN-1321 Add derived checkbox for lookup table columns on Auto Generate Dimensions panel, style update Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b720b8dc Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b720b8dc Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b720b8dc Branch: refs/heads/master Commit: b720b8dc90f21ac642d24dc386b6cb0b7509ebd2 Parents: 81c6bd9 Author: JasonAuthored: Mon Oct 31 17:08:14 2016 +0800 Committer: Jason Committed: Mon Oct 31 17:08:56 2016 +0800 -- webapp/app/partials/cubeDesigner/dimensions.html | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/b720b8dc/webapp/app/partials/cubeDesigner/dimensions.html -- diff --git a/webapp/app/partials/cubeDesigner/dimensions.html b/webapp/app/partials/cubeDesigner/dimensions.html index 62ca5c9..9539250 100644 --- a/webapp/app/partials/cubeDesigner/dimensions.html +++ b/webapp/app/partials/cubeDesigner/dimensions.html @@ -240,10 +240,10 @@ {{table}}[FactTable] -Select All +Select All Name Columns - + @@ -266,10 +266,10 @@ {{table}}[LookupTable] -Select All +Select All Name Columns - + @@ -299,8 +299,8 @@ -OK Cancel +OK
kylin git commit: AbstractHadoopJob: set hive dependency filter as a config entry
Repository: kylin Updated Branches: refs/heads/master 02f8550d8 -> ca976f319 AbstractHadoopJob: set hive dependency filter as a config entry Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ca976f31 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ca976f31 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ca976f31 Branch: refs/heads/master Commit: ca976f31910de0e4b69533028dfc259e6f6d6f78 Parents: 02f8550 Author: Hongbin MaAuthored: Mon Oct 31 17:03:42 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:07:52 2016 +0800 -- .../java/org/apache/kylin/common/KylinConfigBase.java | 10 +++--- .../apache/kylin/engine/mr/common/AbstractHadoopJob.java | 9 +++-- 2 files changed, 10 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/ca976f31/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 4f294fa..acc4eb1 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,9 +22,9 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -430,7 +430,7 @@ abstract public class KylinConfigBase implements Serializable { public int getCubeAlgorithmAutoMapperLimit() { return Integer.parseInt(getOptional("kylin.cube.algorithm.auto.mapper.limit", "500")); } - + @Deprecated public int getCubeAggrGroupMaxSize() { return Integer.parseInt(getOptional("kylin.cube.aggrgroup.max.size", "12")); @@ -500,7 +500,7 @@ abstract public class KylinConfigBase implements Serializable { public boolean getBadQueryPersistentEnabled() { return Boolean.parseBoolean(getOptional("kylin.query.badquery.persistent.enable", "true")); } - + public String[] getQueryTransformers() { return getOptionalStringArray("kylin.query.transformers", new String[0]); } @@ -629,6 +629,10 @@ abstract public class KylinConfigBase implements Serializable { return this.getOptional("kylin.job.hive.database.for.intermediatetable", "default"); } +public String getHiveDependencyFilterList() { +return this.getOptional("kylin.job.dependency.filterlist", "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"); +} + public String getKylinOwner() { return this.getOptional("kylin.owner", ""); } http://git-wip-us.apache.org/repos/asf/kylin/blob/ca976f31/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index 72f4437..77791ce 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -96,8 +96,6 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { private static final String MAP_REDUCE_CLASSPATH = "mapreduce.application.classpath"; -private static final String KYLIN_HIVE_DEPENDENCY_JARS = "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"; - protected static void runJob(Tool job, String[] args) { try { int exitCode = ToolRunner.run(job, args); @@ -200,8 +198,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { kylinHiveDependency = kylinHiveDependency.replace(":", ","); logger.info("Hive Dependencies Before Filtered: " + kylinHiveDependency); -//String filteredHive = filterKylinHiveDependency(kylinHiveDependency); -String filteredHive = kylinHiveDependency; +String filteredHive = filterKylinHiveDependency(kylinHiveDependency, kylinConf); logger.info("Hive Dependencies After Filtered: " + filteredHive); StringUtil.appendWithSeparator(kylinDependency,
kylin git commit: AbstractHadoopJob: set hive dependency filter as a config entry
Repository: kylin Updated Branches: refs/heads/yang21 28fb7588c -> d155263a2 AbstractHadoopJob: set hive dependency filter as a config entry Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/d155263a Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/d155263a Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/d155263a Branch: refs/heads/yang21 Commit: d155263a21c2a51f3fa0f693d0fb7db194dd50ec Parents: 28fb758 Author: Hongbin MaAuthored: Mon Oct 31 17:03:42 2016 +0800 Committer: Hongbin Ma Committed: Mon Oct 31 17:03:42 2016 +0800 -- .../java/org/apache/kylin/common/KylinConfigBase.java| 10 +++--- .../apache/kylin/engine/mr/common/AbstractHadoopJob.java | 11 --- 2 files changed, 11 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java -- diff --git a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java index 784b2b1..e703a07 100644 --- a/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java +++ b/core-common/src/main/java/org/apache/kylin/common/KylinConfigBase.java @@ -22,9 +22,9 @@ import java.io.File; import java.io.IOException; import java.io.Serializable; import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; import java.util.SortedSet; -import java.util.Map.Entry; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -426,7 +426,7 @@ abstract public class KylinConfigBase implements Serializable { public int getCubeAlgorithmAutoMapperLimit() { return Integer.parseInt(getOptional("kylin.cube.algorithm.auto.mapper.limit", "500")); } - + @Deprecated public int getCubeAggrGroupMaxSize() { return Integer.parseInt(getOptional("kylin.cube.aggrgroup.max.size", "12")); @@ -500,7 +500,7 @@ abstract public class KylinConfigBase implements Serializable { public boolean getBadQueryPersistentEnabled() { return Boolean.parseBoolean(getOptional("kylin.query.badquery.persistent.enable", "true")); } - + public String[] getQueryTransformers() { return getOptionalStringArray("kylin.query.transformers", new String[0]); } @@ -629,6 +629,10 @@ abstract public class KylinConfigBase implements Serializable { return this.getOptional("kylin.job.hive.database.for.intermediatetable", "default"); } +public String getHiveDependencyFilterList() { +return this.getOptional("kylin.job.dependency.filterlist", "[^,]*hive-exec[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-metastore[0-9.-]+[^,]*?\\.jar" + "|" + "[^,]*hive-hcatalog-core[0-9.-]+[^,]*?\\.jar"); +} + public String getKylinOwner() { return this.getOptional("kylin.owner", ""); } http://git-wip-us.apache.org/repos/asf/kylin/blob/d155263a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java -- diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java index 5d85093..11d995c 100644 --- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java +++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/common/AbstractHadoopJob.java @@ -80,7 +80,7 @@ public abstract class AbstractHadoopJob extends Configured implements Tool { protected static final Option OPTION_JOB_NAME = OptionBuilder.withArgName(BatchConstants.ARG_JOB_NAME).hasArg().isRequired(true).withDescription("Job name. For example, Kylin_Cuboid_Builder-clsfd_v2_Step_22-D)").create(BatchConstants.ARG_JOB_NAME); protected static final Option OPTION_CUBE_NAME = OptionBuilder.withArgName(BatchConstants.ARG_CUBE_NAME).hasArg().isRequired(true).withDescription("Cube name. For exmaple, flat_item_cube").create(BatchConstants.ARG_CUBE_NAME); protected static final Option OPTION_CUBING_JOB_ID = OptionBuilder.withArgName(BatchConstants.ARG_CUBING_JOB_ID).hasArg().isRequired(false).withDescription("ID of cubing job executable").create(BatchConstants.ARG_CUBING_JOB_ID); -//@Deprecated +//@Deprecated protected static final Option OPTION_SEGMENT_NAME = OptionBuilder.withArgName(BatchConstants.ARG_SEGMENT_NAME).hasArg().isRequired(true).withDescription("Cube segment name").create(BatchConstants.ARG_SEGMENT_NAME); protected static final Option OPTION_SEGMENT_ID =
kylin git commit: KYLIN 1820 Column autocomplete should remove the user input in model designer
Repository: kylin Updated Branches: refs/heads/v1.6.0-rc1 647d51e1d -> 5218c9f6b KYLIN 1820 Column autocomplete should remove the user input in model designer Signed-off-by: JasonProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/5218c9f6 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/5218c9f6 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/5218c9f6 Branch: refs/heads/v1.6.0-rc1 Commit: 5218c9f6bc6e27e86f29d3b75e5c6aaa73a9cb98 Parents: 647d51e Author: chenzhx <346839...@qq.com> Authored: Wed Oct 26 11:35:15 2016 +0800 Committer: Jason Committed: Mon Oct 31 16:59:15 2016 +0800 -- webapp/app/js/directives/select.js | 939 1 file changed, 703 insertions(+), 236 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/5218c9f6/webapp/app/js/directives/select.js -- diff --git a/webapp/app/js/directives/select.js b/webapp/app/js/directives/select.js index c8cf6a2..7327af9 100644 --- a/webapp/app/js/directives/select.js +++ b/webapp/app/js/directives/select.js @@ -1,14 +1,13 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.13.2 - 2015-10-09T15:34:24.040Z + * Version: 0.19.5 - 2016-10-24T23:13:59.434Z * License: MIT */ (function () { "use strict"; - var KEY = { TAB: 9, ENTER: 13, @@ -42,7 +41,7 @@ var KEY = { return true; } -if (e.metaKey) return true; +if (e.metaKey || e.ctrlKey || e.altKey) return true; return false; }, @@ -55,6 +54,13 @@ var KEY = { }, isHorizontalMovement: function (k){ return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k); +}, +toSeparator: function (k) { + var sep = {ENTER:"\n",TAB:"\t",SPACE:" "}[k]; + if (sep) return sep; + // return undefined for special keys other than enter, tab or space. + // no way to use them to cut strings. + return KEY[k] ? undefined : k; } }; @@ -103,11 +109,16 @@ var uis = angular.module('ui.select', []) placeholder: '', // Empty by default, like HTML tag refreshDelay: 1000, // In milliseconds closeOnSelect: true, + skipFocusser: false, dropdownPosition: 'auto', + removeSelected: true, + resetSearchInput: true, generateId: function() { return latestId++; }, - appendToBody: false + appendToBody: false, + spinnerEnabled: false, + spinnerClass: 'glyphicon-refresh ui-select-spin' }) // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913 @@ -139,11 +150,11 @@ var uis = angular.module('ui.select', []) */ .filter('highlight', function() { function escapeRegexp(queryToEscape) { -return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); +return ('' + queryToEscape).replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); } return function(matchItem, query) { -return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; +return query && matchItem ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; }; }) @@ -169,8 +180,8 @@ var uis = angular.module('ui.select', []) }]); uis.directive('uiSelectChoices', - ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', - function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile) { + ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', '$window', + function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile, $window) { return { restrict: 'EA', @@ -178,6 +189,9 @@ uis.directive('uiSelectChoices', replace: true, transclude: true, templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-choices'); + // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; return theme + '/choices.tpl.html'; @@ -187,44 +201,59 @@ uis.directive('uiSelectChoices', if (!tAttrs.repeat) throw uiSelectMinErr('repeat', "Expected 'repeat' expression."); - return function link(scope, element, attrs, $select, transcludeFn) { + // var repeat = RepeatParser.parse(attrs.repeat); + var groupByExp = tAttrs.groupBy; + var groupFilterExp = tAttrs.groupFilter; -// var repeat = RepeatParser.parse(attrs.repeat); -var groupByExp = attrs.groupBy; -var groupFilterExp = attrs.groupFilter; + if (groupByExp) { +var groups = tElement.querySelectorAll('.ui-select-choices-group'); +if (groups.length !== 1) throw uiSelectMinErr('rows',
kylin git commit: KYLIN 1820 Column autocomplete should remove the user input in model designer
Repository: kylin Updated Branches: refs/heads/master 9fd38bb7a -> 02f8550d8 KYLIN 1820 Column autocomplete should remove the user input in model designer Signed-off-by: JasonProject: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/02f8550d Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/02f8550d Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/02f8550d Branch: refs/heads/master Commit: 02f8550d8eec6d25a39cead51b7cdecfaebbec4e Parents: 9fd38bb Author: chenzhx <346839...@qq.com> Authored: Wed Oct 26 11:35:15 2016 +0800 Committer: Jason Committed: Mon Oct 31 16:56:50 2016 +0800 -- webapp/app/js/directives/select.js | 939 1 file changed, 703 insertions(+), 236 deletions(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/02f8550d/webapp/app/js/directives/select.js -- diff --git a/webapp/app/js/directives/select.js b/webapp/app/js/directives/select.js index c8cf6a2..7327af9 100644 --- a/webapp/app/js/directives/select.js +++ b/webapp/app/js/directives/select.js @@ -1,14 +1,13 @@ /*! * ui-select * http://github.com/angular-ui/ui-select - * Version: 0.13.2 - 2015-10-09T15:34:24.040Z + * Version: 0.19.5 - 2016-10-24T23:13:59.434Z * License: MIT */ (function () { "use strict"; - var KEY = { TAB: 9, ENTER: 13, @@ -42,7 +41,7 @@ var KEY = { return true; } -if (e.metaKey) return true; +if (e.metaKey || e.ctrlKey || e.altKey) return true; return false; }, @@ -55,6 +54,13 @@ var KEY = { }, isHorizontalMovement: function (k){ return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k); +}, +toSeparator: function (k) { + var sep = {ENTER:"\n",TAB:"\t",SPACE:" "}[k]; + if (sep) return sep; + // return undefined for special keys other than enter, tab or space. + // no way to use them to cut strings. + return KEY[k] ? undefined : k; } }; @@ -103,11 +109,16 @@ var uis = angular.module('ui.select', []) placeholder: '', // Empty by default, like HTML tag refreshDelay: 1000, // In milliseconds closeOnSelect: true, + skipFocusser: false, dropdownPosition: 'auto', + removeSelected: true, + resetSearchInput: true, generateId: function() { return latestId++; }, - appendToBody: false + appendToBody: false, + spinnerEnabled: false, + spinnerClass: 'glyphicon-refresh ui-select-spin' }) // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913 @@ -139,11 +150,11 @@ var uis = angular.module('ui.select', []) */ .filter('highlight', function() { function escapeRegexp(queryToEscape) { -return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); +return ('' + queryToEscape).replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1'); } return function(matchItem, query) { -return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; +return query && matchItem ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '$&') : matchItem; }; }) @@ -169,8 +180,8 @@ var uis = angular.module('ui.select', []) }]); uis.directive('uiSelectChoices', - ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', - function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile) { + ['uiSelectConfig', 'uisRepeatParser', 'uiSelectMinErr', '$compile', '$window', + function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile, $window) { return { restrict: 'EA', @@ -178,6 +189,9 @@ uis.directive('uiSelectChoices', replace: true, transclude: true, templateUrl: function(tElement) { + // Needed so the uiSelect can detect the transcluded content + tElement.addClass('ui-select-choices'); + // Gets theme attribute from parent (ui-select) var theme = tElement.parent().attr('theme') || uiSelectConfig.theme; return theme + '/choices.tpl.html'; @@ -187,44 +201,59 @@ uis.directive('uiSelectChoices', if (!tAttrs.repeat) throw uiSelectMinErr('repeat', "Expected 'repeat' expression."); - return function link(scope, element, attrs, $select, transcludeFn) { + // var repeat = RepeatParser.parse(attrs.repeat); + var groupByExp = tAttrs.groupBy; + var groupFilterExp = tAttrs.groupFilter; -// var repeat = RepeatParser.parse(attrs.repeat); -var groupByExp = attrs.groupBy; -var groupFilterExp = attrs.groupFilter; + if (groupByExp) { +var groups = tElement.querySelectorAll('.ui-select-choices-group'); +if (groups.length !== 1) throw uiSelectMinErr('rows', "Expected
kylin git commit: KYLIN-2140 rename packaged js name
Repository: kylin Updated Branches: refs/heads/master dd61f58a9 -> 9fd38bb7a KYLIN-2140 rename packaged js name Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/9fd38bb7 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/9fd38bb7 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/9fd38bb7 Branch: refs/heads/master Commit: 9fd38bb7ad19c0feb6f7a8066718db15e77f2a3b Parents: dd61f58 Author: JasonAuthored: Mon Oct 31 14:55:06 2016 +0800 Committer: Jason Committed: Mon Oct 31 14:56:10 2016 +0800 -- build/script/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/9fd38bb7/build/script/build.sh -- diff --git a/build/script/build.sh b/build/script/build.sh index f54d41c..c68ca94 100755 --- a/build/script/build.sh +++ b/build/script/build.sh @@ -31,4 +31,4 @@ npm install -g bower || { exit 1; } bower --allow-root install || { exit 1; } npm install || { exit 1; } npm install -g grunt-cli|| { exit 1; } -grunt dev --buildEnv=dev|| { exit 1; } +grunt dev --buildEnv=dev --buildNumber=`date "+%Y%m%d%H%M%S"` || { exit 1; }
kylin git commit: KYLIN-2140 rename packaged js name
Repository: kylin Updated Branches: refs/heads/v1.6.0-rc1 82e99078c -> 647d51e1d KYLIN-2140 rename packaged js name Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/647d51e1 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/647d51e1 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/647d51e1 Branch: refs/heads/v1.6.0-rc1 Commit: 647d51e1d5596774dcd4aab835f9ad4ffc81dd5a Parents: 82e9907 Author: JasonAuthored: Mon Oct 31 14:55:06 2016 +0800 Committer: Jason Committed: Mon Oct 31 14:55:06 2016 +0800 -- build/script/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/kylin/blob/647d51e1/build/script/build.sh -- diff --git a/build/script/build.sh b/build/script/build.sh index f54d41c..c68ca94 100755 --- a/build/script/build.sh +++ b/build/script/build.sh @@ -31,4 +31,4 @@ npm install -g bower || { exit 1; } bower --allow-root install || { exit 1; } npm install || { exit 1; } npm install -g grunt-cli|| { exit 1; } -grunt dev --buildEnv=dev|| { exit 1; } +grunt dev --buildEnv=dev --buildNumber=`date "+%Y%m%d%H%M%S"` || { exit 1; }