Re: 404 Error: Object Not Found

2013-12-13 Thread Hector Castro
Hopefully this one resolves it:

I just setup a single node on Ubuntu 12.04 using Vagrant and attempted
to walk through your steps. In the process, I noticed that you are
issuing the following `curl` command and receiving a 404:

$ curl -v -XPUT http://10.0.2.15:8098/sessions/GA123D971 -H
"content-type: application/json" -d '{"username": "Ari", "token":
"20131122-GA123D971-1210"}'

The path for storing a key named "GA123D971" in a bucket named
"sessions" should be:

$ curl -v -XPUT http://10.0.2.15:8098/buckets/sessions/keys/GA123D971
-H "content-type: application/json" -d '{"username": "Ari", "token":
"20131122-GA123D971-1210"}'

The response for this request should contain a HTTP 204 No Content.

--
Hector


On Wed, Dec 11, 2013 at 6:49 PM, Ari King  wrote:
>> Can you please try running the following command from within the dev
>> directory:
>>
>> $ ./dev1/bin/riak ping
>>
>> When I run it locally using your exact configs (downloaded from
>> pastebin), I see:
>>
>> $ ./dev1/bin/riak ping
>> Node 'dev1@127.0.0.1\r' not responding to pings.
>>
>> (Note the \r)
>>
>> If I start dev2 (using the config populated by Riak's `make devrel
>> DEVNODES=2` command), I get:
>>
>> $ ./dev2/bin/riak ping
>> Node 'dev2@127.0.0.1' not responding to pings.
>>
>> Can you please ensure that all carriage returns are removed from your
>> Riak configuration files?
>>
>
> Hector,
>
> Apologies for the delayed response. I've been traveling internationally over
> the last ten days and in my haste thought I had sent the reply, when I
> actually had only written the response.
>
> I do not have any carriage returns in my actual config file, I believe that
> was added when pasting to pastebin. When I run "./dev1/bin/riak ping" I get
> "pong". However, I'm running riak on ubuntu 12.10 on vagrant. And I have to
> start riak with "sudo" otherwise while it does start up, it does not bind to
> the configured ports.
>
> Thanks.
>
> -Ari

___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


[ANN] Riak Community Hangout #4 - Fun with Java and C clients

2013-12-13 Thread Seth Thomas
Starting a little late today but join as at 2:15 EST for a community
hangout talking about work on our C and Java clients.

https://plus.google.com/events/cta9dsp6qa4cl1hht03a3q0oohk
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: [ANN] Riak Community Hangout #4 - Fun with Java and C clients

2013-12-13 Thread Seth Thomas
Due to technical difficulties, which seems to be a recurring theme, we've
had to change the link:

https://plus.google.com/u/1/b/100975210954087930578/events/ctv6lgms873seh3vv0e59nj311o


On Fri, Dec 13, 2013 at 1:07 PM, Seth Thomas  wrote:

> Starting a little late today but join as at 2:15 EST for a community
> hangout talking about work on our C and Java clients.
>
> https://plus.google.com/events/cta9dsp6qa4cl1hht03a3q0oohk
>
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Mapreduce zero out counters

2013-12-13 Thread Bryce Verdier

Hey all,

Is there a way to use the mapreduce (with erlang code), to zero out all 
the counters within a bucket?

Thanks in advance,

Bryce


___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Mapreduce zero out counters

2013-12-13 Thread Sam Elliott
Bryce, 

You have two options.

The first is just to delete the keys. As long as they are deleted at every 
replica and there are no concurrent increments, then no counters will make a 
return and change what you're counting. Counters are initialised to zero. 

The other option is to decrement/increment the counter back to zero. Here's 
some code that should do so (using the 1.4 counters API) [1]. Please test it 
out before running it in production. This of course keeps updates around, and 
will also be affected by concurrent updates (the zeroing will decrement by 
however much it observes the counter to be). The code provided won't work with 
2.0, but i can talk you through re-writing it.

Sam

[1] https://gist.github.com/lenary/334978ac1df0c21c4cc2 

-- 
Sam Elliott
Engineer
sam.elli...@basho.com
--


On Friday, 13 December 2013 at 4:45PM, Bryce Verdier wrote:

> Hey all,
> 
> Is there a way to use the mapreduce (with erlang code), to zero out all 
> the counters within a bucket?
> Thanks in advance,
> 
> Bryce
> 
> 
> ___
> riak-users mailing list
> riak-users@lists.basho.com (mailto:riak-users@lists.basho.com)
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Mapreduce zero out counters

2013-12-13 Thread Bryce Verdier
Thank you for the response Sam. I'll just delete the keys, that seems 
like an easier way to go.


Bryce

On 12/13/2013 03:26 PM, Sam Elliott wrote:

Bryce,

You have two options.

The first is just to delete the keys. As long as they are deleted at every 
replica and there are no concurrent increments, then no counters will make a 
return and change what you're counting. Counters are initialised to zero.

The other option is to decrement/increment the counter back to zero. Here's 
some code that should do so (using the 1.4 counters API) [1]. Please test it 
out before running it in production. This of course keeps updates around, and 
will also be affected by concurrent updates (the zeroing will decrement by 
however much it observes the counter to be). The code provided won't work with 
2.0, but i can talk you through re-writing it.

Sam

[1] https://gist.github.com/lenary/334978ac1df0c21c4cc2




___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com