shaofengshi closed pull request #182: KYLIN-3478 Enhance backwards
compatibility.
URL: https://github.com/apache/kylin/pull/182
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
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 d1b4fc901f..2e39285d72 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.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 @@ protected void
addStepPhase1_DoMaterializeLookupTable(DefaultChainedExecutable j
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 @@ private String getIntermediateTableIdentity() {
}
}
+ /**
+ * 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 {
+
+ }
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services