You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/06/10 13:56:13 UTC

[GitHub] [incubator-dolphinscheduler] Eights-Li commented on a change in pull request #2943: Sqoop task optimization

Eights-Li commented on a change in pull request #2943:
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2943#discussion_r438141605



##########
File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/sqoop/generator/SqoopJobGenerator.java
##########
@@ -62,14 +63,23 @@ private void createSqoopJobGenerator(String sourceType,String targetType){
      * @return
      */
     public String generateSqoopJob(SqoopParameters sqoopParameters,TaskExecutionContext taskExecutionContext){
-        createSqoopJobGenerator(sqoopParameters.getSourceType(),sqoopParameters.getTargetType());
-        if(sourceGenerator == null || targetGenerator == null){
-            return null;
+
+        String sqoopScripts = "";
+
+        if (SqoopJobType.TEMPLATE.getDescp().equals(sqoopParameters.getJobType())) {
+            createSqoopJobGenerator(sqoopParameters.getSourceType(),sqoopParameters.getTargetType());
+            if(sourceGenerator == null || targetGenerator == null){
+                return null;
+            }

Review comment:
       yes, if null should throw a runtimeException




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org