[
https://issues.apache.org/jira/browse/BEAM-6146?focusedWorklogId=171608&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-171608
]
ASF GitHub Bot logged work on BEAM-6146:
----------------------------------------
Author: ASF GitHub Bot
Created on: 03/Dec/18 15:10
Start Date: 03/Dec/18 15:10
Worklog Time Spent: 10m
Work Description: tweise closed pull request #7180: [BEAM-6146] Run
pre-commit wordcount in batch and streaming mode.
URL: https://github.com/apache/beam/pull/7180
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/sdks/python/build.gradle b/sdks/python/build.gradle
index 2d8149d5aa6b..c43706203067 100644
--- a/sdks/python/build.gradle
+++ b/sdks/python/build.gradle
@@ -166,7 +166,8 @@ task preCommit() {
task portablePreCommit() {
dependsOn ':beam-runners-flink_2.11-job-server-container:docker'
dependsOn ':beam-sdks-python-container:docker'
- dependsOn 'portableWordCount'
+ dependsOn portableWordCountTask('portableWordCountBatch', false, envdir)
+ dependsOn portableWordCountTask('portableWordCountStreaming', true, envdir)
}
/*************************************************************************************************/
@@ -268,32 +269,37 @@ task directRunnerIT(dependsOn: 'installGcpTest') {
//
// ./gradlew :beam-sdks-python:portableWordCount
-PjobEndpoint=localhost:8099
//
-task portableWordCount(dependsOn: 'installGcpTest') {
- doLast {
- // TODO: Figure out GCS credentials and use real GCS input and output.
- def options = [
- "--input=/etc/profile",
- "--output=/tmp/py-wordcount-direct",
- "--runner=PortableRunner",
- "--experiments=worker_threads=100",
- ]
- if (project.hasProperty("streaming"))
- options += ["--streaming"]
- else
+task portableWordCount {
+ dependsOn portableWordCountTask('portableWordCountExample',
project.hasProperty("streaming"), envdir)
+}
+
+def portableWordCountTask(name, streaming, envdir) {
+ tasks.create(name) {
+ dependsOn = ['installGcpTest']
+ mustRunAfter = [':beam-runners-flink_2.11-job-server-container:docker',
':beam-sdks-python-container:docker']
+ doLast {
+ // TODO: Figure out GCS credentials and use real GCS input and output.
+ def options = [
+ "--input=/etc/profile",
+ "--output=/tmp/py-wordcount-direct",
+ "--runner=PortableRunner",
+ "--experiments=worker_threads=100",
+ ]
+ if (streaming)
+ options += ["--streaming"]
+ else
// workaround for local file output in docker container
- options += ["--environment_cache_millis=10000"]
- if (project.hasProperty("jobEndpoint"))
- options += ["--job_endpoint=${project.property('jobEndpoint')}"]
- exec {
- executable 'sh'
- args '-c', ". ${envdir}/bin/activate && python -m
apache_beam.examples.wordcount ${options.join(' ')}"
- // TODO: Check that the output file is generated and runs.
+ options += ["--environment_cache_millis=10000"]
+ if (project.hasProperty("jobEndpoint"))
+ options += ["--job_endpoint=${project.property('jobEndpoint')}"]
+ exec {
+ executable 'sh'
+ args '-c', ". ${envdir}/bin/activate && python -m
apache_beam.examples.wordcount ${options.join(' ')}"
+ // TODO: Check that the output file is generated and runs.
+ }
}
}
}
-// Make sure that the job server is built before the portableWordCount is
executed.
-portableWordCount.mustRunAfter
':beam-runners-flink_2.11-job-server-container:docker'
-portableWordCount.mustRunAfter ':beam-sdks-python-container:docker'
// Run single or a set of integration tests with provided test options and
pipeline options.
task integrationTest(dependsOn: ['installGcpTest', 'sdist']) {
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 171608)
Time Spent: 3h 50m (was: 3h 40m)
> Portable Flink End to end precommit test
> ----------------------------------------
>
> Key: BEAM-6146
> URL: https://issues.apache.org/jira/browse/BEAM-6146
> Project: Beam
> Issue Type: Bug
> Components: runner-flink
> Reporter: Ankur Goenka
> Assignee: Ankur Goenka
> Priority: Major
> Fix For: 2.10.0
>
> Time Spent: 3h 50m
> Remaining Estimate: 0h
>
> Create an end to end wordcount based pipeline test executed on precommit.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)