[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143609=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143609 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 12/Sep/18 16:24 Start Date: 12/Sep/18 16:24 Worklog Time Spent: 10m Work Description: pabloem closed pull request #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371 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/examples/java/src/main/java/org/apache/beam/examples/complete/TfIdf.java b/examples/java/src/main/java/org/apache/beam/examples/complete/TfIdf.java index e153d9d8f7a..a5d2c7e8a29 100644 --- a/examples/java/src/main/java/org/apache/beam/examples/complete/TfIdf.java +++ b/examples/java/src/main/java/org/apache/beam/examples/complete/TfIdf.java @@ -415,8 +415,7 @@ public void processElement(ProcessContext c) { } } - public static void main(String[] args) throws Exception { -Options options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class); + static void runTfIdf(Options options) throws Exception { Pipeline pipeline = Pipeline.create(options); pipeline.getCoderRegistry().registerCoderForClass(URI.class, StringDelegateCoder.of(URI.class)); @@ -427,4 +426,10 @@ public static void main(String[] args) throws Exception { pipeline.run().waitUntilFinish(); } + + public static void main(String[] args) throws Exception { +Options options = PipelineOptionsFactory.fromArgs(args).withValidation().as(Options.class); + +runTfIdf(options); + } } diff --git a/examples/java/src/test/java/org/apache/beam/examples/complete/TfIdfIT.java b/examples/java/src/test/java/org/apache/beam/examples/complete/TfIdfIT.java new file mode 100644 index 000..21ec6b22cc9 --- /dev/null +++ b/examples/java/src/test/java/org/apache/beam/examples/complete/TfIdfIT.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.beam.examples.complete; + +import java.util.Date; +import java.util.regex.Pattern; +import org.apache.beam.examples.complete.TfIdf.Options; +import org.apache.beam.sdk.io.FileSystems; +import org.apache.beam.sdk.io.fs.ResolveOptions.StandardResolveOptions; +import org.apache.beam.sdk.options.PipelineOptionsFactory; +import org.apache.beam.sdk.testing.FileChecksumMatcher; +import org.apache.beam.sdk.testing.TestPipeline; +import org.apache.beam.sdk.testing.TestPipelineOptions; +import org.junit.BeforeClass; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Integration test for TfIdf example. */ +@RunWith(JUnit4.class) +public class TfIdfIT { + + private static final String DEFAULT_INPUT = "gs://apache-beam-samples/shakespeare/"; + private static final String EXPECTED_OUTPUT_CHECKSUM = "f072786dde51dc09fc74bf38ffbfc27dcfdf0b96"; + private static final Pattern DEFAULT_SHARD_TEMPLATE = + Pattern.compile("(?x) \\S* (? \\d+) -of- (? \\d+)\\.csv"); + + /** + * Options for the TfIdf Integration Test. + * + * Define expected output file checksum to verify TfIdf pipeline result with customized input. + */ + public interface TfIdfITOptions extends TestPipelineOptions, Options {} + + @BeforeClass + public static void setUp() { +PipelineOptionsFactory.register(TfIdfITOptions.class); + } + + @Test + public void testE2ETfIdf() throws Exception { +TfIdfITOptions options = TestPipeline.testingPipelineOptions().as(TfIdfITOptions.class); +options.setInput(DEFAULT_INPUT); +options.setOutput( +FileSystems.matchNewResource(options.getTempRoot(), true) +.resolve( +String.format("TfIdfIT-%tF-% Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL:
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143606=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143606 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 12/Sep/18 16:17 Start Date: 12/Sep/18 16:17 Worklog Time Spent: 10m Work Description: yifanzou commented on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420709144 +R: @pabloem 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143606) Time Spent: 1h 20m (was: 1h 10m) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143392=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143392 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 12/Sep/18 06:57 Start Date: 12/Sep/18 06:57 Worklog Time Spent: 10m Work Description: yifanzou commented on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420534161 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143392) Time Spent: 1h 10m (was: 1h) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143391=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143391 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 12/Sep/18 06:53 Start Date: 12/Sep/18 06:53 Worklog Time Spent: 10m Work Description: yifanzou removed a comment on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420480308 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143391) Time Spent: 1h (was: 50m) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143331=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143331 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 12/Sep/18 01:26 Start Date: 12/Sep/18 01:26 Worklog Time Spent: 10m Work Description: yifanzou commented on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420480308 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143331) Time Spent: 50m (was: 40m) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143312=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143312 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 11/Sep/18 23:46 Start Date: 11/Sep/18 23:46 Worklog Time Spent: 10m Work Description: yifanzou removed a comment on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420460993 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143312) Time Spent: 40m (was: 0.5h) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143311=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143311 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 11/Sep/18 23:46 Start Date: 11/Sep/18 23:46 Worklog Time Spent: 10m Work Description: yifanzou commented on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420463594 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143311) Time Spent: 0.5h (was: 20m) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143306=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143306 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 11/Sep/18 23:33 Start Date: 11/Sep/18 23:33 Worklog Time Spent: 10m Work Description: yifanzou commented on issue #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371#issuecomment-420460993 Run Java PostCommit 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143306) Time Spent: 20m (was: 10m) > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Work logged] (BEAM-5341) Migrate integration tests for TfIdf
[ https://issues.apache.org/jira/browse/BEAM-5341?focusedWorklogId=143305=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-143305 ] ASF GitHub Bot logged work on BEAM-5341: Author: ASF GitHub Bot Created on: 11/Sep/18 23:32 Start Date: 11/Sep/18 23:32 Worklog Time Spent: 10m Work Description: yifanzou opened a new pull request #6371: [BEAM-5341] create IT test for TfIdf example URL: https://github.com/apache/beam/pull/6371 **Please** add a meaningful description for your change here Follow this checklist to help us incorporate your contribution quickly and easily: - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue. - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf). It will help us expedite review of your Pull Request if you tag someone (e.g. `@username`) to look at it. Post-Commit Tests Status (on master branch) Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark --- | --- | --- | --- | --- | --- | --- | --- Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/) | --- | --- | --- | --- | --- | --- Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/) Python | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/) | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/) [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/) | --- | --- | --- | --- 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: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 143305) Time Spent: 10m Remaining Estimate: 0h > Migrate integration tests for TfIdf > --- > > Key: BEAM-5341 > URL: https://issues.apache.org/jira/browse/BEAM-5341 > Project: Beam > Issue Type: Bug > Components: testing >Reporter: yifan zou >Assignee: yifan zou >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)