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
from __future__ import absolute_import | |
from datetime import datetime, timedelta | |
import riak | |
from django.conf import settings | |
from django.contrib.sessions.backends.base import SessionBase, CreateError | |
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
$ make rel | |
./rebar get-deps | |
==> rel (get-deps) | |
==> riak (get-deps) | |
Pulling cluster_info from {git,"git://github.com/basho/cluster_info", | |
{branch,"master"}} | |
Cloning into cluster_info... | |
Pulling luwak from {git,"git://github.com/basho/luwak",{branch,"master"}} | |
Cloning into luwak... | |
Pulling riak_kv from {git,"git://github.com/basho/riak_kv",{branch,"master"}} |
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
from scribe import scribe | |
from thrift.transport import TTransport, TSocket | |
from thrift.protocol import TBinaryProtocol | |
category='event' | |
message='data goes here' | |
log_entry = scribe.LogEntry(category, message) | |
socket = TSocket.TSocket(host='localhost', port=1464) |
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
port=1464 | |
<store> | |
category=default | |
type=buffer | |
max_write_interval=1 # process messages at least once per second | |
<primary> | |
type=network |
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
$ make | |
make all-recursive | |
Making all in lib | |
GEN alloca.h | |
GEN arg-nonnull.h | |
GEN c++defs.h | |
GEN warn-on-use.h | |
GEN arpa/inet.h | |
GEN byteswap.h | |
GEN fcntl.h |
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
import riak | |
import random | |
r = riak.RiakClient() | |
b = r.bucket("test") | |
# allow_mult | |
b.set_allow_multiples(True) | |
# new obj per run |
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
import sys | |
from IPython.core.debugger import Pdb | |
from IPython.core import ipapi | |
def set_trace(): | |
ip = ipapi.get() | |
def_colors = ip.colors | |
Pdb(def_colors).set_trace(sys._getframe().f_back) |
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
require 'riak' | |
# Create a client interface | |
# client = Riak::Client.new | |
# Create a client interface that uses Excon | |
# client = Riak::Client.new(:http_backend => :Excon) | |
# Create a client that uses Protocol Buffers | |
client = Riak::Client.new(:protocol => "pbc") |
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
import java.io.IOException; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.File; | |
import java.net.URI; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.FileSystem; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IOUtils; |
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
[Thu, 22 Mar 2012 21:12:58 +0000] DEBUG: Loading plugin network | |
[Thu, 22 Mar 2012 21:12:58 +0000] DEBUG: Plugin network threw exception #<LoadError: no such file to load -- ipaddress> /usr/lib/ruby/1.8/ohai/plugins/network.rb:19:in `require' |