- Download and install Riak 2.0 and an appropriate JVM for your machine.
- Download the Erlang
load_data.erl
escript from https://raw.githubusercontent.com/basho/basho_docs/master/source/data/load_data.erl - Download the
goog.csv
test data from https://github.com/basho/basho_docs/raw/master/source/data/goog.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## ------------------------------------------------------------------- | |
## | |
## riak-debug-lite: Gather info from a node for troubleshooting. | |
## | |
## Copyright (c) 2013 Basho Technologies, Inc. All Rights Reserved. | |
## | |
## This file is provided to you under the Apache License, | |
## Version 2.0 (the "License"); you may not use this file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -smp enable -sname convert_binary_ring -mnesia debug verbose | |
main([RingFile, OutFile]) -> | |
try | |
{ok, Binary} = file:read_file(RingFile), | |
Ring = binary_to_term(Binary), | |
try | |
file:write_file(OutFile, io_lib:format("~p.~n", [Ring])), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------- | |
How to ping a ticket | |
--------- | |
There are multiple reasons why we may need to update a ticket without being prompted by a customer response. | |
Examples: | |
Our SLA is based upon responsiveness. If the ticket is Open, we need to provide regular updates whether the customer has responded or not. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compute_Next = fun(Ring1,Ring2) -> | |
Owners1 = riak_core_ring:all_owners(Ring1), | |
Owners2 = riak_core_ring:all_owners(Ring2), | |
Owners3 = lists:zip(Owners1, Owners2), | |
[{Idx, PrevOwner, NewOwner, [], awaiting} | |
|| {{Idx, PrevOwner}, {Idx, NewOwner}} <- Owners3, | |
PrevOwner /= NewOwner] | |
end. | |
N = app_helper:get_env(riak_core,target_n_val,4), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- erlang -*- | |
%%! -smp enable -sname graph_ring -mnesia debug verbose | |
main([RingFile, OutFile]) -> | |
{ok, Binary} = file:read_file(RingFile), | |
Ring = binary_to_term(Binary), | |
OwnerList = element(2,element(4,Ring)), | |
%io:format("~s~n", [lists:flatten(header(body(footer([]),OwnerList)))]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package basho; | |
import java.io.IOException; | |
import com.basho.riak.client.IRiakClient; | |
import com.basho.riak.client.RiakException; | |
import com.basho.riak.client.RiakFactory; | |
import com.basho.riak.client.bucket.Bucket; | |
import com.basho.riak.client.query.StreamingOperation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Build Test Data | |
IRiakObject cat = RiakObjectBuilder.newBuilder("Pets-Template", "Cat"). | |
withValue("{\"sound\":\"Meow\",\"legs\":4}"). | |
build(); | |
rc.store(cat); | |
// Build User Metadata Map | |
Map<String, String> usermeta = new HashMap<String, String>(); | |
usermeta.put("parentLinkBucket", "Pets-Template"); | |
usermeta.put("parentLinkKey", "Cat"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test; | |
import java.io.IOException; | |
import java.util.Date; | |
import com.basho.riak.client.IRiakObject; | |
import com.basho.riak.client.RiakException; | |
import com.basho.riak.client.builders.RiakObjectBuilder; | |
import com.basho.riak.client.http.RiakClient; | |
import com.basho.riak.client.raw.FetchMeta; | |
import com.basho.riak.client.raw.RawClient; |
I hereby claim:
- I am angrycub on github.
- I am angrycub (https://keybase.io/angrycub) on keybase.
- I have a public key whose fingerprint is 3BD6 4697 7657 2ECD 2DB0 942C 3A4D 0719 F2FC 7883
To claim this, I am signing this object: