[BEAM-1071] Allow for streaming tables with CREATE_NEVER disposition#1590
[BEAM-1071] Allow for streaming tables with CREATE_NEVER disposition#1590sammcveety wants to merge 3 commits intoapache:masterfrom
Conversation
|
Refer to this link for build results (access rights to CI server needed): Build result: FAILURE[...truncated 6618 lines...]No artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: Runners :: Apex #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/io/jms/pom.xml to org.apache.beam/beam-sdks-java-io-jms/0.4.0-incubating-SNAPSHOT/beam-sdks-java-io-jms-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: IO :: JMS #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/runners/flink/pom.xml to org.apache.beam/beam-runners-flink-parent/0.4.0-incubating-SNAPSHOT/beam-runners-flink-parent-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: Runners :: Flink #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/io/mongodb/pom.xml to org.apache.beam/beam-sdks-java-io-mongodb/0.4.0-incubating-SNAPSHOT/beam-sdks-java-io-mongodb-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: IO :: MongoDB #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/extensions/sorter/pom.xml to org.apache.beam/beam-sdks-java-extensions-sorter/0.4.0-incubating-SNAPSHOT/beam-sdks-java-extensions-sorter-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: Extensions :: Sorter #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/pom.xml to org.apache.beam/beam-sdks-parent/0.4.0-incubating-SNAPSHOT/beam-sdks-parent-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/extensions/join-library/pom.xml to org.apache.beam/beam-sdks-java-extensions-join-library/0.4.0-incubating-SNAPSHOT/beam-sdks-java-extensions-join-library-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: Extensions :: Join library #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/runners/pom.xml to org.apache.beam/beam-runners-parent/0.4.0-incubating-SNAPSHOT/beam-runners-parent-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: Runners #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/io/jdbc/pom.xml to org.apache.beam/beam-sdks-java-io-jdbc/0.4.0-incubating-SNAPSHOT/beam-sdks-java-io-jdbc-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: IO :: JDBC #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/sdks/java/extensions/pom.xml to org.apache.beam/beam-sdks-java-extensions-parent/0.4.0-incubating-SNAPSHOT/beam-sdks-java-extensions-parent-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: SDKs :: Java :: Extensions #5808 to compare, so performing full copy of artifacts[JENKINS] Archiving /home/jenkins/jenkins-slave/workspace/beam_PreCommit_Java_MavenInstall/examples/pom.xml to org.apache.beam/beam-examples-parent/0.4.0-incubating-SNAPSHOT/beam-examples-parent-0.4.0-incubating-SNAPSHOT.pomNo artifacts from beam_PreCommit_Java_MavenInstall » Apache Beam :: Examples #5808 to compare, so performing full copy of artifactschannel stoppedSetting status of 7624040 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/5809/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install--none-- |
|
retest this please |
|
Failure appears unrelated: 2016-12-13T13:55:36.768 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:jar (default-jar) on project beam-sdks-java-maven-archetypes-starter: Execution default-jar of goal org.apache.maven.plugins:maven-archetype-plugin:2.4:jar failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:2.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-archetype-plugin:jar:2.4 -> org.apache.maven.shared:maven-invoker:jar:2.2: Failed to read artifact descriptor for org.apache.maven.shared:maven-invoker:jar:2.2: Could not transfer artifact org.apache.maven.shared:maven-invoker:pom:2.2 from/to central (https://repo.maven.apache.org/maven2): Access denied to: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.2/maven-invoker-2.2.pom , ReasonPhrase:Forbidden. -> [Help 1] |
|
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-- |
|
retest this please |
|
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-- |
|
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-- |
dhalperi
left a comment
There was a problem hiding this comment.
Not sure this is really catching new error cases well. I added a few suggestive comments of various constructions I think might slip through validation now.
| throws IOException { | ||
| TableReference tableReference = parseTableSpec(tableSpec); | ||
| if (!createdTables.contains(tableSpec)) { | ||
| if (!createdTables.contains(tableSpec) && jsonTableSchema != null) { |
There was a problem hiding this comment.
Instead of using jsonTableSchema != null can we check CreateDisposition == NEVER?
There was a problem hiding this comment.
I'd need to pass the parameter through and store, we're good with that?
| createDisposition != CreateDisposition.CREATE_NEVER, | ||
| "CreateDisposition.CREATE_NEVER is not supported when using a tablespec" | ||
| + " function."); | ||
| } |
There was a problem hiding this comment.
Can we check the dual of this where it is appropriate? : If the schema is null, then CreateDisposition == CreateNEVER
There was a problem hiding this comment.
This will break when combined with my PR. What's the rationale for this PR?
There was a problem hiding this comment.
The rationale is to be able to run a streaming pipeline against an already-created table without needing to specify the schema. Very useful for some templates.
There was a problem hiding this comment.
Sounds like Reuven is now ok with this change. looking
|
Refer to this link for build results (access rights to CI server needed): |
|
Added some more testing and addressed comments, please take another look. |
|
You're going to have to merge with the current version of the code |
|
@reuvenlax could you be more specific? Github says there are no merge conflicts, and all tests pass. |
| TableReference tableRef = new TableReference(); | ||
| tableRef.setDatasetId("dataset"); | ||
| tableRef.setTableId("sometable"); | ||
|
|
There was a problem hiding this comment.
This creates a bounded collection, which fails the UNBOUNDED conditionals. This raises a few possibilities:
- Should CreateUnbounded be a shorthand we have?
- Should these conditionals check options.isStreaming() (guessing not, because that's less clean with respect to the model)
There was a problem hiding this comment.
No, I was just wrong. You were right.
|
@sammcveety that's because your branch doesn't include latest changes in this file - specifically the testing ones. You will have to fetch changes and rebase to origin/master to sync - then you'll have to resolve conflicts. In addition to conflicts, getOrCreateTable will have to be fixed, as it no longer supports create_never. |
|
retest this please |
|
Refer to this link for build results (access rights to CI server needed): |
|
@reuvenlax I retested this and it is running against head. I believe it to be ready for another review by @dhalperi . |
dhalperi
left a comment
There was a problem hiding this comment.
LGTM.
I can make the minor fix in merging .
| TableReference tableReference = parseTableSpec(tableSpec); | ||
| if (!createdTables.contains(tableSpec)) { | ||
| if (!createdTables.contains(tableSpec) | ||
| && createDisposition != createDisposition.CREATE_NEVER) { |
There was a problem hiding this comment.
swap check order? createdTables is a concurrent data structure.
R: @dhalperi
This turned out a bit more involved than I'd hoped.