Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support bucket typed bucket for MapReduce 2i input #231

Conversation

Projects
None yet
3 participants
@holidayworking
Copy link
Contributor

commented May 24, 2015

This pull request add support bucket typed bucket for MapReduce Secondary indexes input.

require 'riak'
require 'active_support/time'

client = Riak::Client.new(pb_port: 17017)

bucket = client.bucket_type('yokozuna').bucket('my_bucket')

map_reduce = Riak::MapReduce.new(client)
map_reduce.index(bucket, 'time_int', Time.now.utc.beginning_of_day.to_i..Time.now.utc.end_of_day.to_i)
=> #<Riak::MapReduce:0x007f89e43246a8
 @client=#<Riak::Client [#<Node 127.0.0.1:17017>]>,
 @inputs={:bucket=>["yokozuna", "my_bucket"], :index=>"time_int", :start=>1432425600, :end=>1432511999},
 @query=[]>
map_reduce.map('function(value) { return [1]; }').reduce('Riak.reduceSum', keep: true).run
=> [103]
@holidayworking

This comment has been minimized.

Copy link
Contributor Author

commented Jun 1, 2015

I was wondering if you had chance to look at this pull request. Please let me know if you have any questions or concerns.

@bkerley

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2015

+1 6f47d1b

Looks good at first read, going to run the tests.

borshop added a commit that referenced this pull request Jun 3, 2015

Merge pull request #231 from holidayworking/add_support_bucket_typed_…
…bucket_for_mr_2i_input

add support bucket typed bucket for MapReduce 2i input

Reviewed-by: bkerley
@borshop

This comment has been minimized.

Copy link
Contributor

commented on 6f47d1b Jun 3, 2015

saw approval from bkerley
at holidayworking@6f47d1b

This comment has been minimized.

Copy link
Contributor

replied Jun 3, 2015

merging holidayworking/riak-ruby-client/add_support_bucket_typed_bucket_for_mr_2i_input = 6f47d1b into borshop-integration-231-add_support_bucket_typed_bucket_for_mr_2i_input

This comment has been minimized.

Copy link
Contributor

replied Jun 3, 2015

holidayworking/riak-ruby-client/add_support_bucket_typed_bucket_for_mr_2i_input = 6f47d1b merged ok, testing candidate = caabec9

This comment has been minimized.

Copy link
Contributor

replied Jun 3, 2015

This comment has been minimized.

Copy link
Contributor

replied Jun 3, 2015

fast-forwarding master to borshop-integration-231-add_support_bucket_typed_bucket_for_mr_2i_input = caabec9

@bkerley

This comment has been minimized.

Copy link
Contributor

commented Jun 3, 2015

@borshop merge

@borshop borshop merged commit 6f47d1b into basho:master Jun 3, 2015

1 check passed

default all tests passed
Details

@holidayworking holidayworking deleted the holidayworking:add_support_bucket_typed_bucket_for_mr_2i_input branch Jun 3, 2015

@holidayworking

This comment has been minimized.

Copy link
Contributor Author

commented Jun 3, 2015

@bkerley thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.