New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BEAM-646] Always expand getInputs, getOutputs in AppliedPTransform #1735
Conversation
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 10462 lines...] at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.maven.plugin.MojoFailureException: You have 1 Checkstyle violation. at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:588) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 more2017-01-05T02:06:18.062 [ERROR] 2017-01-05T02:06:18.062 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-01-05T02:06:18.062 [ERROR] 2017-01-05T02:06:18.062 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-01-05T02:06:18.062 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-01-05T02:06:18.062 [ERROR] 2017-01-05T02:06:18.062 [ERROR] After correcting the problems, you can resume the build with the command2017-01-05T02:06:18.062 [ERROR] mvn -rf :beam-runners-flink_2.10channel stoppedSetting status of efccd93 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6418/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install--none-- |
efccd93
to
0cde110
Compare
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 11462 lines...] at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.maven.plugin.MojoFailureException: You have 1 Checkstyle violation. at org.apache.maven.plugin.checkstyle.CheckstyleViolationCheckMojo.execute(CheckstyleViolationCheckMojo.java:588) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 more2017-01-05T02:28:03.511 [ERROR] 2017-01-05T02:28:03.511 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-01-05T02:28:03.511 [ERROR] 2017-01-05T02:28:03.511 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-01-05T02:28:03.511 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-01-05T02:28:03.511 [ERROR] 2017-01-05T02:28:03.511 [ERROR] After correcting the problems, you can resume the build with the command2017-01-05T02:28:03.511 [ERROR] mvn -rf :beam-runners-sparkchannel stoppedSetting status of 0cde110 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6420/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install--none-- |
0cde110
to
1c39bb2
Compare
Refer to this link for build results (access rights to CI server needed): Failed Tests: 1beam_PreCommit_Java_MavenInstall/org.apache.beam:beam-examples-java: 1--none-- |
1c39bb2
to
ff4b1d1
Compare
Refer to this link for build results (access rights to CI server needed): Failed Tests: 1beam_PreCommit_Java_MavenInstall/org.apache.beam:beam-examples-java: 1--none-- |
ff4b1d1
to
67de755
Compare
Refer to this link for build results (access rights to CI server needed): |
67de755
to
0d91501
Compare
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 6068 lines...] at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure/home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall@2/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowPipelineTranslator.java:[155,11] illegal start of expression at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:972) at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 more2017-01-17T20:04:47.263 [ERROR] 2017-01-17T20:04:47.263 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-01-17T20:04:47.263 [ERROR] 2017-01-17T20:04:47.263 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-01-17T20:04:47.263 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-01-17T20:04:47.263 [ERROR] 2017-01-17T20:04:47.263 [ERROR] After correcting the problems, you can resume the build with the command2017-01-17T20:04:47.263 [ERROR] mvn -rf :beam-runners-google-cloud-dataflow-javachannel stoppedSetting status of 0d91501 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6590/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install--none-- |
0d91501
to
f8312b8
Compare
Refer to this link for build results (access rights to CI server needed): |
R: @kennknowles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added a small comment.
checkArgument(currentTransform != null && currentTransform.getTransform() == transform, | ||
"can only be called with current transform"); | ||
@SuppressWarnings("unchecked") | ||
T input = (T) currentTransform.getInput(); | ||
T input = (T) Iterables.getOnlyElement(currentTransform.getInputs()).getValue(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't you simply call getInput()
instead of currentTransform.getInputs()
and it will validate so you could drop the checkArguemnts
as well. True for getOnlyOutput()
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Done.
Refer to this link for build results (access rights to CI server needed): |
0300bed
to
43d59f9
Compare
Refer to this link for build results (access rights to CI server needed): |
43d59f9
to
4f96900
Compare
Refer to this link for build results (access rights to CI server needed): |
4f96900
to
936037e
Compare
Refer to this link for build results (access rights to CI server needed): |
} else { | ||
int portIndex = 0; | ||
for (TupleTag<?> tag : transform.getSideOutputTags().getAll()) { | ||
if (tag == outputEntry.getKey()) { | ||
ports.put(outputEntry.getValue(), operator.sideOutputPorts[portIndex]); | ||
if (tag == output.getTag()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
==
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
output.getValue(), | ||
output.getValue().getClass().getSimpleName()); | ||
PCollection<?> pc = (PCollection<?>) output.getValue(); | ||
if (output.getTag () == transform.getMainOutputTag()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space. also ==
suspicion again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Refer to this link for build results (access rights to CI server needed): |
Never provide unexpanded input or output types from AppliedPTransform, as they are not part of the model. Update all runners to obtain appropriate PValues from the expansions.
3836602
to
4ba7b7f
Compare
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ApexRunner changes LGTM with two minor comments.
} | ||
|
||
public <OutputT extends POutput> OutputT getOutput() { | ||
return (OutputT) getCurrentTransform().getOutput(); | ||
public List<TaggedPValue> getInput() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getInputs (plural)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also renamed getOnlyInput
to getInput
return Iterables.getOnlyElement(getCurrentTransform().getInputs()).getValue(); | ||
} | ||
|
||
public List<TaggedPValue> getOutput() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getOutputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also renamed getOnlyOutput to getOutput.
return (T) Iterables.getOnlyElement(currentTransform.getInputs()).getValue(); | ||
} | ||
|
||
public <T extends PInput> List<TaggedPValue> getInput(PTransform<T, ?> transform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be getInputs()
?
Same holds for getOutput()
and the corresponding methods in FlinkBatchTranslationContext
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Renamed multi-input/output to getInputs()
and getOutputs()
and singular into getInput()
and getOuput()
Changes look good for the Flink Runner. 👍 I had a comment about the methods names (missing plural s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just performed a global replace of getInput
-> getInputs
, getOuput
-> getOutputs
, getOnlyInput
-> getInput
and getOnlyOutput
to getOutput
.
@kennknowles runner authors are all happy, PTAL
return (T) Iterables.getOnlyElement(currentTransform.getInputs()).getValue(); | ||
} | ||
|
||
public <T extends PInput> List<TaggedPValue> getInput(PTransform<T, ?> transform) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Renamed multi-input/output to getInputs()
and getOutputs()
and singular into getInput()
and getOuput()
} | ||
|
||
public <OutputT extends POutput> OutputT getOutput() { | ||
return (OutputT) getCurrentTransform().getOutput(); | ||
public List<TaggedPValue> getInput() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also renamed getOnlyInput
to getInput
return Iterables.getOnlyElement(getCurrentTransform().getInputs()).getValue(); | ||
} | ||
|
||
public List<TaggedPValue> getOutput() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Also renamed getOnlyOutput to getOutput.
Refer to this link for build results (access rights to CI server needed): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Retest this please |
Refer to this link for build results (access rights to CI server needed): |
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
[BEAM-<Jira issue #>] Description of pull request
mvn clean verify
. (Even better, enableTravis-CI on your fork and ensure the whole test matrix passes).
<Jira issue #>
in the title with the actual Jira issuenumber, if there is one.
Individual Contributor License Agreement.
Removes the ability for a runner to access compressed inputs and outputs from an AppliedPTransform.