Skip to content

Commit 1fd748b

Browse files
authored
Merge pull request #5 from dchenbec/fix-issue-4-local-dc
Remove local datacenter from application.conf
2 parents d615d18 + bb5d637 commit 1fd748b

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CHANGELOG
2+
3+
## [1.0.2] - 2020-04-14
4+
5+
Resolves issue #4 by removing the `local-datacenter` parameter from the `application.conf` file, and uses the region
6+
specified on the command line.
7+
8+
## [1.0.1] - 2020-04-01
9+
10+
Update the POM to reference the latest version of the plugin
11+
12+
## [1.0.0] - 2020-03-17
13+
14+
Initial Release

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>software.aws.mcs</groupId>
55
<artifactId>aws-sigv4-auth-cassandra-java-driver-examples</artifactId>
6-
<version>1.0.1</version>
6+
<version>1.0.2</version>
77
<name>AWS SigV4 Auth Java Driver 4.x Examples</name>
88
<organization>
99
<name>Amazon Web Services</name>

src/main/java/software/aws/mcs/example/OrderFetcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static void main(String[] args) {
4545
SigV4AuthProvider provider = new SigV4AuthProvider(args[0]);
4646
List<InetSocketAddress> contactPoints = Collections.singletonList(new InetSocketAddress(args[1], 9142));
4747

48-
try (CqlSession session = CqlSession.builder().addContactPoints(contactPoints).withAuthProvider(provider).build()) {
48+
try (CqlSession session = CqlSession.builder().addContactPoints(contactPoints).withAuthProvider(provider).withLocalDatacenter(args[0]).build()) {
4949
// Use a prepared query for quoting
5050
PreparedStatement prepared = session.prepare("select * from acme.orders where customer_id = ?");
5151

src/main/resources/application-full.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ datastax-java-driver {
22
basic.contact-points = [ "cassandra.us-east-2.amazonaws.com:9142" ]
33
basic.load-balancing-policy {
44
class = DefaultLoadBalancingPolicy
5-
local-datacenter = dc1
65
}
76
advanced {
87
auth-provider = {

src/main/resources/application.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
datastax-java-driver {
22
basic.load-balancing-policy {
33
class = DefaultLoadBalancingPolicy
4-
local-datacenter = dc1
54
}
65
advanced {
76
auth-provider = {

0 commit comments

Comments
 (0)