Skip to content

Commit

Permalink
Merge pull request #3 from TheovanKraay/master
Browse files Browse the repository at this point in the history
address issue 6320063
  • Loading branch information
kanshiG authored Apr 9, 2020
2 parents 236d3d8 + 849139c commit d19fe8f
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 29 deletions.
21 changes: 19 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
target/
pom.xml.tag

target/pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
Expand All @@ -9,4 +9,21 @@ buildNumber.properties
.mvn/timing.properties

# Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)

!/.mvn/wrapper/maven-wrapper.jar
target/
pom.xml.tag
*.iml
.idea/
logs
project/project
project/target
target
tmp
dist
.cache
.settings
.project
*.classpath
.DS_Store
/bin
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ Azure Cosmos DB is a globally distributed multi-model database. One of the suppo
## Running this sample
1. Clone this repository using `git clone [email protected]:Azure-Samples/azure-cosmos-db-cassandra-java-getting-started.git cosmosdb`.

2. Change directories to the repo using `cd cosmosdb/java-examples`
2. Change directories to the repo using `cd cosmosdb`

3. Next, substitute the Cassandra host, username, password `java-examples\src\main\resources\config.properties` with your Cosmos DB account's values from connectionstring panel of the portal.
3. Next, substitute the Cassandra host, username, password `src\main\resources\config.properties` with your Cosmos DB account's values from connectionstring panel of the portal.

```
cassandra_host=<FILLME>
Expand All @@ -39,7 +39,7 @@ Azure Cosmos DB is a globally distributed multi-model database. One of the suppo
If ssl_keystore_file_path is not given in config.properties, then by default <JAVA_HOME>/jre/lib/security/cacerts will be used
If ssl_keystore_password is not given in config.properties, then the default password 'changeit' will be used
5. Run `mvn clean install` from java-examples folder to build the project. This will generate cosmosdb-cassandra-examples.jar under target folder.
5. Run `mvn clean install` from cosmosdb folder to build the project. This will generate cosmosdb-cassandra-examples.jar under target folder.
6. Run `java -cp target/cosmosdb-cassandra-examples.jar com.azure.cosmosdb.cassandra.examples.UserProfile` in a terminal to start your java application.
![Console output](./media/output.png)
Expand Down Expand Up @@ -91,7 +91,7 @@ If you're interested in learning how the database resources are created in the c
return session.prepare(insertStatement);
}

public void insertUser(PreparedStatement statement, int id, String name, String city) {
public void insertUser(PreparedStatement statement, int id, String name, String city) {
BoundStatement boundStatement = new BoundStatement(statement);
session.execute(boundStatement.bind(id, name, city));
}
Expand Down
19 changes: 0 additions & 19 deletions java-examples/.gitignore

This file was deleted.

4 changes: 2 additions & 2 deletions java-examples/pom.xml → pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###Cassandra endpoint details on cosmosdb
cassandra_host=<Cassandra endpoint host>
cassandra_port=10350
cassandra_username=<cassandra endpoint username>
cassandra_password=<cassandra endpoint password>
cassandra_username=<Cassandra endpoint username>
cassandra_password=<Cassandra endpoint password>
#ssl_keystore_file_path=<SSL key store file location>
#ssl_keystore_password=<SSL key store password>
File renamed without changes.

0 comments on commit d19fe8f

Please sign in to comment.