-
Plug in phone to USB
-
In command prompt run:
adb forward tcp:5801 tcp:5801 adb forward tcp:5901 tcp:5901 -
Make sure Droid VNC Server is started on the phone
Summary/tl;dr - Riak 1.0.0 has introduced more control over deletion with the delete_mode setting.
If you plan to delete and recreate objects under the same key rapidly, and there is enough disk available to store tombstones, it is safest to set delete_mode to keep.
The default three second delay for removing tombstones balances keeping the tombstone around long enough for any rapid delete/recreates, but unlike the keep mode it does remove the data.
Riak keeps your objects available during failures by storing multiple copies of the data. This redundancy makes deletion more complex than a single node database. For example, Riak needs to ensure deletes issued while nodes are down get applied when the nodes recover, or resolve what happens if the network is partitioned and an object is deleted on one side but updated on the other side.
Deletes in Riak are a two step process, first it writes a tombstone objects to the N replicas and only once all replicas have stored the tombstone are they remove
To install the sample hook,
-
Compile
riak_repl_hook_sample.erlNote on the Erlang Compiler: You must use the Erlang compiler (
erlc) associated with the Riak installation or the version of Erlang used when compiling Riak from source. For packaged Riak installations, you can consult Table 1 below for the default location of Riak’s erlc for each supported platform. If you compiled from source, use the erlc from the Erlang version you used to compile Riak.Distribution Path CentOS & RHEL Linux /usr/lib64/riak/erts-5.9.1/bin/erlc Debian & Ubuntu Linux /usr/lib/riak/erts-5.9.1/bin/erlc
##Using Force Replace to Change a nodes IP address.
###Objective
Previous to Riak 1.2, a cluster node's IP address could be changed by running riak-admin reip on each cluster node. As of Riak 1.2, this method has been replaced with riak-admin cluster force-replace which is safer and does not require any downtime.
###Scenario
Riak is running in a cluster of five nodes.
riak@64.214.83.25onnode1.localdomain(192.168.17.11)(64.214.83.25)riak@64.214.83.26onnode2.localdomain(192.168.17.12)(64.214.83.26)
| Scheds = erlang:system_flag(schedulers_online, 1), | |
| timer:sleep(250), | |
| _ = erlang:system_flag(schedulers_online, Scheds), | |
| erlang:system_info(schedulers_online). |
| package basho; | |
| import com.basho.riak.client.convert.RiakKey; | |
| import java.util.ArrayList; | |
| import java.util.Collection; | |
| import java.util.TreeSet; | |
| import org.codehaus.jackson.annotate.JsonIgnore; | |
| public final class GameLeaderboard | |
| { |
The Riak MDC Quick Start will walk through the process of configuring Riak MDC replication to perform bidirectional replication between two exemplar Riak clusters in separate networks. Bidirectional replication is accomplished by setting up unidirectional replication in both directions between the clusters.
###Scenario Configure Riak MDC to perform bidirectional replication, given the following two (2) three-node Riak EE Clusters:
####Cluster 1
node1172.16.1.11riak@172.16.1.11| name | ip | nodename |
|---|
##Replacing a node with a machine of the same name ###Objective The goal is to replace a Riak instance with a new Riak instance of the same name so that the application environment does not need to have instance-name related changes.
###Scenario
Riak is running in a cluster of five nodes.
riak@node1.localdomainonnode1.localdomain(192.168.17.11)riak@node2.localdomainonnode2.localdomain(192.168.17.12)
| import com.basho.riak.client.IRiakClient; | |
| import com.basho.riak.client.IRiakObject; | |
| import com.basho.riak.client.RiakFactory; | |
| import com.basho.riak.client.bucket.Bucket; | |
| import com.basho.riak.client.builders.RiakObjectBuilder; | |
| public class RiakSandbox { | |
| public static final String BUCKET_NAME = "conditionalPutTest"; | |