This file contains hidden or 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
no_email_count = 0 | |
puts "email,full_name" | |
Developer.bucket.get_index('$bucket', '_').each do |devid| | |
u = Developer.find(devid).identity | |
if !u.mobile_number | |
puts u.email + "," + u.full_name | |
no_email_count+=1 | |
end |
This file contains hidden or 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
# Static files | |
get '/:file.:ext' do | |
case :ext | |
when "css" | |
content_type 'text/css' | |
when "js" | |
content_type 'text/javascript' | |
when "html" | |
content_type 'text/html' |
This file contains hidden or 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
############## test_example.rb # Changed 5.times to 1.times and back | |
# start some external clients to add values to the Riak server | |
# 5.times do |t| | |
1.times do |t| | |
pids << fork { | |
`bundle exec rake example:create_data_points ROW=#{t} CLIENT=local#{t}` | |
} | |
end | |
pids.each do |pid| | |
Process.waitpid(pid) |
This file contains hidden or 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
1. What's the best way to declare dependencies for erlang? I would have thought using rebar's transitive dependency management would be the way to go... put external dependencies in rebar.config, run 'rebar get-deps && rebar compile' and you're off to the races. But this thread indicates that this could break apps with shared dependencies. If both apps A and B depend on C, and C hoarks, then both apps A and B die, too. | |
http://stackoverflow.com/questions/11141198/when-to-use-erlang-applicationstart-or-included-applications-and-a-supervisor | |
2. Assuming that this thread was incorrect, and that rebar dependencies are the way to go, I'm having a teensy problem. I was following Dizzy's 2011 presentation (http://vimeo.com/22700527) and thought, sweet, I'll create a sample app and have it depend on ibrowse (very cool app). | |
REPRO: | |
1. make basic app |
This file contains hidden or 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
############### Testing Node install.sh | |
cd | |
sudo apt-get install git make build-essential libncurses5-dev openssl libssl-dev | |
git clone git://github.com/basho/basho_bench.git | |
cd basho_bench | |
cp examples/riakc_pb.config azure_riakc_pb.config | |
cd | |
############### Node 1-N install.sh | |
cd |
This file contains hidden or 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
Steps to Setup riak / erlang on Ubuntu (Azure): | |
# Prerequisites | |
sudo apt-get install git make build-essential libncurses5-dev openssl libssl-dev | |
# Installing Erlang | |
wget http://erlang.org/download/otp_src_R14B03.tar.gz | |
tar zxvf otp_src_R14B03.tar.gz | |
cd otp_src_R14B03 | |
./configure && make && sudo make install |
This file contains hidden or 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
============================= To Clear DB ============================= | |
root@s02:~# ./cqlsh.sh | |
Connected to basho at localhost:9160. | |
[cqlsh 2.2.0 | Cassandra 1.1.1 | CQL spec 2.0.0 | Thrift protocol 19.32.0] | |
Use HELP for help. | |
cqlsh> use DEMO; | |
cqlsh:DEMO> truncate test; | |
cqlsh:DEMO> exit | |
============================= To Run Insert =========================== |
This file contains hidden or 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
root@s01:~/basho_bench# ./basho_bench softlayer_s07_cassandra_test.config | |
INFO: Est. data size: 46.57 GB | |
INFO: Using target s02:9160 for worker 1 | |
INFO: Starting max worker: <0.56.0> | |
=ERROR REPORT==== 13-Jun-2012::16:10:42 === | |
** Generic server <0.57.0> terminating | |
** Last message in was {call,insert, | |
["Keyspace1","2260050", | |
{columnPath,"Standard1",undefined,"col1"}, |
This file contains hidden or 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
Execute the following command and make a note of X-Auth-Token. You will need this token to use in all subsequent commands. | |
curl -v -H 'X-Storage-User: system:root' -H 'X-Storage-Pass: testpass' http://10.80.83.68:8077/auth/v1.0 | |
In the following command examples we are using 'AUTH_tk65840af9f6f74d1aaefac978cb8f0899' as the X-Auth-Token. Replace this with the appropriate token you obtained in the above step. | |
To create a container: | |
curl -X PUT -H 'X-Auth-Token: AUTH_tk65840af9f6f74d1aaefac978cb8f0899' http://10.80.83.68:8077/v1/AUTH_system/mycontainer | |
To list all containers in current account: |
This file contains hidden or 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
root@s01:~/basho_bash_bench/results# ls -al | grep 6-04 | |
drwxr-xr-x 27 root root 4096 2012-06-04 11:08 . | |
drwxr-xr-x 9 root root 4096 2012-06-04 10:58 .. | |
drwxr-xr-x 3 root root 4096 2012-06-04 11:08 cs-2-mb-15-min-1-wr-create | |
root@s01:~/basho_bash_bench/results# cd cs-2-mb-15-min-1-wr-create | |
root@s01:~/basho_bash_bench/results/cs-2-mb-15-min-1-wr-create# ls -al | |
total 28 | |
drwxr-xr-x 3 root root 4096 2012-06-04 11:08 . | |
drwxr-xr-x 27 root root 4096 2012-06-04 11:08 .. | |
drwxr-xr-x 2 root root 4096 2012-06-04 11:08 backup |