Skip to content

[BEAM-6268] Adjust Cassandra ports - #7317

Merged
aromanenko-dev merged 1 commit into
apache:masterfrom
aromanenko-dev:BEAM-6268-HFIO-tests-fail
Feb 19, 2019
Merged

aromanenko-dev merged 1 commit into
apache:masterfrom
aromanenko-dev:BEAM-6268-HFIO-tests-fail

Conversation

@aromanenko-dev

@aromanenko-dev aromanenko-dev commented Dec 19, 2018 •

Copy link
Copy Markdown
Contributor

Embedded Cassandra ports of hadoop-input-format should be adjusted to avoid conflicts with hadoop-format Cassandra tests


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.

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 --- --- --- --- --- ---
Java Build Status Build Status Build Status Build Status Build Status Build Status Build Status Build Status
Python Build Status --- Build Status
Build Status
Build Status --- --- ---

@aromanenko-dev

Copy link
Copy Markdown
Contributor Author

R: @mxm
Please, take a look

@aromanenko-dev
aromanenko-dev requested a review from mxm December 19, 2018 15:48

@mxm mxm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR @aromanenko-dev! I think it looks good.

As a suggestion, I'd prefer if the ports were dynamically allocated (port 0). This would avoid any clashes with parallel tests which happen to use the same port.

# TCP port, for commands and data
# For security reasons, you should not expose this port to the internet. Firewall it if needed.
storage_port: 7000
storage_port: 17000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there also an option to use port 0 to use a free port?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I think it makes sense to set it to 0. I tried it locally and seems it works. Let's wait for Jenkins though.

@aromanenko-dev
aromanenko-dev force-pushed the BEAM-6268-HFIO-tests-fail branch from 9751266 to 4372490 Compare December 19, 2018 16:27
@aromanenko-dev aromanenko-dev changed the title [BEAM-6268] Adjust Cassandra ports WIP: [BEAM-6268] Adjust Cassandra ports Dec 19, 2018
@mxm

mxm commented Dec 19, 2018

Copy link
Copy Markdown
Contributor

Seems to be failing with

java.lang.IllegalStateException: Failed to bind port 9042 on 127.0.0.1.
	at org.apache.cassandra.transport.Server.start(Server.java:164)
	at java.util.Collections$SingletonSet.forEach(Collections.java:4767)
	at org.apache.cassandra.service.NativeTransportService.start(NativeTransportService.java:128)
	at org.apache.cassandra.service.CassandraDaemon.startNativeTransport(CassandraDaemon.java:649)
	at org.apache.cassandra.service.CassandraDaemon.start(CassandraDaemon.java:511)
	at org.apache.cassandra.service.EmbeddedCassandraService.start(EmbeddedCassandraService.java:53)
	at org.apache.beam.sdk.io.hadoop.format.HadoopFormatIOCassandraTest.startCassandra(HadoopFormatIOCassandraTest.java:179)

Is this related to the 0 port change?

@aromanenko-dev

Copy link
Copy Markdown
Contributor Author

No, I think it's a different one. I'm trying to find a way how to fix it.

@aromanenko-dev
aromanenko-dev force-pushed the BEAM-6268-HFIO-tests-fail branch from 4372490 to ba81725 Compare December 19, 2018 20:08
@stale

stale Bot commented Feb 17, 2019

Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions.

@stale stale Bot added the stale label Feb 17, 2019
@mxm

mxm commented Feb 18, 2019

Copy link
Copy Markdown
Contributor

@aromanenko-dev What is the state here?

@stale stale Bot removed the stale label Feb 18, 2019
@aromanenko-dev

Copy link
Copy Markdown
Contributor Author

@mxm I'm going to fix this

@aromanenko-dev
aromanenko-dev force-pushed the BEAM-6268-HFIO-tests-fail branch 2 times, most recently from 2d74a71 to 1f48611 Compare February 18, 2019 16:53
@aromanenko-dev
aromanenko-dev force-pushed the BEAM-6268-HFIO-tests-fail branch from 1f48611 to 0fd297e Compare February 18, 2019 17:33
@aromanenko-dev

Copy link
Copy Markdown
Contributor Author

Run Java PreCommit

@aromanenko-dev aromanenko-dev changed the title WIP: [BEAM-6268] Adjust Cassandra ports [BEAM-6268] Adjust Cassandra ports Feb 19, 2019

@mxm mxm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Arguably, there is still some potential conflict possible for parallel test instances (e.g. from a different PR) but that is much less likely than previously, where two Cassandra tests could conflict with each other. The best solution would be to use dynamic ports, but looks good to me for now.

@aromanenko-dev
aromanenko-dev merged commit ce64ad5 into apache:master Feb 19, 2019
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.

2 participants