Showing posts with label Riak. Show all posts
Showing posts with label Riak. Show all posts

Wednesday, December 31, 2014

Enabling riak-control web interface

Riak docs about riak-control is not up-to-date as riak 2.0(But it is very helpful.)
http://docs.basho.com/riak/latest/ops/advanced/riak-control/

These are the steps to enable your riak-control interface

1)Needed ssl cert and key file.

I generated self signed ssl cert and key.(As per ref provided in riak_control docs)

http://www.akadia.com/services/ssh_test_certificate.html

#openssl genrsa -des3 -out server.key 1024

#openssl req -new -key server.key -out server.csr

#cp server.key server.key.org

#openssl rsa -in server.key.org -out server.key

#openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

2)Copy this server.key and server.crt into

#cp server.key /etc/riak/.

#cp server.crt /etc/riak/.

3)In /etc/riak/riak.conf file.Do following changes

Enable following lines(Use your ip address)

ssl.certfile = /etc/riak/server.crt

ssl.keyfile = /etc/riak/server.key

## listener.https.internal = 127.0.0.1:8098
listener.https.internal = 10.20.2.180:8069


riak_control = on

4)Restart riak

#service riak restart

5)Try to access https://<ip that is in configuration>:8069

You will see the complete list

Try to open https://<ip i.e. in configuration>:8069/admin

You will see the output interface like this



Thursday, November 13, 2014

Benchmarking of Riak (With custom data)

For benchmarking of Riak(NoSQL) i used YCSB instead of basho bench.

Reason is with YCSB we can also benchmark other NoSQL.

Testing steps/documentation can be find here.

https://gist.github.com/metadave/3342251


---


YCSB inserted data as per defined (1 KB) to store customized data.So,it is needed to  apply following changes.

In riak/src/main/java/com/yahoo/ycsb/db/RiakClient13.java

inside public int insert(.....) function

byte[] rawValue = jsonToBytes(values);

Replacing this line with

String data="<your data>";
byte[] rawValue=data.getBytes();

After that run
#mvn clean package


And if you wanted to insert this data only then run the benchmark with

./bin/ycsb load riak-1.3 -P workloads/workloada -p columnfamily=family

-p is used to set parameter

Ref- https://github.com/brianfrankcooper/YCSB/wiki/Running-a-Workload