Skip to content

Commit 5bbe175

Browse files
committed
Added support for WormholePushJob job type
1 parent 9be9a61 commit 5bbe175

File tree

16 files changed

+269
-8
lines changed

16 files changed

+269
-8
lines changed

CONTRIBUTORS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,3 +157,6 @@ The following were contributed by Jamie Sun. Thanks, Jamie!
157157
* `Fix base properties scope for subflows when generating YAML files`
158158
* `Fix variable substitution issue when generating YAML files`
159159
* `Fix variable substitution issue for dependency list`
160+
161+
The following were contributed by Rakesh Malladi. Thanks, Rakesh!
162+
* `Add ability for Hadoop DSL to understand the WormholePushJob job type`

VERSIONS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ the License.
1717
Note that the LinkedIn build system occasionally requires that we skip a
1818
version bump, so you will see a few skipped version numbers in the list below.
1919

20+
0.14.30
21+
* Adding WormholePushJob job type support
22+
2023
0.14.29
2124
* Fix variable substitution issue for dependency list
2225

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.gradle.daemon=true
2-
version=0.14.29
2+
version=0.14.30
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# This file generated from the Hadoop DSL. Do not edit by hand.
22
type=noop
3-
dependencies=jobs1_job25
3+
dependencies=jobs1_job26
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file generated from the Hadoop DSL. Do not edit by hand.
2+
type=WormholePushJob
3+
dependencies=jobs1_job25
4+
dataset=model
5+
dataset.group=linkedin-project
6+
input.path=/user/input
7+
namespace=linkedin
8+
output.location=LOCAL
9+
preserve.input=true
10+
version.string=1.2.4-2018.09.04

hadoop-plugin-test/expectedOutput/negative/missingFields.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,6 @@ RequiredFieldsChecker ERROR: PinotBuildAndPushJob job18 must set tableName, inpu
4444
RequiredFieldsChecker ERROR: TableauJob job19 must set workbookName
4545
RequiredFieldsChecker ERROR: HdfsWaitJob job20 must set dirPath, freshness, timeout, and forceJobToFail
4646
RequiredFieldsChecker ERROR: VenicePushJob job23 must set avroKeyField, avroValueField, clusterName, inputPath, veniceStoreName
47+
RequiredFieldsChecker ERROR: WormholePushJob job26 must set inputPath, namespace, datasetGroup and dataset
4748
RequiredFieldsChecker WARNING: Properties properties1 does not set any confProperties, jobProperties, jvmProperties or basePropertySetName. Nothing will be built for this properties object.
4849
:hadoop-plugin-test:test_missingFields FAILED

hadoop-plugin-test/src/main/gradle/negative/missingFields.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,10 @@ hadoop {
122122
tensorFlowJob('job25', 'spark') {
123123
depends 'job24'
124124
}
125-
targets 'job25'
125+
126+
wormholePushJob('job26') {
127+
depends 'job25'
128+
}
129+
targets 'job26'
126130
}
127131
}

hadoop-plugin-test/src/main/gradle/positive/jobs1.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,18 @@ hadoop {
419419
]
420420
depends 'job24'
421421
}
422-
targets 'job25'
422+
423+
wormholePushJob('job26') {
424+
fromInputPath '/user/input' // Required
425+
toNamespace 'linkedin' // Required
426+
toDatasetGroup 'linkedin-project' // Required
427+
toDataset 'model' // Required
428+
withVersionString '1.2.4-2018.09.04' // Optional
429+
preserveInput true // Optional
430+
toOutputLocation 'LOCAL' // Optional
431+
432+
depends 'job25'
433+
}
434+
targets 'job26'
423435
}
424436
}

hadoop-plugin/src/main/groovy/com/linkedin/gradle/hadoopdsl/BaseNamedScopeContainer.groovy

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import com.linkedin.gradle.hadoopdsl.job.TensorFlowTonyJob;
3939
import com.linkedin.gradle.hadoopdsl.job.TeradataToHdfsJob;
4040
import com.linkedin.gradle.hadoopdsl.job.VenicePushJob;
4141
import com.linkedin.gradle.hadoopdsl.job.VoldemortBuildPushJob;
42-
42+
import com.linkedin.gradle.hadoopdsl.job.WormholePushJob;
4343
import org.gradle.api.Project;
4444

4545
/**
@@ -1116,6 +1116,19 @@ abstract class BaseNamedScopeContainer implements NamedScopeContainer {
11161116
}
11171117
}
11181118

1119+
/**
1120+
* DSL wormholePushJob method. Creates a wormholePushJob in scope with the given name
1121+
* and configuration.
1122+
*
1123+
* @param name The job name
1124+
* @param configure The configuration closure
1125+
* @return The new job
1126+
*/
1127+
@HadoopDslMethod
1128+
WormholePushJob wormholePushJob(String name, @DelegatesTo(WormholePushJob) Closure configure) {
1129+
return ((WormholePushJob)configureJob(factory.makeWormholePushJob(name), configure));
1130+
}
1131+
11191132
/**
11201133
* DSL trigger method. Creates a Trigger in scope with the given name and configuration.
11211134
*

hadoop-plugin/src/main/groovy/com/linkedin/gradle/hadoopdsl/BaseVisitor.groovy

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import com.linkedin.gradle.hadoopdsl.job.TensorFlowJob;
3737
import com.linkedin.gradle.hadoopdsl.job.TeradataToHdfsJob;
3838
import com.linkedin.gradle.hadoopdsl.job.VenicePushJob;
3939
import com.linkedin.gradle.hadoopdsl.job.VoldemortBuildPushJob;
40+
import com.linkedin.gradle.hadoopdsl.job.WormholePushJob;
4041

4142
/**
4243
* Base implementation of Visitor to make it easy to implement visitor subclasses. By default, the
@@ -231,6 +232,11 @@ abstract class BaseVisitor implements Visitor {
231232
visitJob((Job)job);
232233
}
233234

235+
@Override
236+
void visitJob(WormholePushJob job) {
237+
visitJob((Job)job);
238+
}
239+
234240
@Override
235241
void visitJob(TensorFlowJob job) {
236242
visitJob((Job)job);

0 commit comments

Comments
 (0)