You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2020/02/28 12:02:49 UTC
[kylin] branch master updated (1a29468 -> 1493b49)
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git.
from 1a29468 KYLIN-4388 Refine the Dockerfile
new b5d444b KYLIN-4356: clean outdate DefaultChainedExecutable job
new 1493b49 KYLIN-4356: add CardinalityExecutable and clean outdate job
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../{Idempotent.java => CardinalityExecutable.java} | 9 +++++----
.../java/org/apache/kylin/rest/job/MetadataCleanupJob.java | 14 ++++++++++++--
.../java/org/apache/kylin/rest/service/TableService.java | 4 ++--
3 files changed, 19 insertions(+), 8 deletions(-)
copy core-job/src/main/java/org/apache/kylin/job/execution/{Idempotent.java => CardinalityExecutable.java} (86%)
[kylin] 01/02: KYLIN-4356: clean outdate DefaultChainedExecutable
job
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit b5d444b689a559725e9d1d53e6664e3eeec92f93
Author: Zhou Kang <zh...@xiaomi.com>
AuthorDate: Sun Jan 19 19:37:10 2020 +0800
KYLIN-4356: clean outdate DefaultChainedExecutable job
---
.../java/org/apache/kylin/rest/job/MetadataCleanupJob.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java b/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
index cb56c25..a49539d 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
@@ -39,10 +39,13 @@ import org.apache.kylin.cube.CubeManager;
import org.apache.kylin.cube.CubeSegment;
import org.apache.kylin.dict.DictionaryInfo;
import org.apache.kylin.dict.DictionaryInfoSerializer;
+import org.apache.kylin.engine.mr.CubingJob;
import org.apache.kylin.job.dao.ExecutableDao;
import org.apache.kylin.job.dao.ExecutableOutputPO;
import org.apache.kylin.job.dao.ExecutablePO;
import org.apache.kylin.job.exception.PersistentException;
+import org.apache.kylin.job.execution.CheckpointExecutable;
+import org.apache.kylin.job.execution.DefaultChainedExecutable;
import org.apache.kylin.job.execution.ExecutableState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -196,8 +199,15 @@ public class MetadataCleanupJob {
try {
ExecutableOutputPO output = executableDao.getJobOutput(jobId);
String status = output.getStatus();
- if (StringUtils.equals(status, ExecutableState.SUCCEED.toString())
- || StringUtils.equals(status, ExecutableState.DISCARDED.toString())) {
+ String jobType = job.getType();
+ if (jobType.equals(CubingJob.class.getName())
+ || jobType.equals(CheckpointExecutable.class.getName())) {
+ if (StringUtils.equals(status, ExecutableState.SUCCEED.toString())
+ || StringUtils.equals(status, ExecutableState.DISCARDED.toString())) {
+ isComplete = true;
+ }
+ } else if (jobType.equals(DefaultChainedExecutable.class.getName())) {
+ // Ignore state of DefaultChainedExecutable
isComplete = true;
}
} catch (PersistentException e) {
[kylin] 02/02: KYLIN-4356: add CardinalityExecutable and clean
outdate job
Posted by sh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
shaofengshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 1493b49e76569aa0d8e92afbdc931425486fcd60
Author: Zhou Kang <zh...@xiaomi.com>
AuthorDate: Sun Feb 16 20:58:43 2020 +0800
KYLIN-4356: add CardinalityExecutable and clean outdate job
---
.../kylin/job/execution/CardinalityExecutable.java | 29 ++++++++++++++++++++++
.../apache/kylin/rest/job/MetadataCleanupJob.java | 4 +--
.../apache/kylin/rest/service/TableService.java | 4 +--
3 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/core-job/src/main/java/org/apache/kylin/job/execution/CardinalityExecutable.java b/core-job/src/main/java/org/apache/kylin/job/execution/CardinalityExecutable.java
new file mode 100644
index 0000000..ce1b4fb
--- /dev/null
+++ b/core-job/src/main/java/org/apache/kylin/job/execution/CardinalityExecutable.java
@@ -0,0 +1,29 @@
+/*
+ * 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.job.execution;
+
+/**
+ */
+public class CardinalityExecutable extends DefaultChainedExecutable {
+
+
+ public CardinalityExecutable() {
+ super();
+ }
+}
diff --git a/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java b/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
index a49539d..f52bf55 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/job/MetadataCleanupJob.java
@@ -44,8 +44,8 @@ import org.apache.kylin.job.dao.ExecutableDao;
import org.apache.kylin.job.dao.ExecutableOutputPO;
import org.apache.kylin.job.dao.ExecutablePO;
import org.apache.kylin.job.exception.PersistentException;
+import org.apache.kylin.job.execution.CardinalityExecutable;
import org.apache.kylin.job.execution.CheckpointExecutable;
-import org.apache.kylin.job.execution.DefaultChainedExecutable;
import org.apache.kylin.job.execution.ExecutableState;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -206,7 +206,7 @@ public class MetadataCleanupJob {
|| StringUtils.equals(status, ExecutableState.DISCARDED.toString())) {
isComplete = true;
}
- } else if (jobType.equals(DefaultChainedExecutable.class.getName())) {
+ } else if (jobType.equals(CardinalityExecutable.class.getName())) {
// Ignore state of DefaultChainedExecutable
isComplete = true;
}
diff --git a/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java b/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
index 4c95187..8078bbe 100644
--- a/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/service/TableService.java
@@ -49,7 +49,7 @@ import org.apache.kylin.engine.mr.common.HadoopShellExecutable;
import org.apache.kylin.engine.mr.common.MapReduceExecutable;
import org.apache.kylin.engine.spark.SparkColumnCardinality;
import org.apache.kylin.engine.spark.SparkExecutable;
-import org.apache.kylin.job.execution.DefaultChainedExecutable;
+import org.apache.kylin.job.execution.CardinalityExecutable;
import org.apache.kylin.job.execution.ExecutableManager;
import org.apache.kylin.job.execution.ExecutableState;
import org.apache.kylin.metadata.TableMetadataManager;
@@ -490,7 +490,7 @@ public class TableService extends BasicService {
throw e;
}
- DefaultChainedExecutable job = new DefaultChainedExecutable();
+ CardinalityExecutable job = new CardinalityExecutable();
//make sure the job could be scheduled when the DistributedScheduler is enable.
job.setParam("segmentId", tableName);
job.setName("Hive Column Cardinality calculation for table '" + tableName + "'");