60
60
61
61
.. code-block:: sh
62
62
63
- db.runCommand({ createStore: <store-name>, provider: <storage-provider>, clusterName: <cluster-name>, projectId: <project-id> })
63
+ db.runCommand({ createStore: <store-name>, provider: <storage-provider>, clusterName: <cluster-name>, projectId: <project-id>, readPreference: {mode: <read-preference-mode>, tagSets: [[{name: <name>, value: <value>},...],...], maxStalenessSeconds: <number-of-seconds>} })
64
64
65
65
.. tab:: HTTP Configuration
66
66
:tabid: http
@@ -76,7 +76,7 @@ Parameters
76
76
77
77
.. list-table::
78
78
:header-rows: 1
79
- :widths: 10 10 70 10
79
+ :widths: 27 10 53 10
80
80
81
81
* - Parameter
82
82
- Type
@@ -107,33 +107,34 @@ Parameters
107
107
:tabid: s3
108
108
109
109
.. list-table::
110
- :widths: 10 10 70 10
110
+ :widths: 27 10 53 10
111
111
112
112
* - ``region``
113
113
- string
114
- - Region in which the ``bucket`` is hosted. For a list of valid
115
- region names, see :atlas:`Amazon Web
114
+ - Region in which the ``bucket`` is hosted. For a list of
115
+ valid region names, see :atlas:`Amazon Web
116
116
Services (AWS) </reference/amazon-aws/#amazon-aws>`.
117
117
- yes
118
118
119
119
* - ``bucket``
120
120
- string
121
- - Name of the bucket in which data is stored. Must exactly match the
122
- name of an |s3| bucket which {+data-lake-short+} can access given
123
- the configured |aws| |iam| credentials.
121
+ - Name of the bucket in which data is stored. Must exactly
122
+ match the name of an |s3| bucket which {+data-lake-short+}
123
+ can access given the configured |aws| |iam| credentials.
124
124
- yes
125
125
126
126
* - ``additionalStorageClasses``
127
127
- array of strings
128
128
- Array of |aws| |s3| `storage classes
129
- <https://aws.amazon.com/s3/storage-classes/>`__. {+adl+} will
130
- include the files in these storage classes in the query results.
131
- Valid values are:
129
+ <https://aws.amazon.com/s3/storage-classes/>`__. {+adl+}
130
+ will include the files in these storage classes in the
131
+ query results. Valid values are:
132
132
133
- - ``INTELLIGENT_TIERING`` to include files in the `Intelligent
134
- Tiering <https://aws.amazon.com/s3/storage-classes/#Unknown_or_changing_access>`__
133
+ - ``INTELLIGENT_TIERING`` to include files in the
134
+ `Intelligent Tiering <https://aws.amazon.com/s3/storage-classes/#Unknown_or_changing_access>`__
135
135
storage class.
136
- - ``STANDARD_IA`` to include files in the `Standard-Infrequent Access
136
+ - ``STANDARD_IA`` to include files in the
137
+ `Standard-Infrequent Access
137
138
<https://aws.amazon.com/s3/storage-classes/#Infrequent_access>`__
138
139
storage class.
139
140
@@ -147,20 +148,21 @@ Parameters
147
148
148
149
* - ``delimiter``
149
150
- string
150
- - Character used to separate path segments in the {+data-lake-store+}.
151
- If ommitted, defaults to ``"/"``.
151
+ - Character used to separate path segments in the
152
+ {+data-lake-store+}. If ommitted, defaults to ``"/"``.
152
153
- no
153
154
154
155
* - ``prefix``
155
156
- string
156
- - Value prepended to the ``path``. If ommitted, defaults to ``""``.
157
+ - Value prepended to the ``path``. If ommitted, defaults to
158
+ ``""``.
157
159
- no
158
160
159
161
.. tab:: Atlas Configuration
160
162
:tabid: atlas
161
163
162
164
.. list-table::
163
- :widths: 10 10 70 10
165
+ :widths: 27 10 53 10
164
166
165
167
* - ``clusterName``
166
168
- string
@@ -169,15 +171,51 @@ Parameters
169
171
170
172
* - ``projectId``
171
173
- string
172
- - Unique identifier of the project that contains the |service|
173
- cluster.
174
+ - Unique identifier of the project that contains the
175
+ |service| cluster.
174
176
- yes
175
177
178
+ * - ``readPreference``
179
+ - document
180
+ - Cluster :manual:`read preference
181
+ </core/read-preference/>`, which describes how to route
182
+ read requests to the cluster.
183
+ - no
184
+
185
+ * - ``readPreference.mode``
186
+ - string
187
+ - :manual:`Read preference mode
188
+ </core/read-preference/#read-preference-modes>` that
189
+ specifies which replica set member to route the read
190
+ requests to. Value can be one of the following:
191
+
192
+ .. include:: /includes/fact-read-preference-modes.rst
193
+ - no
194
+
195
+ * - ``readPreference.tagSets``
196
+ - array of strings
197
+ - Arrays of :manual:`tag sets </core/read-preference-tags/>`
198
+ or tag specification documents that contain name and value
199
+ pairs for the replica set member. If specified, {+adl+}
200
+ routes read requests to replica set member or members that
201
+ are associated with the specified tags. To learn more, see
202
+ :manual:`Read Preference Tag Sets
203
+ </manual/core/read-preference-tags/>`.
204
+ - no
205
+
206
+ * - ``readPreference.maxStalenessSeconds``
207
+ - int
208
+ - Maximum replication lag, or “staleness”, for reads from
209
+ secondaries. To learn more about ``maxStalenessSeconds``,
210
+ see :manual:`Read Preference maxStalenessSeconds
211
+ </core/read-preference-staleness/>`.
212
+ - no
213
+
176
214
.. tab:: HTTP Configuration
177
215
:tabid: http
178
216
179
217
.. list-table::
180
- :widths: 10 10 70 10
218
+ :widths: 27 10 53 10
181
219
182
220
* - ``allowInsecure``
183
221
- boolean
@@ -187,18 +225,19 @@ Parameters
187
225
* - ``urls``
188
226
- array of strings or an empty array
189
227
- One or more publicly accessible |url|\s. You
190
- can't specify |url|\s that require authentication. If empty or omitted, the :ref:`storageGenerateConfig
191
- <datalake-storagegenconfig>` command will not generate any virtual
192
- {+adl+} databases or collections that reference the
193
- {+data-lake-store+}.
228
+ can't specify |url|\s that require authentication. If
229
+ empty or omitted, the :ref:`storageGenerateConfig
230
+ <datalake-storagegenconfig>` command will not generate any
231
+ virtual {+adl+} databases or collections that reference
232
+ the {+data-lake-store+}.
194
233
- no
195
234
196
235
* - ``defaultFormat``
197
236
- string
198
237
- .. include:: /includes/extracts/cli-param-default-format.rst
199
238
200
- If included, the specified format only applies to the |url|\s in
201
- the store.
239
+ If included, the specified format only applies to the
240
+ |url|\s in the store.
202
241
- no
203
242
204
243
.. _dl-create-store-cmd-output:
@@ -243,7 +282,12 @@ fails, see :ref:`dl-create-store-cmd-errors` for recommended solutions.
243
282
"name" : "<store-name>",
244
283
"provider" : "<storage-provider>",
245
284
"clusterName" : "<cluster-name>",
246
- "projectId" : "<project-id>"
285
+ "projectId" : "<project-id>",
286
+ "readPreference" : {
287
+ "mode" : "<read-preference-mode>",
288
+ "tagSets" : [[{"name": "<name>", "value": "<value>"},...],...],
289
+ "maxStalenessSeconds" : <number-of-seconds>
290
+ }
247
291
}
248
292
}
249
293
@@ -312,7 +356,7 @@ The following example uses the ``createStore`` command to create a new
312
356
.. code-block:: json
313
357
314
358
use sample
315
- db.runCommand({ createStore: "myStore", provider: "atlas", clusterName: "myTestCluster", projectId: "<project-id>" })
359
+ db.runCommand({ createStore: "myStore", provider: "atlas", clusterName: "myTestCluster", projectId: "<project-id>", "readPreference": {"mode": "secondary", "tagSets": [[{"name": "provider", "value": "AWS" }, {"name": "region", "value": "US_EAST_1"}]], "maxStalenessSeconds": 120} })
316
360
317
361
The previous command prints the following:
318
362
@@ -325,7 +369,12 @@ The following example uses the ``createStore`` command to create a new
325
369
"name" : "myStore",
326
370
"provider" : "atlas",
327
371
"clusterName" : "myTestCluster",
328
- "projectId" : "<project-id>"
372
+ "projectId" : "<project-id>",
373
+ "readPreference" : {
374
+ "mode" : "secondary",
375
+ "tagSets": [[{"name": "provider", "value": "AWS" }, {"name": "region", "value": "US_EAST_1"}]],
376
+ "maxStalenessSeconds" : 120
377
+ }
329
378
}
330
379
}
331
380
0 commit comments