Skip to content

Commit d329e51

Browse files
committed
Format fixes
1 parent 47be19e commit d329e51

File tree

6 files changed

+97
-79
lines changed

6 files changed

+97
-79
lines changed

articles/cosmos-db/bulk-executor-dot-net.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Currently, bulk executor library is supported by the Azure Cosmos DB SQL API and
2929

3030
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin.
3131

32-
* You can [Try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments. Or, you can use the [Azure Cosmos DB emulator](https://docs.microsoft.com/azure/cosmos-db/local-emulator) with the `https://localhost:8081` endpoint. The Primary Key is provided in [Authenticating requests](local-emulator.md#authenticate-requests).
32+
* You can [Try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments. Or, you can use the [Azure Cosmos DB emulator](/azure/cosmos-db/local-emulator) with the `https://localhost:8081` endpoint. The Primary Key is provided in [Authenticating requests](local-emulator.md#authenticate-requests).
3333

3434
* Create an Azure Cosmos DB SQL API account by using the steps described in [create database account](create-sql-api-dotnet.md#create-account) section of the .NET quickstart article.
3535

@@ -88,7 +88,7 @@ The "BulkImportSample" application generates random documents and bulk imports t
8888
client.ConnectionPolicy.RetryOptions.MaxRetryAttemptsOnThrottledRequests = 0;
8989
```
9090

91-
5. The application invokes the BulkImportAsync API. The .NET library provides two overloads of the bulk import API - one that accepts a list of serialized JSON documents and the other that accepts a list of deserialized POCO documents. To learn more about the definitions of each of these overloaded methods, refer to the [API documentation](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkexecutor.bulkimportasync?view=azure-dotnet).
91+
5. The application invokes the BulkImportAsync API. The .NET library provides two overloads of the bulk import API - one that accepts a list of serialized JSON documents and the other that accepts a list of deserialized POCO documents. To learn more about the definitions of each of these overloaded methods, refer to the [API documentation](/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkexecutor.bulkimportasync?view=azure-dotnet&preserve-view=true).
9292

9393
```csharp
9494
BulkImportResponse bulkImportResponse = await bulkExecutor.BulkImportAsync(
@@ -121,11 +121,11 @@ The "BulkImportSample" application generates random documents and bulk imports t
121121

122122
## Bulk update data in your Azure Cosmos account
123123

124-
You can update existing documents by using the BulkUpdateAsync API. In this example, you will set the `Name` field to a new value and remove the `Description` field from the existing documents. For the full set of supported update operations, refer to the [API documentation](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate?view=azure-dotnet).
124+
You can update existing documents by using the BulkUpdateAsync API. In this example, you will set the `Name` field to a new value and remove the `Description` field from the existing documents. For the full set of supported update operations, refer to the [API documentation](/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate?view=azure-dotnet&preserve-view=true).
125125

126126
1. Navigate to the "BulkUpdateSample" folder and open the "BulkUpdateSample.sln" file.
127127

128-
2. Define the update items along with the corresponding field update operations. In this example, you will use `SetUpdateOperation` to update the `Name` field and `UnsetUpdateOperation` to remove the `Description` field from all the documents. You can also perform other operations like increment a document field by a specific value, push specific values into an array field, or remove a specific value from an array field. To learn about different methods provided by the bulk update API, refer to the [API documentation](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate?view=azure-dotnet).
128+
2. Define the update items along with the corresponding field update operations. In this example, you will use `SetUpdateOperation` to update the `Name` field and `UnsetUpdateOperation` to remove the `Description` field from all the documents. You can also perform other operations like increment a document field by a specific value, push specific values into an array field, or remove a specific value from an array field. To learn about different methods provided by the bulk update API, refer to the [API documentation](/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.bulkupdate?view=azure-dotnet&preserve-view=true).
129129

130130
```csharp
131131
SetUpdateOperation<string> nameUpdate = new SetUpdateOperation<string>("Name", "UpdatedDoc");
@@ -142,7 +142,7 @@ You can update existing documents by using the BulkUpdateAsync API. In this exam
142142
}
143143
```
144144

145-
3. The application invokes the BulkUpdateAsync API. To learn about the definition of the BulkUpdateAsync method, refer to the [API documentation](https://docs.microsoft.com/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.ibulkexecutor.bulkupdateasync?view=azure-dotnet).
145+
3. The application invokes the BulkUpdateAsync API. To learn about the definition of the BulkUpdateAsync method, refer to the [API documentation](/dotnet/api/microsoft.azure.cosmosdb.bulkexecutor.ibulkexecutor.bulkupdateasync?view=azure-dotnet&preserve-view=true).
146146

147147
```csharp
148148
BulkUpdateResponse bulkUpdateResponse = await bulkExecutor.BulkUpdateAsync(

articles/cosmos-db/bulk-executor-java.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Currently, the bulk executor library is supported only by Azure Cosmos DB SQL AP
2222

2323
* If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin.
2424

25-
* You can [try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments. Or, you can use the [Azure Cosmos DB Emulator](https://docs.microsoft.com/azure/cosmos-db/local-emulator) with the `https://localhost:8081` endpoint. The Primary Key is provided in [Authenticating requests](local-emulator.md#authenticate-requests).
25+
* You can [try Azure Cosmos DB for free](https://azure.microsoft.com/try/cosmosdb/) without an Azure subscription, free of charge and commitments. Or, you can use the [Azure Cosmos DB Emulator](/azure/cosmos-db/local-emulator) with the `https://localhost:8081` endpoint. The Primary Key is provided in [Authenticating requests](local-emulator.md#authenticate-requests).
2626

27-
* [Java Development Kit (JDK) 1.7+](/java/azure/jdk/?view=azure-java-stable)
27+
* [Java Development Kit (JDK) 1.7+](/java/azure/jdk/?view=azure-java-stable&preserve-view=true)
2828
- On Ubuntu, run `apt-get install default-jdk` to install the JDK.
2929

3030
- Be sure to set the JAVA_HOME environment variable to point to the folder where the JDK is installed.
@@ -89,7 +89,7 @@ The cloned repository contains two samples "bulkimport" and "bulkupdate" relativ
8989
```java
9090
BulkImportResponse bulkImportResponse = bulkExecutor.importAll(documents, false, true, null);
9191
```
92-
The bulk import API accepts a collection of JSON-serialized documents and it has the following syntax, for more details, see the [API documentation](https://docs.microsoft.com/java/api/com.microsoft.azure.documentdb.bulkexecutor):
92+
The bulk import API accepts a collection of JSON-serialized documents and it has the following syntax, for more details, see the [API documentation](/java/api/com.microsoft.azure.documentdb.bulkexecutor):
9393

9494
```java
9595
public BulkImportResponse importAll(
@@ -134,9 +134,9 @@ The cloned repository contains two samples "bulkimport" and "bulkupdate" relativ
134134

135135
## Bulk update data in Azure Cosmos DB
136136

137-
You can update existing documents by using the BulkUpdateAsync API. In this example, you will set the Name field to a new value and remove the Description field from the existing documents. For the full set of supported field update operations, see [API documentation](https://docs.microsoft.com/java/api/com.microsoft.azure.documentdb.bulkexecutor).
137+
You can update existing documents by using the BulkUpdateAsync API. In this example, you will set the Name field to a new value and remove the Description field from the existing documents. For the full set of supported field update operations, see [API documentation](/java/api/com.microsoft.azure.documentdb.bulkexecutor).
138138

139-
1. Defines the update items along with corresponding field update operations. In this example, you will use SetUpdateOperation to update the Name field and UnsetUpdateOperation to remove the Description field from all the documents. You can also perform other operations like increment a document field by a specific value, push specific values into an array field, or remove a specific value from an array field. To learn about different methods provided by the bulk update API, see the [API documentation](https://docs.microsoft.com/java/api/com.microsoft.azure.documentdb.bulkexecutor).
139+
1. Defines the update items along with corresponding field update operations. In this example, you will use SetUpdateOperation to update the Name field and UnsetUpdateOperation to remove the Description field from all the documents. You can also perform other operations like increment a document field by a specific value, push specific values into an array field, or remove a specific value from an array field. To learn about different methods provided by the bulk update API, see the [API documentation](/java/api/com.microsoft.azure.documentdb.bulkexecutor).
140140

141141
```java
142142
SetUpdateOperation<String> nameUpdate = new SetUpdateOperation<>("Name","UpdatedDocValue");
@@ -158,7 +158,7 @@ You can update existing documents by using the BulkUpdateAsync API. In this exam
158158
BulkUpdateResponse bulkUpdateResponse = bulkExecutor.updateAll(updateItems, null)
159159
```
160160

161-
The bulk update API accepts a collection of items to be updated. Each update item specifies the list of field update operations to be performed on a document identified by an ID and a partition key value. for more details, see the [API documentation](https://docs.microsoft.com/java/api/com.microsoft.azure.documentdb.bulkexecutor):
161+
The bulk update API accepts a collection of items to be updated. Each update item specifies the list of field update operations to be performed on a document identified by an ID and a partition key value. for more details, see the [API documentation](/java/api/com.microsoft.azure.documentdb.bulkexecutor):
162162

163163
```java
164164
public BulkUpdateResponse updateAll(

articles/cosmos-db/local-emulator-export-ssl-certificates.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ When connecting to the emulator from Python and Node.js SDKs, TLS verification i
9999

100100
## Next steps
101101

102-
Next you can learn
102+
* [Use command line parameters and PowerShell commands to control the emulator](emulator-command-line-parameters.md)
103+
* [Debug issues with the emulator](troubleshoot-local-emulator.md)
103104

104-
You can now proceed to the concepts section for more information about Azure Cosmos DB.
105-
106-
[Tunable data consistency levels in Azure Cosmos DB](../cosmos-db/consistency-levels.md)

articles/cosmos-db/local-emulator.md

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -175,26 +175,26 @@ If you have a .NET client application running on a Linux docker container and if
175175

176176
Currently the Azure Cosmos emulator can only be run on Windows. If you are using Linux or macOS, you can run the emulator in a Windows virtual machine hosted in a hypervisor such as Parallels or VirtualBox. Use the following steps to enable this.
177177

178-
* Run the following command from the Windows virtual machine and make a note of the IPv4 address:
178+
1. Run the following command from the Windows virtual machine and make a note of the IPv4 address:
179179

180-
```cmd
181-
ipconfig.exe
182-
```
180+
```cmd
181+
ipconfig.exe
182+
```
183183

184-
* Within your application, change the endpoint URL to use the IPv4 address returned by `ipconfig.exe` instead of `localhost`.
184+
1. Within your application, change the endpoint URL to use the IPv4 address returned by `ipconfig.exe` instead of `localhost`.
185185

186-
* From the Windows VM, launch the Azure Cosmos emulator from the command line using the following options. For details on the parameters supported by the command line, see the [emulator command-line tool reference](emulator-command-line-parameters.md):
186+
1. From the Windows VM, launch the Azure Cosmos emulator from the command line using the following options. For details on the parameters supported by the command line, see the [emulator command-line tool reference](emulator-command-line-parameters.md):
187187

188188
```cmd
189189
Microsoft.Azure.Cosmos.Emulator.exe /AllowNetworkAccess /Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
190190
```
191191

192-
* Finally, you need to resolve the certificate trust process between the application running on the Linux or Mac environment and the emulator. You can use one of the following two options to resolve the certificate:
192+
1. Finally, you need to resolve the certificate trust process between the application running on the Linux or Mac environment and the emulator. You can use one of the following two options to resolve the certificate:
193193

194194
1. [Import the emulator CA certificate into the Linux or Mac environment](#import-certificate) or
195195
2. [Disable the SSL validation in the application](#disable-ssl-validation)
196196

197-
### <a id="import-certificate"></a>1. Import the emulator CA certificate
197+
### <a id="import-certificate"></a>Option 1: Import the emulator CA certificate
198198

199199
The following sections show how to import the emulator CA certificate into Linux and macOS environments.
200200

@@ -242,7 +242,7 @@ Use the following steps if you are working on Mac:
242242

243243
After following these steps, your environment will trust the certificate used by the emulator when connecting to the IP address exposes by `/AllowNetworkAccess`.
244244

245-
### <a id="disable-ssl-validation"></a>2. Disable the SSL validation in the application
245+
### <a id="disable-ssl-validation"></a>Option 2: Disable the SSL validation in the application
246246

247247
Disabling SSL validation is only recommended for development purposes and should not be done when running in a production environment. The following examples show how to disable SSL validation for .NET and Node.js applications.
248248

@@ -333,69 +333,69 @@ table.Execute(TableOperation.Insert(new DynamicTableEntity("partitionKey", "rowK
333333

334334
Start emulator from an administrator [command prompt](emulator-command-line-parameters.md) with "/EnableCassandraEndpoint". Alternatively you can also set the environment variable `AZURE_COSMOS_EMULATOR_CASSANDRA_ENDPOINT=true`.
335335

336-
* [Install Python 2.7](https://www.python.org/downloads/release/python-2716/)
336+
1. [Install Python 2.7](https://www.python.org/downloads/release/python-2716/)
337337

338-
* [Install Cassandra CLI/CQLSH](https://cassandra.apache.org/download/)
338+
1. [Install Cassandra CLI/CQLSH](https://cassandra.apache.org/download/)
339339

340-
* Run the following commands in a regular command prompt window:
340+
1. Run the following commands in a regular command prompt window:
341341

342-
```bash
343-
set Path=c:\Python27;%Path%
344-
cd /d C:\sdk\apache-cassandra-3.11.3\bin
345-
set SSL_VERSION=TLSv1_2
346-
set SSL_VALIDATE=false
347-
cqlsh localhost 10350 -u localhost -p C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== --ssl
348-
```
342+
```bash
343+
set Path=c:\Python27;%Path%
344+
cd /d C:\sdk\apache-cassandra-3.11.3\bin
345+
set SSL_VERSION=TLSv1_2
346+
set SSL_VALIDATE=false
347+
cqlsh localhost 10350 -u localhost -p C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw== --ssl
348+
```
349349

350-
* In the CQLSH shell, run the following commands to connect to the Cassandra endpoint:
350+
1. In the CQLSH shell, run the following commands to connect to the Cassandra endpoint:
351351

352-
```bash
353-
CREATE KEYSPACE MyKeySpace WITH replication = {'class':'MyClass', 'replication_factor': 1};
354-
DESCRIBE keyspaces;
355-
USE mykeyspace;
356-
CREATE table table1(my_id int PRIMARY KEY, my_name text, my_desc text);
357-
INSERT into table1 (my_id, my_name, my_desc) values( 1, 'name1', 'description 1');
358-
SELECT * from table1;
359-
EXIT
360-
```
352+
```bash
353+
CREATE KEYSPACE MyKeySpace WITH replication = {'class':'MyClass', 'replication_factor': 1};
354+
DESCRIBE keyspaces;
355+
USE mykeyspace;
356+
CREATE table table1(my_id int PRIMARY KEY, my_name text, my_desc text);
357+
INSERT into table1 (my_id, my_name, my_desc) values( 1, 'name1', 'description 1');
358+
SELECT * from table1;
359+
EXIT
360+
```
361361

362362
### Gremlin API
363363

364364
Start emulator from an administrator [command prompt](emulator-command-line-parameters.md)with "/EnableGremlinEndpoint". Alternatively you can also set the environment variable `AZURE_COSMOS_EMULATOR_GREMLIN_ENDPOINT=true`
365365

366-
* [Install apache-tinkerpop-gremlin-console-3.3.4](https://archive.apache.org/dist/tinkerpop/3.3.4).
366+
1. [Install apache-tinkerpop-gremlin-console-3.3.4](https://archive.apache.org/dist/tinkerpop/3.3.4).
367367

368-
* From the emulator's data explorer create a database "db1" and a collection "coll1"; for the partition key, choose "/name"
368+
1. From the emulator's data explorer create a database "db1" and a collection "coll1"; for the partition key, choose "/name"
369369

370-
* Run the following commands in a regular command prompt window:
370+
1. Run the following commands in a regular command prompt window:
371371

372-
```bash
373-
cd /d C:\sdk\apache-tinkerpop-gremlin-console-3.3.4-bin\apache-tinkerpop-gremlin-console-3.3.4
372+
```bash
373+
cd /d C:\sdk\apache-tinkerpop-gremlin-console-3.3.4-bin\apache-tinkerpop-gremlin-console-3.3.4
374374

375-
copy /y conf\remote.yaml conf\remote-localcompute.yaml
376-
notepad.exe conf\remote-localcompute.yaml
377-
hosts: [localhost]
378-
port: 8901
379-
username: /dbs/db1/colls/coll1
380-
password: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
381-
connectionPool: {
382-
enableSsl: false}
383-
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,
384-
config: { serializeResultToString: true }}
385-
386-
bin\gremlin.bat
387-
```
375+
copy /y conf\remote.yaml conf\remote-localcompute.yaml
376+
notepad.exe conf\remote-localcompute.yaml
377+
hosts: [localhost]
378+
port: 8901
379+
username: /dbs/db1/colls/coll1
380+
password: C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==
381+
connectionPool: {
382+
enableSsl: false}
383+
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,
384+
config: { serializeResultToString: true }}
385+
386+
bin\gremlin.bat
387+
```
388388
389-
* In the Gremlin shell, run the following commands to connect to the Gremlin endpoint:
389+
1. In the Gremlin shell, run the following commands to connect to the Gremlin endpoint:
390390
391-
```bash
392-
:remote connect tinkerpop.server conf/remote-localcompute.yaml
393-
:remote console
394-
:> g.V()
395-
:> g.addV('person1').property(id, '1').property('name', 'somename1')
396-
:> g.addV('person2').property(id, '2').property('name', 'somename2')
397-
:> g.V()
398-
```
391+
```bash
392+
:remote connect tinkerpop.server conf/remote-localcompute.yaml
393+
:remote console
394+
:> g.V()
395+
:> g.addV('person1').property(id, '1').property('name', 'somename1')
396+
:> g.addV('person2').property(id, '2').property('name', 'somename2')
397+
:> g.V()
398+
```
399399
400400
## Next steps
401401

0 commit comments

Comments
 (0)