Skip to content

Commit 386cb63

Browse files
author
Lauren
authored
Merge pull request #2384 from basho/ej/kv/port-changes
Port in changes made to current docs to previous docs
2 parents b51465f + 9633deb commit 386cb63

File tree

52 files changed

+1059
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1059
-81
lines changed

content/riak/kv/2.0.0/developing/api/protocol-buffers/dt-fetch.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Parameter | Description
6868
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
6969
`sloppy_quorum` | If this parameter is set to `true`, the next available node in the ring will accept requests if any primary node is unavailable
7070
`n_val` | The number of nodes to which the delete request will be sent
71-
`include_context` | If `return_body` is set to `true`, the Data Type's opaque "context" will be returned to the client when the `DtUpdateResp` is sent to the client.
71+
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client
7272

7373
## Response
7474

@@ -124,4 +124,3 @@ message MapEntry {
124124
repeated MapEntry map_value = 6;
125125
}
126126
```
127-

content/riak/kv/2.0.0/developing/api/protocol-buffers/yz-schema-put.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ message RpbYokozunaSchema {
3535
```
3636

3737
This message *must* include both the schema `name` and its Solr [search schema](/riak/kv/2.0.0/developing/usage/search-schemas) `content` as XML.
38+
39+
## Response
40+
41+
Returns a [RpbPutResp](/riak/kv/2.0.0/developing/api/protocol-buffers/#message-codes) code with no data on success.

content/riak/kv/2.0.0/developing/getting-started/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
3131
<dependency>
3232
<groupId>com.basho.riak</groupId>
3333
<artifactId>riak-client</artifactId>
34-
<version>2.0.0</version>
34+
<version>2.1.1</version>
3535
</dependency
3636
</dependencies>
3737
```

content/riak/kv/2.0.0/developing/getting-started/java/crud-operations.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ StoreValue storeOp = new StoreValue.Builder(quoteObject)
3030
.build();
3131
```
3232

33-
In line 76 we use our `client` object to execute the storage operation:
33+
We then use our `client` object to execute the storage operation:
3434

3535
```java
3636
StoreValue.Response response = client.execute(storeOp);
@@ -53,6 +53,24 @@ If the values are equal, as they should be, the Java client will say
5353
`Success! The object we created and the object we fetched have the same
5454
value`. If not, then the client will throw an exception.
5555

56+
## Updating Objects
57+
58+
Once we've read the object back in from Riak, we can update the object
59+
and store it back as we did before with the `StoreValue` object:
60+
61+
```java
62+
fetchedObject.setValue(BinaryValue.create("You can be my wingman any time."));
63+
StoreValue updateOp = new StoreValue.Builder(fetchedObject)
64+
.withLocation(quoteObjectLocation)
65+
.build();
66+
StoreValue.Response updateOpResp = client.execute(updateOp);
67+
```
68+
69+
For more in depth information on updating objects and sibling resolution in
70+
Riak, see [Updating Objects](/riak/kv/2.0.0/developing/usage/updating-objects/)
71+
and [Conflict Resolution](/riak/kv/2.0.0/developing/usage/conflict-resolution/)
72+
documentation.
73+
5674
## Deleting Objects
5775

5876
Now that we've stored and then fetched the object, we can delete it by
@@ -117,3 +135,49 @@ If we fetch the object (using the same method we showed up above and in
117135
"copiesOwned": 3
118136
}
119137
```
138+
139+
Since we really like Moby Dick, let's buy a couple more copies
140+
and update the POJO.
141+
142+
To update the POJO, we would use `UpdateValue` by
143+
extending a new `BookUpdate` class as follows:
144+
145+
```java
146+
public static class BookUpdate extends UpdateValue.Update<Book> {
147+
private final Book update;
148+
public BookUpdate(Book update){
149+
this.update = update;
150+
}
151+
152+
@Override
153+
public Book apply(Book t) {
154+
if(t == null) {
155+
t = new Book();
156+
}
157+
158+
t.author = update.author;
159+
t.body = update.body;
160+
t.copiesOwned = update.copiesOwned;
161+
t.isbn = update.isbn;
162+
t.title = update.title;
163+
164+
return t;
165+
}
166+
}
167+
```
168+
169+
Then using the `BookUpdate` class with our `mobyDick` object:
170+
171+
```java
172+
mobyDick.copiesOwned = 5;
173+
BookUpdate updatedBook = new BookUpdate(mobyDick);
174+
175+
UpdateValue updateValue = new UpdateValue.Builder(mobyDickLocation)
176+
.withUpdate(updatedBook).build();
177+
UpdateValue.Response response = client.execute(updateValue);
178+
```
179+
180+
For more in depth information on updating objects and sibling resolution in
181+
Riak, see [Updating Objects](/riak/kv/2.0.0/developing/usage/updating-objects/)
182+
and [Conflict Resolution](/riak/kv/2.0.0/developing/usage/conflict-resolution/)
183+
documention.

content/riak/kv/2.0.0/using/cluster-operations/v3-multi-datacenter.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Display this cluster's cluster-id tuple, for use with the
285285
included when passed to `*-block-provider-redirect`.
286286

287287
* Syntax: `riak-repl show-local-cluster-id`
288-
* Example:
288+
* Example:
289289

290290
```bash
291291
riak-repl show-local-cluster-id
@@ -363,8 +363,8 @@ replication bucket hooks with the `riak-repl modes` command.
363363
`modelist` is one or both of `mode_repl12` (Version 2) or `mode_repl13`
364364
(Version 3) separated by spaces (without commas).
365365
366-
* Syntax: `riak-repl modes <modelist>`
367-
* Example:
366+
* Syntax: `riak-repl modes <modelist>`
367+
* Example:
368368
369369
```bash
370370
riak-repl modes mode_repl12 mode_repl13
@@ -378,7 +378,7 @@ replication bucket hooks with the `riak-repl modes` command.
378378
379379
To check the current replication modes:
380380
381-
* Syntax: `riak-repl modes`
381+
* Syntax: `riak-repl modes`
382382
* Example:
383383
384384
```bash
@@ -390,3 +390,32 @@ To check the current replication modes:
390390
```
391391
Current replication modes: [mode_repl12,mode_repl13]
392392
```
393+
394+
## Configurations and Metadata in Replication
395+
396+
Fullsync and Realtime replication replicates data from source clusters to sink clusters,
397+
but some configurations and metadata (such as search indices and bucket properties) will
398+
not be replicated.
399+
400+
Non-replication of certain configurations and metadata supports
401+
heterogenous cluster configurations in Replication, but there operational things you can
402+
do when you want homogeneous cluster configurations.
403+
404+
### Search Indices in Replication
405+
406+
Any search index that is created on a source cluster will _not_ be
407+
created on sink clusters as part of replication.
408+
409+
If you want search indices on a source cluster to be present on the
410+
sink clusters, you should update this data for each
411+
cluster at the same time you would change the source cluster.
412+
413+
### Buckets and Bucket Types in Replication
414+
415+
Buckets and Bucket Type properties on the source cluster
416+
will _not_ be replicated from source clusters to sink clusters.
417+
418+
If you want the properties for Buckets or Bucket Types
419+
present on the source cluster to be propagated to sink clusters
420+
you should update this data for each cluster at the same
421+
time you would change the source cluster.

content/riak/kv/2.0.1/developing/api/protocol-buffers/dt-fetch.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Parameter | Description
6868
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
6969
`sloppy_quorum` | If this parameter is set to `true`, the next available node in the ring will accept requests if any primary node is unavailable
7070
`n_val` | The number of nodes to which the delete request will be sent
71-
`include_context` | If `return_body` is set to `true`, the Data Type's opaque "context" will be returned to the client when the `DtUpdateResp` is sent to the client.
71+
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client
7272

7373
## Response
7474

@@ -124,4 +124,3 @@ message MapEntry {
124124
repeated MapEntry map_value = 6;
125125
}
126126
```
127-

content/riak/kv/2.0.1/developing/api/protocol-buffers/yz-schema-put.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ message RpbYokozunaSchema {
3535
```
3636

3737
This message *must* include both the schema `name` and its Solr [search schema](/riak/kv/2.0.1/developing/usage/search-schemas) `content` as XML.
38+
39+
## Response
40+
41+
Returns a [RpbPutResp](/riak/kv/2.0.1/developing/api/protocol-buffers/#message-codes) code with no data on success.

content/riak/kv/2.0.1/developing/getting-started/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
3131
<dependency>
3232
<groupId>com.basho.riak</groupId>
3333
<artifactId>riak-client</artifactId>
34-
<version>2.0.0</version>
34+
<version>2.1.1</version>
3535
</dependency
3636
</dependencies>
3737
```

content/riak/kv/2.0.1/developing/getting-started/java/crud-operations.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ StoreValue storeOp = new StoreValue.Builder(quoteObject)
3030
.build();
3131
```
3232

33-
In line 76 we use our `client` object to execute the storage operation:
33+
We then use our `client` object to execute the storage operation:
3434

3535
```java
3636
StoreValue.Response response = client.execute(storeOp);
@@ -53,6 +53,24 @@ If the values are equal, as they should be, the Java client will say
5353
`Success! The object we created and the object we fetched have the same
5454
value`. If not, then the client will throw an exception.
5555

56+
## Updating Objects
57+
58+
Once we've read the object back in from Riak, we can update the object
59+
and store it back as we did before with the `StoreValue` object:
60+
61+
```java
62+
fetchedObject.setValue(BinaryValue.create("You can be my wingman any time."));
63+
StoreValue updateOp = new StoreValue.Builder(fetchedObject)
64+
.withLocation(quoteObjectLocation)
65+
.build();
66+
StoreValue.Response updateOpResp = client.execute(updateOp);
67+
```
68+
69+
For more in depth information on updating objects and sibling resolution in
70+
Riak, see [Updating Objects](/riak/kv/2.0.1/developing/usage/updating-objects/)
71+
and [Conflict Resolution](/riak/kv/2.0.1/developing/usage/conflict-resolution/)
72+
documentation.
73+
5674
## Deleting Objects
5775

5876
Now that we've stored and then fetched the object, we can delete it by
@@ -117,3 +135,49 @@ If we fetch the object (using the same method we showed up above and in
117135
"copiesOwned": 3
118136
}
119137
```
138+
139+
Since we really like Moby Dick, let's buy a couple more copies
140+
and update the POJO.
141+
142+
To update the POJO, we would use `UpdateValue` by
143+
extending a new `BookUpdate` class as follows:
144+
145+
```java
146+
public static class BookUpdate extends UpdateValue.Update<Book> {
147+
private final Book update;
148+
public BookUpdate(Book update){
149+
this.update = update;
150+
}
151+
152+
@Override
153+
public Book apply(Book t) {
154+
if(t == null) {
155+
t = new Book();
156+
}
157+
158+
t.author = update.author;
159+
t.body = update.body;
160+
t.copiesOwned = update.copiesOwned;
161+
t.isbn = update.isbn;
162+
t.title = update.title;
163+
164+
return t;
165+
}
166+
}
167+
```
168+
169+
Then using the `BookUpdate` class with our `mobyDick` object:
170+
171+
```java
172+
mobyDick.copiesOwned = 5;
173+
BookUpdate updatedBook = new BookUpdate(mobyDick);
174+
175+
UpdateValue updateValue = new UpdateValue.Builder(mobyDickLocation)
176+
.withUpdate(updatedBook).build();
177+
UpdateValue.Response response = client.execute(updateValue);
178+
```
179+
180+
For more in depth information on updating objects and sibling resolution in
181+
Riak, see [Updating Objects](/riak/kv/2.0.1/developing/usage/updating-objects/)
182+
and [Conflict Resolution](/riak/kv/2.0.1/developing/usage/conflict-resolution/)
183+
documention.

content/riak/kv/2.0.1/using/cluster-operations/v3-multi-datacenter.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ Display this cluster's cluster-id tuple, for use with the
285285
included when passed to `*-block-provider-redirect`.
286286

287287
* Syntax: `riak-repl show-local-cluster-id`
288-
* Example:
288+
* Example:
289289

290290
```bash
291291
riak-repl show-local-cluster-id
@@ -363,8 +363,8 @@ replication bucket hooks with the `riak-repl modes` command.
363363
`modelist` is one or both of `mode_repl12` (Version 2) or `mode_repl13`
364364
(Version 3) separated by spaces (without commas).
365365
366-
* Syntax: `riak-repl modes <modelist>`
367-
* Example:
366+
* Syntax: `riak-repl modes <modelist>`
367+
* Example:
368368
369369
```bash
370370
riak-repl modes mode_repl12 mode_repl13
@@ -378,7 +378,7 @@ replication bucket hooks with the `riak-repl modes` command.
378378
379379
To check the current replication modes:
380380
381-
* Syntax: `riak-repl modes`
381+
* Syntax: `riak-repl modes`
382382
* Example:
383383
384384
```bash
@@ -390,3 +390,32 @@ To check the current replication modes:
390390
```
391391
Current replication modes: [mode_repl12,mode_repl13]
392392
```
393+
394+
## Configurations and Metadata in Replication
395+
396+
Fullsync and Realtime replication replicates data from source clusters to sink clusters,
397+
but some configurations and metadata (such as search indices and bucket properties) will
398+
not be replicated.
399+
400+
Non-replication of certain configurations and metadata supports
401+
heterogenous cluster configurations in Replication, but there operational things you can
402+
do when you want homogeneous cluster configurations.
403+
404+
### Search Indices in Replication
405+
406+
Any search index that is created on a source cluster will _not_ be
407+
created on sink clusters as part of replication.
408+
409+
If you want search indices on a source cluster to be present on the
410+
sink clusters, you should update this data for each
411+
cluster at the same time you would change the source cluster.
412+
413+
### Buckets and Bucket Types in Replication
414+
415+
Buckets and Bucket Type properties on the source cluster
416+
will _not_ be replicated from source clusters to sink clusters.
417+
418+
If you want the properties for Buckets or Bucket Types
419+
present on the source cluster to be propagated to sink clusters
420+
you should update this data for each cluster at the same
421+
time you would change the source cluster.

content/riak/kv/2.0.2/developing/api/protocol-buffers/dt-fetch.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Parameter | Description
6767
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
6868
`sloppy_quorum` | If this parameter is set to `true`, the next available node in the ring will accept requests if any primary node is unavailable
6969
`n_val` | The number of nodes to which the delete request will be sent
70-
`include_context` | If `return_body` is set to `true`, the Data Type's opaque "context" will be returned to the client when the `DtUpdateResp` is sent to the client.
70+
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client
7171

7272
## Response
7373

@@ -123,4 +123,3 @@ message MapEntry {
123123
repeated MapEntry map_value = 6;
124124
}
125125
```
126-

content/riak/kv/2.0.2/developing/api/protocol-buffers/yz-schema-put.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ message RpbYokozunaSchema {
3434
```
3535

3636
This message *must* include both the schema `name` and its Solr [search schema](/riak/kv/2.0.2/developing/usage/search-schemas) `content` as XML.
37+
38+
## Response
39+
40+
Returns a [RpbPutResp](/riak/kv/2.0.2/developing/api/protocol-buffers/#message-codes) code with no data on success.

content/riak/kv/2.0.2/developing/getting-started/java.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
3131
<dependency>
3232
<groupId>com.basho.riak</groupId>
3333
<artifactId>riak-client</artifactId>
34-
<version>2.0.0</version>
34+
<version>2.1.1</version>
3535
</dependency
3636
</dependencies>
3737
```

0 commit comments

Comments
 (0)