|
|
@ -35,7 +35,7 @@ import java.util.Objects; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* sqoop parameters |
|
|
|
* sqoop parameters |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class SqoopParameters extends AbstractParameters { |
|
|
|
public class SqoopParameters extends AbstractParameters { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* sqoop job type: |
|
|
|
* sqoop job type: |
|
|
@ -62,6 +62,10 @@ public class SqoopParameters extends AbstractParameters { |
|
|
|
* concurrency |
|
|
|
* concurrency |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private int concurrency; |
|
|
|
private int concurrency; |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* split by |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private String splitBy; |
|
|
|
/** |
|
|
|
/** |
|
|
|
* source type |
|
|
|
* source type |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -105,6 +109,14 @@ public class SqoopParameters extends AbstractParameters { |
|
|
|
this.concurrency = concurrency; |
|
|
|
this.concurrency = concurrency; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getSplitBy() { |
|
|
|
|
|
|
|
return splitBy; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setSplitBy(String splitBy) { |
|
|
|
|
|
|
|
this.splitBy = splitBy; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getSourceType() { |
|
|
|
public String getSourceType() { |
|
|
|
return sourceType; |
|
|
|
return sourceType; |
|
|
|
} |
|
|
|
} |
|
|
@ -188,16 +200,16 @@ public class SqoopParameters extends AbstractParameters { |
|
|
|
|
|
|
|
|
|
|
|
if (SqoopJobType.TEMPLATE.getDescp().equals(jobType)) { |
|
|
|
if (SqoopJobType.TEMPLATE.getDescp().equals(jobType)) { |
|
|
|
sqoopParamsCheck = StringUtils.isEmpty(customShell) |
|
|
|
sqoopParamsCheck = StringUtils.isEmpty(customShell) |
|
|
|
&& StringUtils.isNotEmpty(modelType) |
|
|
|
&& StringUtils.isNotEmpty(modelType) |
|
|
|
&& StringUtils.isNotEmpty(jobName) |
|
|
|
&& StringUtils.isNotEmpty(jobName) |
|
|
|
&& concurrency != 0 |
|
|
|
&& concurrency != 0 |
|
|
|
&& StringUtils.isNotEmpty(sourceType) |
|
|
|
&& StringUtils.isNotEmpty(sourceType) |
|
|
|
&& StringUtils.isNotEmpty(targetType) |
|
|
|
&& StringUtils.isNotEmpty(targetType) |
|
|
|
&& StringUtils.isNotEmpty(sourceParams) |
|
|
|
&& StringUtils.isNotEmpty(sourceParams) |
|
|
|
&& StringUtils.isNotEmpty(targetParams); |
|
|
|
&& StringUtils.isNotEmpty(targetParams); |
|
|
|
} else if (SqoopJobType.CUSTOM.getDescp().equals(jobType)) { |
|
|
|
} else if (SqoopJobType.CUSTOM.getDescp().equals(jobType)) { |
|
|
|
sqoopParamsCheck = StringUtils.isNotEmpty(customShell) |
|
|
|
sqoopParamsCheck = StringUtils.isNotEmpty(customShell) |
|
|
|
&& StringUtils.isEmpty(jobName); |
|
|
|
&& StringUtils.isEmpty(jobName); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return sqoopParamsCheck; |
|
|
|
return sqoopParamsCheck; |
|
|
|