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 2018/08/01 09:07:25 UTC

[kylin] branch master updated: KYLIN-3478 Enhance backwards compatibility.

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


The following commit(s) were added to refs/heads/master by this push:
     new de693a7  KYLIN-3478 Enhance backwards compatibility.
de693a7 is described below

commit de693a75a64982c20ee6a6f3858c7eb0adbd926b
Author: hujixu <hu...@youzan.com>
AuthorDate: Wed Aug 1 14:12:34 2018 +0800

    KYLIN-3478 Enhance backwards compatibility.
---
 .../org/apache/kylin/source/hive/HiveMRInput.java  | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
index d1b4fc9..2e39285 100644
--- a/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
+++ b/source-hive/src/main/java/org/apache/kylin/source/hive/HiveMRInput.java
@@ -36,6 +36,7 @@ import org.apache.kylin.job.JoinedFlatTable;
 import org.apache.kylin.job.constant.ExecutableConstants;
 import org.apache.kylin.job.execution.AbstractExecutable;
 import org.apache.kylin.job.execution.DefaultChainedExecutable;
+import org.apache.kylin.job.execution.ExecutableManager;
 import org.apache.kylin.metadata.model.IJoinedFlatTableDesc;
 import org.apache.kylin.metadata.model.ISegment;
 import org.apache.kylin.metadata.model.TableDesc;
@@ -158,7 +159,7 @@ public class HiveMRInput extends HiveInputBase implements IMRInput {
         public void addStepPhase4_Cleanup(DefaultChainedExecutable jobFlow) {
             final String jobWorkingDir = getJobWorkingDir(jobFlow, hdfsWorkingDir);
 
-            GarbageCollectionStep step = new GarbageCollectionStep();
+            org.apache.kylin.source.hive.GarbageCollectionStep step = new org.apache.kylin.source.hive.GarbageCollectionStep();
             step.setName(ExecutableConstants.STEP_NAME_HIVE_CLEANUP);
             step.setIntermediateTables(Collections.singletonList(getIntermediateTableIdentity()));
             step.setExternalDataPaths(Collections.singletonList(JoinedFlatTable.getTableDir(flatDesc, jobWorkingDir)));
@@ -176,4 +177,27 @@ public class HiveMRInput extends HiveInputBase implements IMRInput {
         }
     }
 
+    /**
+     * When build job is created by kylin version 2.4.x or below, the step class name is an inner class of {@link HiveMRInput},
+     * to avoid the ClassNotFoundException in {@link ExecutableManager#newExecutable(java.lang.String)} , delegate the OLD class to the new one
+     *
+     * @since 2.5.0
+     * @deprecated For backwards compatibility.
+     */
+    @Deprecated
+    public static class RedistributeFlatHiveTableStep extends org.apache.kylin.source.hive.RedistributeFlatHiveTableStep {
+
+    }
+
+    /**
+     * When build job is created by kylin version 2.4.x or below, the step class name is an inner class of {@link HiveMRInput},
+     * to avoid the ClassNotFoundException in {@link ExecutableManager#newExecutable(java.lang.String)} , delegate the OLD class to the new one
+     *
+     * @since 2.5.0
+     * @deprecated For backwards compatibility.
+     */
+    @Deprecated
+    public static class GarbageCollectionStep extends org.apache.kylin.source.hive.GarbageCollectionStep {
+
+    }
 }