Created
December 19, 2013 16:59
-
-
Save scalone/8042574 to your computer and use it in GitHub Desktop.
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
# encoding: UTF-8 | |
require "rubygems" | |
require 'riak' | |
require "ripple" | |
require "turn" | |
require "json" | |
require "rake" | |
include Rake::DSL | |
IP = "127.0.0.1" | |
PORT = 8087 | |
ACRONYM = "bc1" | |
LICENSE_KEY = "license_*: No such file or directory" | |
desc "create object" | |
task :create_object do | |
@client = Riak::Client.new(pb_port: PORT, protocol: "pbc" , host: IP) | |
bucket = @client.bucket(bucket) | |
object = Riak::RObject.new(bucket, key) | |
object.content_type = content_type | |
object.data = "" | |
object.store | |
end | |
desc "get asset" | |
task :get_asset do | |
@client = Riak::Client.new(pb_port: PORT, protocol: "pbc" , host: IP) | |
results = Riak::MapReduce.new(@client).add("assets", "pp1_112233_params.dat").map(["walk", "get_asset"], keep: true, arg: ["123-123-123", "1.0", "112233_params.dat", "D4C6", "", "112233", "xpto.posxml"]).run | |
p results | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment