Skip to content
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

Closed
wants to merge 4 commits into from

Conversation

tgroh
Copy link
Member

@tgroh tgroh commented Jan 5, 2017

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace <Jira issue #> in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

Removes the ability for a runner to access compressed inputs and outputs from an AppliedPTransform.

@asfbot
Copy link

asfbot commented Jan 5, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6418/

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--

@asfbot
Copy link

asfbot commented Jan 5, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6420/

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--

@asfbot
Copy link

asfbot commented Jan 5, 2017

@asfbot
Copy link

asfbot commented Jan 5, 2017

@asfbot
Copy link

asfbot commented Jan 6, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6446/
--none--

@tgroh tgroh changed the title Always expand getInputs, getOutputs in AppliedPTransform [BEAM-646] Always expand getInputs, getOutputs in AppliedPTransform Jan 17, 2017
@asfbot
Copy link

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6590/

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--

@asfbot
Copy link

asfbot commented Jan 17, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6596/
--none--

@tgroh
Copy link
Member Author

tgroh commented Jan 18, 2017

R: @kennknowles
R: @tweise (for Apex changes) @aljoscha (for Flink changes) @amitsela (for Spark changes)

Copy link
Member

@amitsela amitsela left a 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();
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Done.

@asfbot
Copy link

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6612/
--none--

@asfbot
Copy link

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6614/
--none--

@asfbot
Copy link

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6615/
--none--

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 69.949% when pulling 936037e on tgroh:no_compressed_inputs into d135493 on apache:master.

@asfbot
Copy link

asfbot commented Jan 18, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6624/
--none--

} 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()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

==?

Copy link
Member Author

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()) {
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.07%) to 69.869% when pulling 3836602 on tgroh:no_compressed_inputs into d135493 on apache:master.

@asfbot
Copy link

asfbot commented Jan 20, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6696/
--none--

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.
@asfbot
Copy link

asfbot commented Jan 21, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6707/
--none--

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 69.798% when pulling 4ba7b7f on tgroh:no_compressed_inputs into f799a57 on apache:master.

Copy link
Contributor

@tweise tweise left a 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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getInputs (plural)

Copy link
Member Author

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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getOutputs

Copy link
Member Author

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) {
Copy link
Contributor

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.

Copy link
Member Author

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()

@aljoscha
Copy link
Contributor

Changes look good for the Flink Runner. 👍

I had a comment about the methods names (missing plural s).

Copy link
Member Author

@tgroh tgroh left a 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) {
Copy link
Member Author

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() {
Copy link
Member Author

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() {
Copy link
Member Author

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.

@asfbot
Copy link

asfbot commented Jan 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6734/
--none--

Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgroh
Copy link
Member Author

tgroh commented Jan 23, 2017

Retest this please

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0002%) to 69.775% when pulling 0c5a771 on tgroh:no_compressed_inputs into f799a57 on apache:master.

@asfbot
Copy link

asfbot commented Jan 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6749/
--none--

@asfgit asfgit closed this in f15b52f Jan 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants