Skip to content

Separate View Evaluation and Overrides#2347

Closed
tgroh wants to merge 1 commit intoapache:masterfrom
tgroh:view_as_not_pvalue
Closed

Separate View Evaluation and Overrides#2347
tgroh wants to merge 1 commit intoapache:masterfrom
tgroh:view_as_not_pvalue

Conversation

@tgroh
Copy link
Member

@tgroh tgroh commented Mar 28, 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.

This simplifies the View Evaluation by separating it from the logic of
overriding CreatePCollectionView.

@tgroh
Copy link
Member Author

tgroh commented Mar 28, 2017

R: @jkff

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 70.178% when pulling 1b97b35 on tgroh:view_as_not_pvalue into 1339dd7 on apache:master.

@asfbot
Copy link

asfbot commented Mar 28, 2017

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

@tgroh tgroh force-pushed the view_as_not_pvalue branch from 1b97b35 to 953d6cf Compare March 31, 2017 01:03
@asfbot
Copy link

asfbot commented Mar 31, 2017

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

Build result: FAILURE

[...truncated 1.11 MB...] at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) 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 2 Checkstyle violations. 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-03-31T01:13:13.197 [ERROR] 2017-03-31T01:13:13.197 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-03-31T01:13:13.197 [ERROR] 2017-03-31T01:13:13.197 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-03-31T01:13:13.197 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-03-31T01:13:13.198 [ERROR] 2017-03-31T01:13:13.198 [ERROR] After correcting the problems, you can resume the build with the command2017-03-31T01:13:13.198 [ERROR] mvn -rf :beam-runners-direct-javachannel stoppedSetting status of 953d6cf to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/8986/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install
--none--

PCollection<Integer> ints = p.apply("CreateContents", Create.of(1, 2, 3));
final PCollectionView<List<Integer>> view =
PCollectionViews.listView(p, WindowingStrategy.globalDefault(), ints.getCoder());
PCollectionView<List<Integer>> afterReplacement =
Copy link
Contributor

Choose a reason for hiding this comment

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

This variable is unused; are you sure this test is testing the code you changed?

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, but I've made this more explicit. The application is the important part; we're creating a view manually to get around the View.asFoo transforms.

@Override
public void visitPrimitiveTransform(Node node) {
assertThat(
"WriteView should be the last primtitive in the graph",
Copy link
Contributor

Choose a reason for hiding this comment

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

  • typo: primitive
  • why?
  • this condition is actually testing that there's exactly one WriteView transform, not that it's "last"

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
  • Updated to assert that we only write the view once, and it has the output we expect.

@asfbot
Copy link

asfbot commented Mar 31, 2017

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

Build result: FAILURE

[...truncated 870.18 KB...] at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) 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 at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1029) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:170) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 more2017-03-31T18:21:25.075 [ERROR] 2017-03-31T18:21:25.075 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-03-31T18:21:25.075 [ERROR] 2017-03-31T18:21:25.075 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-03-31T18:21:25.075 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-03-31T18:21:25.076 [ERROR] 2017-03-31T18:21:25.076 [ERROR] After correcting the problems, you can resume the build with the command2017-03-31T18:21:25.076 [ERROR] mvn -rf :beam-runners-direct-javachannel stoppedSetting status of 2e7ea7f to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9010/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install
--none--

@asfbot
Copy link

asfbot commented Mar 31, 2017

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

Build result: FAILURE

[...truncated 870.48 KB...] at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) 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 at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:1029) at org.apache.maven.plugin.compiler.TestCompilerMojo.execute(TestCompilerMojo.java:170) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 31 more2017-03-31T18:38:24.967 [ERROR] 2017-03-31T18:38:24.967 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-03-31T18:38:24.967 [ERROR] 2017-03-31T18:38:24.967 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-03-31T18:38:24.967 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException2017-03-31T18:38:24.967 [ERROR] 2017-03-31T18:38:24.967 [ERROR] After correcting the problems, you can resume the build with the command2017-03-31T18:38:24.967 [ERROR] mvn -rf :beam-runners-direct-javachannel stoppedSetting status of 3a51c7f to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/9011/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install
--none--

This simplifies the View Evaluation by separating it from the logic of
overriding CreatePCollectionView.
@tgroh tgroh force-pushed the view_as_not_pvalue branch from 3a51c7f to dd0f9f5 Compare March 31, 2017 18:53
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.0004%) to 70.332% when pulling dd0f9f5 on tgroh:view_as_not_pvalue into 132d3c5 on apache:master.

@asfbot
Copy link

asfbot commented Mar 31, 2017

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

@asfgit asfgit closed this in 0749982 Apr 1, 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.

4 participants