Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
ba4feb3
Add example source
anfeldma-ms Mar 5, 2020
de6154d
Updated .gitignore
anfeldma-ms Mar 5, 2020
b140ac4
Modified .gitignore
anfeldma-ms Mar 5, 2020
87579f2
Modified .gitignore
anfeldma-ms Mar 5, 2020
17e14e9
Updated .gitignore
anfeldma-ms Mar 5, 2020
41c7349
pom.xml changes
anfeldma-ms Mar 5, 2020
708c0b6
Working pom.xml
anfeldma-ms Mar 5, 2020
ee1bcc2
Example code will work (once some dependency issues are resolved.)
anfeldma-ms Mar 5, 2020
c08471e
Everything runs; added explanatory comments in SampleChangeFeedProces…
anfeldma-ms Mar 5, 2020
aa65b13
Cosmetic fixes
anfeldma-ms Mar 5, 2020
36ea327
In SampleGroceryStore changefeed triggers three core functionalities
anfeldma-ms Mar 5, 2020
39a60b0
Merge pull request #1 from Azure-Samples/groceryStoreExampmle
anfeldma-ms Mar 5, 2020
c210555
Updated pom.xml
anfeldma-ms Mar 9, 2020
37ec9ce
Merge branch 'master' of https://github.com/Azure-Samples/azure-cosmo…
anfeldma-ms Mar 9, 2020
c40ea1c
Deleted .idea baggage
anfeldma-ms Mar 9, 2020
9f73ffa
Updated README.md header
anfeldma-ms Mar 9, 2020
601648e
README.md update
anfeldma-ms Mar 9, 2020
c961f4e
README.md update2
anfeldma-ms Mar 9, 2020
c4caeae
README.md update3
anfeldma-ms Mar 9, 2020
6ea09a0
README.md update3
anfeldma-ms Mar 9, 2020
2023217
README.md update3
anfeldma-ms Mar 9, 2020
e0ef69f
README.md update3
anfeldma-ms Mar 9, 2020
8fa2f88
README.md update4
anfeldma-ms Mar 9, 2020
a86fb5b
README.md
anfeldma-ms Mar 9, 2020
d85a9ea
README updatre
anfeldma-ms Mar 9, 2020
3e8c2a8
Clearer Change Feed example, shows POJO/JSON usage
anfeldma-ms Mar 9, 2020
4042f4d
Updated README.md
anfeldma-ms Mar 9, 2020
92d5f2c
Deleted worked app example from master
anfeldma-ms Mar 9, 2020
65f6e14
Improved stored procedure example
anfeldma-ms Mar 9, 2020
348efd9
Updated async stored procedures example
anfeldma-ms Mar 9, 2020
7817463
Improved indexing example.
anfeldma-ms Mar 9, 2020
e7373f7
Converted logger calls into println calls
anfeldma-ms Mar 9, 2020
5be7ba9
Updated sync/async SampleCRUDQuickstart code to include item and reso…
anfeldma-ms Mar 9, 2020
d49650d
Added upsert to each of the CRUD examples, sync/async
anfeldma-ms Mar 9, 2020
ba69117
Fixed missing subscribe() calls in async code
anfeldma-ms Mar 10, 2020
1d27d37
Improved Change Feed sample comments
anfeldma-ms Mar 10, 2020
7495a28
Improved Change Feed sample
anfeldma-ms Mar 10, 2020
54f0ec3
Updated pom.xml to latest (public) release
anfeldma-ms Mar 10, 2020
d66fa8c
Fixed issues with pom.xml; updated samples for latest jar
anfeldma-ms Mar 10, 2020
f86de9b
Updated README.md with current package names for executing samples vi…
anfeldma-ms Mar 10, 2020
70f951e
Applying Mo's suggested changes: code cleanup esp. imports & licensin…
anfeldma-ms Mar 10, 2020
fec3a95
Updated README.md to be IDE-agnostic
anfeldma-ms Mar 10, 2020
b062c61
Improved explanatory comments in all samples
anfeldma-ms Mar 10, 2020
00f514e
Cleaned up code
anfeldma-ms Mar 10, 2020
75caa49
Added Reactor Pattern Guide
anfeldma-ms Mar 10, 2020
1b1f64e
Simple Reactive Stream example
anfeldma-ms Mar 10, 2020
dfeda92
Outlined what I plan to write about
anfeldma-ms Mar 10, 2020
ccc8d13
Update reactor-pattern-guide.md
anfeldma-ms Mar 13, 2020
e2ecdc6
Update reactor-pattern-guide.md
anfeldma-ms Mar 13, 2020
db030a8
Update reactor-pattern-guide.md
anfeldma-ms Mar 13, 2020
fc5aa92
First attempt at async request throughput sample using Flux
anfeldma-ms Mar 16, 2020
5c66cae
Different structure, Mono-based
anfeldma-ms Mar 16, 2020
b1a9a1e
Working sync and async request throughput samples
anfeldma-ms Mar 17, 2020
96aac33
Essentially finished Request Throughput Samples
anfeldma-ms Mar 17, 2020
b3ccb15
Update README.md
anfeldma-ms Mar 18, 2020
9226c21
Manually merged changes to Worked App Sample and request throughput s…
anfeldma-ms Mar 24, 2020
43f8bc8
Sanified RUs and number of docs to 400RU/s and 50K docs, respectively.
anfeldma-ms Mar 24, 2020
f5785cd
Sanified RUs and number of docs to 400RU/s and 50K docs, respectively…
anfeldma-ms Mar 24, 2020
5357885
Added disclaimer
anfeldma-ms Mar 24, 2020
863bd64
Fixed disclaimer
anfeldma-ms Mar 24, 2020
beb202d
Removed RxJava vs Reactor
anfeldma-ms Mar 25, 2020
79d6eb3
Removed RxJava vs Reactor content
anfeldma-ms Mar 25, 2020
5ecc63a
Update to Reactor Pattern guide
anfeldma-ms Mar 27, 2020
1910551
Restructured and made small improvements to Reactor Pattern Guide
anfeldma-ms Mar 27, 2020
5d561d9
Progress on reactor pattern guide
anfeldma-ms Mar 27, 2020
3ee6223
Full content for Reactor pattern guide
anfeldma-ms Mar 27, 2020
8161813
Minor fix
anfeldma-ms Mar 27, 2020
4c7f007
Minor fix
anfeldma-ms Mar 27, 2020
0bb8cd3
Minor fix
anfeldma-ms Mar 27, 2020
4553f69
Clarity
anfeldma-ms Mar 27, 2020
552a6dc
Fixes
anfeldma-ms Mar 27, 2020
416e85c
RxJava
anfeldma-ms Mar 27, 2020
a9337af
URL fix
anfeldma-ms Mar 27, 2020
c4e13fb
https -> http for ReactiveX link
anfeldma-ms Mar 27, 2020
67166c6
Merge pull request #3 from Azure-Samples/ReactorPatternGuide
anfeldma-ms Mar 27, 2020
4f59853
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
33d5759
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
6e5d02e
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
693a2ae
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
e46772e
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
2a29cc0
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
261c870
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
04ff182
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
d2acbcc
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
ff6c444
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
686be9c
Update reactor-pattern-guide.md
anfeldma-ms Mar 27, 2020
00f31f2
Minor spacing change
anfeldma-ms Mar 27, 2020
8744310
MigrationGuide: version comparison table
anfeldma-ms Mar 29, 2020
6506ae2
State of migration guide
anfeldma-ms Mar 29, 2020
9f1862e
State of migration guide
anfeldma-ms Mar 30, 2020
286d4c5
Java SDK 4.0 content for Migration Guide
anfeldma-ms Mar 30, 2020
721a314
Migration guide ready for merge to master
anfeldma-ms Mar 30, 2020
f3cd58c
Merge pull request #5 from Azure-Samples/MigrationGuide
anfeldma-ms Mar 30, 2020
cc1fd08
Title capitalization
anfeldma-ms Mar 30, 2020
c32c8ec
Update migration-guide.md
anfeldma-ms Mar 30, 2020
e40426d
Fixed image not appearing
anfeldma-ms Mar 30, 2020
ababdf2
Added Java package names for v2.x.x SDKs
anfeldma-ms Mar 30, 2020
0893099
Minor changes
anfeldma-ms Mar 30, 2020
c60122d
First run at Reactor RxJava guide
anfeldma-ms Mar 30, 2020
dd692f6
Merge pull request #6 from Azure-Samples/ReactorRxJava
anfeldma-ms Mar 30, 2020
a3bd605
small fix
anfeldma-ms Mar 30, 2020
570af8a
Typo
anfeldma-ms Mar 30, 2020
4317826
Removed quotes
anfeldma-ms Mar 30, 2020
063359e
Quotes
anfeldma-ms Mar 30, 2020
37f8365
Reproduced M issue
anfeldma-ms Apr 9, 2020
fff179d
Updated code with cosmos container replace operation
kushagraThapar Apr 10, 2020
c1842ea
Merge pull request #9 from Azure-Samples/updateContainer
kushagraThapar Apr 10, 2020
c49d389
Typos
anfeldma-ms Apr 28, 2020
abcdb15
Created DatabaseCRUDQuickstart.java
anfeldma-ms May 11, 2020
d771500
Added container CRUD sample
anfeldma-ms May 11, 2020
5f2bdec
Document CRUD samples
anfeldma-ms May 11, 2020
876552f
SOW on queries
anfeldma-ms May 11, 2020
e3ac8c2
Query samples
anfeldma-ms May 15, 2020
5ff3b6e
Autoscale container CRUD demo
anfeldma-ms May 15, 2020
778409e
Added autoscale database CRUD demo
anfeldma-ms May 15, 2020
de4aa7c
Analytical store sample
anfeldma-ms May 15, 2020
30ca98a
Merge pull request #11 from Azure-Samples/dotNetParity
anfeldma-ms May 15, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,43 @@ buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# idea files
/.idea/

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# Eclipse project file
*.project

# Maven autogenerated classpath
*.classpath

#VSCode Directories
/*.settings/
/*.vscode/
/target/

*.iml
58 changes: 46 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
page_type: sample
languages:
- csharp
- java
products:
- dotnet
description: "Add 150 character max description"
urlFragment: "update-this-to-unique-url-stub"
- java sdk
description: "Sample code repo for Azure Cosmos DB Java SDK for SQL API"
urlFragment: ""
---

# Azure Cosmos DB Java SQL API Samples
Expand All @@ -18,36 +18,70 @@ Guidance on onboarding samples to docs.microsoft.com/samples: https://review.doc
Taxonomies for products and languages: https://review.docs.microsoft.com/new-hope/information-architecture/metadata/taxonomies?branch=master
-->

Give a short description for your sample here. What does it do and why is it important?
Sample code repo for Azure Cosmos DB Java SDK for SQL API. By cloning and running these samples, and then studying their implementations, you will have an example for sending various requests to Azure Cosmos DB from Java SDK via the SQL API.

## Contents

Outline the file contents of the repository. It helps users navigate the codebase, build configuration and any related assets.

| File/folder | Description |
|-------------------|--------------------------------------------|
| `src` | Sample source code. |
| `src` | Java sample source code. Many samples have 'sync' and 'async' variants |
| `.gitignore` | Define what to ignore at commit time. |
| `CHANGELOG.md` | List of changes to the sample. |
| `CONTRIBUTING.md` | Guidelines for contributing to the sample. |
| `README.md` | This README file. |
| `LICENSE` | The license for the sample. |
| `pom.xml` | Maven Project Object Model File

## Prerequisites

Outline the required components and tools that a user might need to have on their machine in order to run the sample. This can be anything from frameworks, SDKs, OS versions or IDE releases.
* Maven
* Java SE JRE 8
* Setting up an Azure Cosmos DB account through the Azure Portal. The **Create a database account** section of [this guide](https://docs.microsoft.com/en-us/azure/cosmos-db/create-sql-api-java) walks you through account creation.
* The hostname and master key for your Azure Cosmos DB account

## Setup

Explain how to prepare the sample once the user clones or downloads the repository. The section should outline every step necessary to install dependencies and set up any settings (for example, API keys and output folders).
Clone the sample to your PC. Using your Java IDE, open pom.xml as a Maven project.

## Running the sample

Outline step-by-step instructions to execute the sample and see its output. Include steps for executing the sample from the IDE, starting specific services in the Azure portal or anything related to the overall launch of the code.
These environment variables must be set

```
ACCOUNT_HOST=your account hostname;ACCOUNT_KEY=your account master key
```

in order to give the samples read/write access to your account.

To run a sample, specify its Main Class

```
com.azure.cosmos.examples.sample.synchronicity.MainClass
```

where *sample.synchronicity.MainClass* can be
* crudquickstart.sync.SampleCRUDQuickstart
* crudquickstart.async.SampleCRUDQuickstartAsync
* indexmanagement.sync.SampleIndexManagement
* indexmanagement.async.SampleIndexManagementAsync
* storedprocedure.sync.SampleStoredProcedure
* storedprocedure.async.SampleStoredProcedureAsync
* changefeed.SampleChangeFeedProcessor *(Changefeed has only an async sample, no sync sample.)*

*Build and execute from command line without an IDE:* From top-level directory of repo:
```
mvn clean package
mvn exec:java -Dexec.mainClass="com.azure.cosmos.examples.sample.synchronicity.MainClass" -DACCOUNT_HOST=your account hostname -DACCOUNT_KEY=your account master key
```

where *sample.synchronicity.MainClass*, *your account hostname*, and *your account master key* are to be filled in as above. This will rebuild and run the selected sample.

## Key concepts

Provide users with more context on the tools and services used in the sample. Explain some of the code that is being used and how services interact with each other.
These samples cover a range of Azure Cosmos DB usage topics from more to less basic:
* Basic management of databases, containers and items
* Indexing, stored procedures
* Change Feed

## Contributing

Expand Down
Binary file added media/java_sdk_naming_conventions.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading