Skip to content
代码片段 群组 项目
未验证 提交 0d8f22dc 编辑于 作者: Isidro Martínez's avatar Isidro Martínez 提交者: GitHub
浏览文件

Merge pull request #14467 from [BEAM-11607] Add word count tasks

* [BEAM-11607] Add word count tasks

* Remove white space

* Add task description

* Add gradle description

* Fix dependency in wordcount task

* Fix task name
上级 ebe68fbc
No related branches found
No related tags found
无相关合并请求
......@@ -336,6 +336,13 @@ task("pushAllDockerImages") {
}
}
// Use this task to validate the environment set up for Go, Python and Java
task("checkSetup") {
dependsOn(":sdks:go:examples:wordCount")
dependsOn(":sdks:python:wordCount")
dependsOn(":examples:java:wordCount")
}
// Configure the release plugin to do only local work; the release manager determines what, if
// anything, to push. On failure, the release manager can reset the branch without pushing.
release {
......
......@@ -161,3 +161,12 @@ task execute (type:JavaExec) {
systemProperties System.getProperties()
args System.getProperty("exec.args", "").split()
}
// Run this task to validate the Java environment setup for contributors
task wordCount(type:JavaExec) {
description "Run the Java word count example"
main = "org.apache.beam.examples.WordCount"
classpath = sourceSets.main.runtimeClasspath
systemProperties = System.getProperties()
args = ["--output=/tmp/ouput.txt"]
}
\ No newline at end of file
......@@ -77,3 +77,10 @@ golang {
continueOnFailure = true
}
}
// Run this task to validate the Go environment setup for contributors
task wordCount(type: com.github.blindpirate.gogradle.Go) {
description "Run the Go word count example"
dependsOn goVendor
go 'build -o ./build/bin/${GOOS}_${GOARCH}/wordcount github.com/apache/beam/sdks/go/examples/wordcount'
}
\ No newline at end of file
......@@ -110,3 +110,15 @@ task startPortableRunner {
}
}
}
// Run this task to validate the python environment setup for contributors
task wordCount {
description "Run the Python word count example"
dependsOn 'installGcpTest'
doLast {
exec {
executable 'sh'
args '-c', ". ${envdir}/bin/activate && python -m apache_beam.examples.wordcount --runner DirectRunner --output /tmp/output.txt"
}
}
}
\ No newline at end of file
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册