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-1127] Create an unique source when using a JMS topic to avoid p… #1573

Closed
wants to merge 1 commit into from

Conversation

jbonofre
Copy link
Member

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.

…otential messages duplication

@jbonofre
Copy link
Member Author

R: @dhalperi
CC: @davorbonaci
CC: @jkff

@asfbot
Copy link

asfbot commented Dec 10, 2016

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

Copy link
Member

@davorbonaci davorbonaci left a comment

Choose a reason for hiding this comment

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

A few comments, possibly uninformed.

@@ -236,8 +236,15 @@ public UnboundedJmsSource(
public List<UnboundedJmsSource> generateInitialSplits(
int desiredNumSplits, PipelineOptions options) throws Exception {
List<UnboundedJmsSource> sources = new ArrayList<>();
for (int i = 0; i < desiredNumSplits; i++) {
if (topic != null) {
// in the case of a topic, we create a single source, so an unique subscriber, to avoid
Copy link
Member

Choose a reason for hiding this comment

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

I might be totally uninformed, but is it possible to make a queue out of a topic? Said differently, is it possible to separate a given topic into multiple queues?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's possible but on the broker side. In ActiveMQ, it's what a Virtual Topic.

@@ -236,8 +236,15 @@ public UnboundedJmsSource(
public List<UnboundedJmsSource> generateInitialSplits(
int desiredNumSplits, PipelineOptions options) throws Exception {
List<UnboundedJmsSource> sources = new ArrayList<>();
for (int i = 0; i < desiredNumSplits; i++) {
if (topic != null) {
Copy link
Member

Choose a reason for hiding this comment

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

Is it reasonable to add a unit test that fails before this change and passes after this change, just to make sure we don't regress in the future?

@dhalperi
Copy link
Contributor

Concur that this behavior should be tested.

LGTM otherwise.

@jbonofre
Copy link
Member Author

Gonna rebase and add a test to check the number of source created is correct depending of the destination (topic or queue). Thanks !

@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/6694/

Build result: FAILURE

[...truncated 11557 lines...] at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384) at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:205) ... 35 moreCaused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.apache.apex:apex-common:jar:3.5.0-SNAPSHOT, org.apache.apex:apex-engine:jar:3.5.0-SNAPSHOT: Could not find artifact org.apache.apex:apex-common:jar:3.5.0-SNAPSHOT in Nexus (http://repository.apache.org/snapshots) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444) at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246) at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367) ... 36 moreCaused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache.apex:apex-common:jar:3.5.0-SNAPSHOT in Nexus (http://repository.apache.org/snapshots) at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:39) at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355) at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67) ... 3 more2017-01-20T13:12:27.925 [ERROR] 2017-01-20T13:12:27.925 [ERROR] Re-run Maven using the -X switch to enable full debug logging.2017-01-20T13:12:27.925 [ERROR] 2017-01-20T13:12:27.925 [ERROR] For more information about the errors and possible solutions, please read the following articles:2017-01-20T13:12:27.925 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException2017-01-20T13:12:27.925 [ERROR] 2017-01-20T13:12:27.925 [ERROR] After correcting the problems, you can resume the build with the command2017-01-20T13:12:27.925 [ERROR] mvn -rf :beam-runners-apexchannel stoppedSetting status of e3a1d73 to FAILURE with url https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6694/ and message: 'Build finished. 'Using context: Jenkins: Maven clean install
--none--

@jbonofre
Copy link
Member Author

jbonofre commented Feb 2, 2017

Rebased and added a test to illustrate the expected behavior.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.684% when pulling 4b79294 on jbonofre:BEAM-1127 into ad90d91 on apache:master.

@asfbot
Copy link

asfbot commented Feb 2, 2017

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

@dhalperi
Copy link
Contributor

dhalperi commented Feb 3, 2017

LGTM, thanks JB!

@asfgit asfgit closed this in cef3109 Feb 3, 2017
@jbonofre jbonofre deleted the BEAM-1127 branch March 23, 2017 16:32
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

5 participants