This is an automated email from the ASF dual-hosted git repository. aromanenko pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push: new 0fd297e [BEAM-6268] Adjust Cassandra ports new ce64ad5 Merge pull request #7317: [BEAM-6268] Adjust Cassandra ports 0fd297e is described below commit 0fd297ed628ca94bbc342621aceaca0f9ba71172 Author: Alexey Romanenko <aromanenko....@gmail.com> AuthorDate: Wed Dec 19 16:39:01 2018 +0100 [BEAM-6268] Adjust Cassandra ports --- .../beam/sdk/io/hadoop/format/HadoopFormatIOCassandraTest.java | 6 ++++-- .../sdk/io/hadoop/inputformat/HIFIOWithEmbeddedCassandraTest.java | 6 +++++- .../java/io/hadoop-input-format/src/test/resources/cassandra.yaml | 8 ++++---- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/sdks/java/io/hadoop-format/src/test/java/org/apache/beam/sdk/io/hadoop/format/HadoopFormatIOCassandraTest.java b/sdks/java/io/hadoop-format/src/test/java/org/apache/beam/sdk/io/hadoop/format/HadoopFormatIOCassandraTest.java index 4b88e32..6000c79 100644 --- a/sdks/java/io/hadoop-format/src/test/java/org/apache/beam/sdk/io/hadoop/format/HadoopFormatIOCassandraTest.java +++ b/sdks/java/io/hadoop-format/src/test/java/org/apache/beam/sdk/io/hadoop/format/HadoopFormatIOCassandraTest.java @@ -38,20 +38,19 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.InputFormat; import org.junit.AfterClass; import org.junit.BeforeClass; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.JUnit4; /** Tests to validate HadoopFormatIO for embedded Cassandra instance. */ -@Ignore("Ignored because of BEAM-6268") @RunWith(JUnit4.class) public class HadoopFormatIOCassandraTest implements Serializable { private static final long serialVersionUID = 1L; private static final String CASSANDRA_KEYSPACE = "beamdb"; private static final String CASSANDRA_HOST = "127.0.0.1"; private static final String CASSANDRA_TABLE = "scientists"; + private static final String CASSANDRA_NATIVE_PORT_PROPERTY = "cassandra.input.native.port"; private static final String CASSANDRA_THRIFT_PORT_PROPERTY = "cassandra.input.thrift.port"; private static final String CASSANDRA_THRIFT_ADDRESS_PROPERTY = "cassandra.input.thrift.address"; private static final String CASSANDRA_PARTITIONER_CLASS_PROPERTY = @@ -60,6 +59,7 @@ public class HadoopFormatIOCassandraTest implements Serializable { private static final String CASSANDRA_KEYSPACE_PROPERTY = "cassandra.input.keyspace"; private static final String CASSANDRA_COLUMNFAMILY_PROPERTY = "cassandra.input.columnfamily"; private static final String CASSANDRA_PORT = "9061"; + private static final String CASSANDRA_NATIVE_PORT = "9042"; private static transient Cluster cluster; private static transient Session session; private static final long TEST_DATA_ROW_COUNT = 10L; @@ -140,6 +140,7 @@ public class HadoopFormatIOCassandraTest implements Serializable { */ private Configuration getConfiguration() { Configuration conf = new Configuration(); + conf.set(CASSANDRA_NATIVE_PORT_PROPERTY, CASSANDRA_NATIVE_PORT); conf.set(CASSANDRA_THRIFT_PORT_PROPERTY, CASSANDRA_PORT); conf.set(CASSANDRA_THRIFT_ADDRESS_PROPERTY, CASSANDRA_HOST); conf.set(CASSANDRA_PARTITIONER_CLASS_PROPERTY, CASSANDRA_PARTITIONER_CLASS_VALUE); @@ -189,6 +190,7 @@ public class HadoopFormatIOCassandraTest implements Serializable { .addContactPoint(CASSANDRA_HOST) .withClusterName("beam") .withSocketOptions(socketOptions) + .withPort(Integer.valueOf(CASSANDRA_NATIVE_PORT)) .build(); session = cluster.connect(); createCassandraData(); diff --git a/sdks/java/io/hadoop-input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithEmbeddedCassandraTest.java b/sdks/java/io/hadoop-input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithEmbeddedCassandraTest.java index 0273261..c8d7d8d 100644 --- a/sdks/java/io/hadoop-input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithEmbeddedCassandraTest.java +++ b/sdks/java/io/hadoop-input-format/src/test/java/org/apache/beam/sdk/io/hadoop/inputformat/HIFIOWithEmbeddedCassandraTest.java @@ -50,6 +50,7 @@ public class HIFIOWithEmbeddedCassandraTest implements Serializable { private static final String CASSANDRA_KEYSPACE = "beamdb"; private static final String CASSANDRA_HOST = "127.0.0.1"; private static final String CASSANDRA_TABLE = "scientists"; + private static final String CASSANDRA_NATIVE_PORT_PROPERTY = "cassandra.input.native.port"; private static final String CASSANDRA_THRIFT_PORT_PROPERTY = "cassandra.input.thrift.port"; private static final String CASSANDRA_THRIFT_ADDRESS_PROPERTY = "cassandra.input.thrift.address"; private static final String CASSANDRA_PARTITIONER_CLASS_PROPERTY = @@ -57,7 +58,8 @@ public class HIFIOWithEmbeddedCassandraTest implements Serializable { private static final String CASSANDRA_PARTITIONER_CLASS_VALUE = "Murmur3Partitioner"; private static final String CASSANDRA_KEYSPACE_PROPERTY = "cassandra.input.keyspace"; private static final String CASSANDRA_COLUMNFAMILY_PROPERTY = "cassandra.input.columnfamily"; - private static final String CASSANDRA_PORT = "9061"; + private static final String CASSANDRA_PORT = "9062"; + private static final String CASSANDRA_NATIVE_PORT = "9043"; private static transient Cluster cluster; private static transient Session session; private static final long TEST_DATA_ROW_COUNT = 10L; @@ -138,6 +140,7 @@ public class HIFIOWithEmbeddedCassandraTest implements Serializable { */ private Configuration getConfiguration() { Configuration conf = new Configuration(); + conf.set(CASSANDRA_NATIVE_PORT_PROPERTY, CASSANDRA_NATIVE_PORT); conf.set(CASSANDRA_THRIFT_PORT_PROPERTY, CASSANDRA_PORT); conf.set(CASSANDRA_THRIFT_ADDRESS_PROPERTY, CASSANDRA_HOST); conf.set(CASSANDRA_PARTITIONER_CLASS_PROPERTY, CASSANDRA_PARTITIONER_CLASS_VALUE); @@ -187,6 +190,7 @@ public class HIFIOWithEmbeddedCassandraTest implements Serializable { .addContactPoint(CASSANDRA_HOST) .withClusterName("beam") .withSocketOptions(socketOptions) + .withPort(Integer.valueOf(CASSANDRA_NATIVE_PORT)) .build(); session = cluster.connect(); createCassandraData(); diff --git a/sdks/java/io/hadoop-input-format/src/test/resources/cassandra.yaml b/sdks/java/io/hadoop-input-format/src/test/resources/cassandra.yaml index ca1e48f..67213db 100644 --- a/sdks/java/io/hadoop-input-format/src/test/resources/cassandra.yaml +++ b/sdks/java/io/hadoop-input-format/src/test/resources/cassandra.yaml @@ -522,12 +522,12 @@ trickle_fsync_interval_in_kb: 10240 # 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: 7100 # SSL port, for encrypted communication. Unused unless enabled in # encryption_options # For security reasons, you should not expose this port to the internet. Firewall it if needed. -ssl_storage_port: 7001 +ssl_storage_port: 7101 # Address or interface to bind to and tell other Cassandra nodes to connect to. # You _must_ change this if you want multiple nodes to be able to communicate! @@ -572,7 +572,7 @@ listen_address: localhost start_native_transport: true # port for the CQL native transport to listen for clients on # For security reasons, you should not expose this port to the internet. Firewall it if needed. -native_transport_port: 9042 +native_transport_port: 9043 # Enabling native transport encryption in client_encryption_options allows you to either use # encryption for the standard port or to use a dedicated, additional port along with the unencrypted # standard native_transport_port. @@ -626,7 +626,7 @@ rpc_address: 127.0.0.1 # rpc_interface_prefer_ipv6: false # port for Thrift to listen for clients on -rpc_port: 9160 +rpc_port: 9161 # RPC address to broadcast to drivers and other Cassandra nodes. This cannot # be set to 0.0.0.0. If left blank, this will be set to the value of