Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port in changes made to current docs to previous docs #2384

Merged
merged 4 commits into from
Jan 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Parameter | Description
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
`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
`n_val` | The number of nodes to which the delete request will be sent
`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.
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client

## Response

Expand Down Expand Up @@ -124,4 +124,3 @@ message MapEntry {
repeated MapEntry map_value = 6;
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ message RpbYokozunaSchema {
```

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.

## Response

Returns a [RpbPutResp](/riak/kv/2.0.0/developing/api/protocol-buffers/#message-codes) code with no data on success.
2 changes: 1 addition & 1 deletion content/riak/kv/2.0.0/developing/getting-started/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
<dependency>
<groupId>com.basho.riak</groupId>
<artifactId>riak-client</artifactId>
<version>2.0.0</version>
<version>2.1.1</version>
</dependency
</dependencies>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ StoreValue storeOp = new StoreValue.Builder(quoteObject)
.build();
```

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

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

## Updating Objects

Once we've read the object back in from Riak, we can update the object
and store it back as we did before with the `StoreValue` object:

```java
fetchedObject.setValue(BinaryValue.create("You can be my wingman any time."));
StoreValue updateOp = new StoreValue.Builder(fetchedObject)
.withLocation(quoteObjectLocation)
.build();
StoreValue.Response updateOpResp = client.execute(updateOp);
```

For more in depth information on updating objects and sibling resolution in
Riak, see [Updating Objects](/riak/kv/2.0.0/developing/usage/updating-objects/)
and [Conflict Resolution](/riak/kv/2.0.0/developing/usage/conflict-resolution/)
documentation.

## Deleting Objects

Now that we've stored and then fetched the object, we can delete it by
Expand Down Expand Up @@ -117,3 +135,49 @@ If we fetch the object (using the same method we showed up above and in
"copiesOwned": 3
}
```

Since we really like Moby Dick, let's buy a couple more copies
and update the POJO.

To update the POJO, we would use `UpdateValue` by
extending a new `BookUpdate` class as follows:

```java
public static class BookUpdate extends UpdateValue.Update<Book> {
private final Book update;
public BookUpdate(Book update){
this.update = update;
}

@Override
public Book apply(Book t) {
if(t == null) {
t = new Book();
}

t.author = update.author;
t.body = update.body;
t.copiesOwned = update.copiesOwned;
t.isbn = update.isbn;
t.title = update.title;

return t;
}
}
```

Then using the `BookUpdate` class with our `mobyDick` object:

```java
mobyDick.copiesOwned = 5;
BookUpdate updatedBook = new BookUpdate(mobyDick);

UpdateValue updateValue = new UpdateValue.Builder(mobyDickLocation)
.withUpdate(updatedBook).build();
UpdateValue.Response response = client.execute(updateValue);
```

For more in depth information on updating objects and sibling resolution in
Riak, see [Updating Objects](/riak/kv/2.0.0/developing/usage/updating-objects/)
and [Conflict Resolution](/riak/kv/2.0.0/developing/usage/conflict-resolution/)
documention.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Display this cluster's cluster-id tuple, for use with the
included when passed to `*-block-provider-redirect`.

* Syntax: `riak-repl show-local-cluster-id`
* Example:
* Example:

```bash
riak-repl show-local-cluster-id
Expand Down Expand Up @@ -363,8 +363,8 @@ replication bucket hooks with the `riak-repl modes` command.
`modelist` is one or both of `mode_repl12` (Version 2) or `mode_repl13`
(Version 3) separated by spaces (without commas).

* Syntax: `riak-repl modes <modelist>`
* Example:
* Syntax: `riak-repl modes <modelist>`
* Example:

```bash
riak-repl modes mode_repl12 mode_repl13
Expand All @@ -378,7 +378,7 @@ replication bucket hooks with the `riak-repl modes` command.

To check the current replication modes:

* Syntax: `riak-repl modes`
* Syntax: `riak-repl modes`
* Example:

```bash
Expand All @@ -390,3 +390,32 @@ To check the current replication modes:
```
Current replication modes: [mode_repl12,mode_repl13]
```

## Configurations and Metadata in Replication

Fullsync and Realtime replication replicates data from source clusters to sink clusters,
but some configurations and metadata (such as search indices and bucket properties) will
not be replicated.

Non-replication of certain configurations and metadata supports
heterogenous cluster configurations in Replication, but there operational things you can
do when you want homogeneous cluster configurations.

### Search Indices in Replication

Any search index that is created on a source cluster will _not_ be
created on sink clusters as part of replication.

If you want search indices on a source cluster to be present on the
sink clusters, you should update this data for each
cluster at the same time you would change the source cluster.

### Buckets and Bucket Types in Replication

Buckets and Bucket Type properties on the source cluster
will _not_ be replicated from source clusters to sink clusters.

If you want the properties for Buckets or Bucket Types
present on the source cluster to be propagated to sink clusters
you should update this data for each cluster at the same
time you would change the source cluster.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Parameter | Description
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
`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
`n_val` | The number of nodes to which the delete request will be sent
`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.
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client

## Response

Expand Down Expand Up @@ -124,4 +124,3 @@ message MapEntry {
repeated MapEntry map_value = 6;
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ message RpbYokozunaSchema {
```

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.

## Response

Returns a [RpbPutResp](/riak/kv/2.0.1/developing/api/protocol-buffers/#message-codes) code with no data on success.
2 changes: 1 addition & 1 deletion content/riak/kv/2.0.1/developing/getting-started/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
<dependency>
<groupId>com.basho.riak</groupId>
<artifactId>riak-client</artifactId>
<version>2.0.0</version>
<version>2.1.1</version>
</dependency
</dependencies>
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ StoreValue storeOp = new StoreValue.Builder(quoteObject)
.build();
```

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

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

## Updating Objects

Once we've read the object back in from Riak, we can update the object
and store it back as we did before with the `StoreValue` object:

```java
fetchedObject.setValue(BinaryValue.create("You can be my wingman any time."));
StoreValue updateOp = new StoreValue.Builder(fetchedObject)
.withLocation(quoteObjectLocation)
.build();
StoreValue.Response updateOpResp = client.execute(updateOp);
```

For more in depth information on updating objects and sibling resolution in
Riak, see [Updating Objects](/riak/kv/2.0.1/developing/usage/updating-objects/)
and [Conflict Resolution](/riak/kv/2.0.1/developing/usage/conflict-resolution/)
documentation.

## Deleting Objects

Now that we've stored and then fetched the object, we can delete it by
Expand Down Expand Up @@ -117,3 +135,49 @@ If we fetch the object (using the same method we showed up above and in
"copiesOwned": 3
}
```

Since we really like Moby Dick, let's buy a couple more copies
and update the POJO.

To update the POJO, we would use `UpdateValue` by
extending a new `BookUpdate` class as follows:

```java
public static class BookUpdate extends UpdateValue.Update<Book> {
private final Book update;
public BookUpdate(Book update){
this.update = update;
}

@Override
public Book apply(Book t) {
if(t == null) {
t = new Book();
}

t.author = update.author;
t.body = update.body;
t.copiesOwned = update.copiesOwned;
t.isbn = update.isbn;
t.title = update.title;

return t;
}
}
```

Then using the `BookUpdate` class with our `mobyDick` object:

```java
mobyDick.copiesOwned = 5;
BookUpdate updatedBook = new BookUpdate(mobyDick);

UpdateValue updateValue = new UpdateValue.Builder(mobyDickLocation)
.withUpdate(updatedBook).build();
UpdateValue.Response response = client.execute(updateValue);
```

For more in depth information on updating objects and sibling resolution in
Riak, see [Updating Objects](/riak/kv/2.0.1/developing/usage/updating-objects/)
and [Conflict Resolution](/riak/kv/2.0.1/developing/usage/conflict-resolution/)
documention.
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ Display this cluster's cluster-id tuple, for use with the
included when passed to `*-block-provider-redirect`.

* Syntax: `riak-repl show-local-cluster-id`
* Example:
* Example:

```bash
riak-repl show-local-cluster-id
Expand Down Expand Up @@ -363,8 +363,8 @@ replication bucket hooks with the `riak-repl modes` command.
`modelist` is one or both of `mode_repl12` (Version 2) or `mode_repl13`
(Version 3) separated by spaces (without commas).

* Syntax: `riak-repl modes <modelist>`
* Example:
* Syntax: `riak-repl modes <modelist>`
* Example:

```bash
riak-repl modes mode_repl12 mode_repl13
Expand All @@ -378,7 +378,7 @@ replication bucket hooks with the `riak-repl modes` command.

To check the current replication modes:

* Syntax: `riak-repl modes`
* Syntax: `riak-repl modes`
* Example:

```bash
Expand All @@ -390,3 +390,32 @@ To check the current replication modes:
```
Current replication modes: [mode_repl12,mode_repl13]
```

## Configurations and Metadata in Replication

Fullsync and Realtime replication replicates data from source clusters to sink clusters,
but some configurations and metadata (such as search indices and bucket properties) will
not be replicated.

Non-replication of certain configurations and metadata supports
heterogenous cluster configurations in Replication, but there operational things you can
do when you want homogeneous cluster configurations.

### Search Indices in Replication

Any search index that is created on a source cluster will _not_ be
created on sink clusters as part of replication.

If you want search indices on a source cluster to be present on the
sink clusters, you should update this data for each
cluster at the same time you would change the source cluster.

### Buckets and Bucket Types in Replication

Buckets and Bucket Type properties on the source cluster
will _not_ be replicated from source clusters to sink clusters.

If you want the properties for Buckets or Bucket Types
present on the source cluster to be propagated to sink clusters
you should update this data for each cluster at the same
time you would change the source cluster.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Parameter | Description
`timeout` | The timeout duration, in milliseconds, after which Riak will return an error message
`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
`n_val` | The number of nodes to which the delete request will be sent
`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.
`include_context` | If this parameter is set to `true`, the Data Type's opaque "context" will be returned to the client

## Response

Expand Down Expand Up @@ -123,4 +123,3 @@ message MapEntry {
repeated MapEntry map_value = 6;
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ message RpbYokozunaSchema {
```

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.

## Response

Returns a [RpbPutResp](/riak/kv/2.0.2/developing/api/protocol-buffers/#message-codes) code with no data on success.
2 changes: 1 addition & 1 deletion content/riak/kv/2.0.2/developing/getting-started/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ project's dependencies. Here is a Maven example:
<dependency>
<groupId>com.basho.riak</groupId>
<artifactId>riak-client</artifactId>
<version>2.0.0</version>
<version>2.1.1</version>
</dependency
</dependencies>
```
Expand Down
Loading