Skip to content

Instantly share code, notes, and snippets.

@farshidce
Created January 17, 2013 21:33
Show Gist options
  • Select an option

  • Save farshidce/4559982 to your computer and use it in GitHub Desktop.

Select an option

Save farshidce/4559982 to your computer and use it in GitHub Desktop.
shelling.py
import os
import sys
sys.path.append(".")
sys.path.append("lib")
import uuid
from memcached.helper.data_helper import VBucketAwareMemcached
from membase.api.rest_client import RestConnection
server = {"ip":"10.6.2.37","port":8091,"username":"Administrator","password":"password"}
mc = VBucketAwareMemcached(RestConnection(server), 'default')
keys_count = 1000
keys = ["%s" % (str(uuid.uuid4())) for i in range(0,keys_count)]
for k in keys:
mc.set(k,0,0,k)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment