Re: Upgrade to 1.1.2 problems

2012-04-26 Thread Phil Sorber
Joe,

I think you hit the nail on the head. We install from your released
deb's, but we deploy via chef and have the config generated from a
template. I am going to set up another test this morning and I will
let you know how it goes.

Thanks.

On Wed, Apr 25, 2012 at 7:38 PM, Joseph Blomstedt  wrote:
> Phil,
>
> Given the following lines,
>
>>         {reason,
>>          {{badmatch,{'EXIT',noproc}},
>>           [{riak_core_vnode_proxy,call,2},
>
> I'm inclined to think this is an issue with the new vnode routing
> layer introduced in Riak 1.1. On your Riak 1.1.2 node, make sure your
> app.config does not contain {legacy_vnode_routing, false} in the
> riak_core section. If it does, either delete the line or change it to
> false. If this was the issue, you should set it back to false after
> upgrading the rest of your cluster.
>
> Also, if this turns out to be the issue, could you please let me know
> how you performed the upgrade? Our official packages are supposed to
> be designed so that they retain your old app.config file when
> installed over an existing Riak installation (and thus, this line
> would have been missing from the 1.0.3 config). It would be useful to
> know if you used an official package and the app.config was
> overwritten, or if you manually setup your app.config and simply
> missed this option.
>
> On the plus side, the next release of Riak should include built-in
> capability negotiation that should remove the need for users to have
> to manually deal with legacy, mapred, listkeys, etc settings during an
> upgrade.
>
> -Joe
>
> On Wed, Apr 25, 2012 at 2:05 PM, Phil Sorber  wrote:
>> We have a 4 node riak 1.0.0 cluster running in production that we want
>> to upgrade to 1.1.2. We set up a test environment that closely mimic's
>> the production one. As close as we possibly can with ec2 hosts. First
>> attempt to jump from 1.0.0 -> 1.1.2 failed. We took into account the
>> mapred_system issue and the listkeys_backpressure issue. We decided to
>> try 1.0.0 -> 1.0.3 since that would involve the mapred_system issue
>> only. That upgrade worked. We then tried to upgrade 1.0.3 -> 1.1.2 and
>> had similar problems. Details below.
>>
>> --
>> # riak-admin transfers
>> Attempting to restart script through sudo -u riak
>> 'riak@50.16.31.226' waiting to handoff 14 partitions
>> --
>>
>> Sometimes this would show as many as 48 transfers. Always from the
>> node that we upgraded. It would eventually show no transfers left. The
>> upgrade from 1.0.0 -> 1.0.3 didn't do this.
>>
>> We tested a link walking query that is similar to what we run in
>> production. On 2 of the 3 nodes still running 1.0.3 it worked fine. On
>> the 3rd node, this happened:
>>
>> Curl run on 1.0.3 node:
>>
>> --
>> curl -v http://localhost:8098/riak/email_address/riakupgr...@gmail.com/_,_,1
>> * About to connect() to localhost port 8098 (#0)
>> *   Trying 127.0.0.1... connected
>> * Connected to localhost (127.0.0.1) port 8098 (#0)
>>> GET /riak/email_address/riakupgr...@gmail.com/_,_,1 HTTP/1.1
>>> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k 
>>> zlib/1.2.3.3 libidn/1.15
>>> Host: localhost:8098
>>> Accept: */*
>>>
>> < HTTP/1.1 500 Internal Server Error
>> < Server: MochiWeb/1.1 WebMachine/1.9.0 (someone had painted it blue)
>> < Expires: Wed, 25 Apr 2012 20:55:30 GMT
>> < Date: Wed, 25 Apr 2012 20:45:30 GMT
>> < Content-Type: text/html
>> < Content-Length: 2068
>> <
>> 500 Internal Server
>> ErrorInternal Server ErrorThe server
>> encountered an error while processing this request:{error,
>>  {error,
>>  {badmatch,
>>   {eoi,[],
>>    [{{reduce,0},
>>      {trace,
>>       [error],
>>       {error,
>>        [{module,riak_kv_w_reduce},
>>         {partition,1438665674247607560106752257205091097473808596992},
>>         {details,
>>          [{fitting,
>>            {fitting,<0.848.0>,#Ref<0.0.0.5472>,
>>             #Fun,1}},
>>           {name,{reduce,0}},
>>           {module,riak_kv_w_reduce},
>>           {arg,{rct,#Fun,none}},
>>           {output,
>>            {fitting,<0.847.0>,#Ref<0.0.0.5472>,
>>             #Fun,
>>             #Fun}},
>>           {options,
>>            [{sink,{fitting,<0.119.0>,#Ref<0.0.0.5472>,sink,undefined}},
>>             {log,sink},
>>             {trace,
>>              {set,1,16,16,8,80,48,
>>               {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
>>               {{[],[],[error],[],[],[],[],[],[],[],[],[],[],[],[],[]]},
>>           {q_limit,64}]},
>>         {reason,
>>          {{badmatch,{'EXIT',noproc}},
>>           [{riak_core_vnode_proxy,call,2},
>>            {riak_pipe_vnode,queue_work_send,4},
>>            {riak_pipe_vnode,queue_work_erracc,6},
>>            {riak_kv_w_reduce,'-done/1-lc$^0/1-0-',3},
>>            {riak_kv_w_reduce,done,1},
>>            {riak_pipe_vnode_worker,wait_for_input,2},
>>            {gen_fsm,handle_msg,7},
>>            {proc_lib,init_p_do_apply,3}]}},
>>         {state,{working,done}}]}}}]}},
>>  

Riak.mapValuesJson is returning a string

2012-04-26 Thread kodeblok
I am using curl to execute a map query. My command is this:

curl -v -d '{"inputs":[["test", "12"]],
"query":[{"map":{"language":"javascript", "source":"function(value, keyData,
arg) { var dats = Riak.mapValuesJson(value)[0]; return [typeof dats];}"}}]}'
-H "Content-Type: application/json" http://127.0.0.1:8098/mapred

The result is this: ["string"]
and I expected it to be an object. I can't access the values of 'dats' with
sub access or dot access.

I've double checked that this is saved in Riak as JSON with this:

curl -v http://127.0.0.1:8098/riak/test/12

and received this in the response:

Content-Type: application/json
Content-Length: 2343

and the response is obviously an escaped JSON string ala:
"{\"foo\":{\"version\":\"1.0\",.}}

Has anyon ehad this issue? How did you resolve it?

Thanks!

--
View this message in context: 
http://riak-users.197444.n3.nabble.com/Riak-mapValuesJson-is-returning-a-string-tp3942213p3942213.html
Sent from the Riak Users mailing list archive at Nabble.com.

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


Latency

2012-04-26 Thread Alek Morfi
Hi,

I have done a benchmark in Riak and I find that Insert a new record has the
lowest latency and Get's latecy (seek a record by key) is the middle one
(in terms of latency) and Update  command has the highest latency.
Latency means the amount of time that each operation takes to complete.

What is the reason of this order?
How can I reduce the GET latency? (I know It might cause an increase in
Insert latency)

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


riak querying error

2012-04-26 Thread Sangeetha.PattabiRaman2

Dear team,


My doubt is I have loaded goog.csv on riak using load_data script such as

#!/usr/local/bin/escript
main([Filename]) ->
{ok, Data} = file:read_file(Filename),
Lines = tl(re:split(Data, "\r?\n", [{return, binary},trim])),
lists:foreach(fun(L) -> LS = re:split(L, ","), format_and_insert(LS) end, 
Lines).

format_and_insert(Line) ->
JSON = 
io_lib:format("{\"Date\":\"~s\",\"Open\":~s,\"High\":~s,\"Low\":~s,\"Close\":~s,\"Volume\":~s,\"Adj.
 Close\":~s}", Line),
Command = io_lib:format("curl -X PUT http://127.0.0.1:8091/riak/goog/~s -d 
'~s' -H 'content-type: application/json'", [hd(Line),JSON]),
io:format("Inserting: ~s~n", [hd(Line)]),
os:cmd(Command).





fYIP: goog.csv is this


Date,Open,High,Low,Close,Volume,Adj Close
2010-05-05,500.98,515.72,500.47,509.76,4566900,509.76
2010-05-04,526.52,526.74,504.21,506.37,6076300,506.37
2010-05-03,526.50,532.92,525.08,530.60,1857800,530.60
2010-04-30,531.13,537.68,525.44,525.70,2435400,525.70
2010-04-29,533.37,536.50,526.67,532.00,3058900,532.00
2010-04-28,532.10,534.83,521.03,529.19,3406100,529.19
2010-04-27,528.95,538.33,527.23,529.06,3844700,529.06
2010-04-26,544.97,544.99,529.21,531.64,4368800,531.64
2010-04-23,547.25,549.32,542.27,544.99,2089400,544.99
|Please clarify wit hteh same !!!|

My quest is :
When I query over date its returning the values but when I query on other than 
date column like volume etc... it shows the following error ...please do help 
me out with the same in resolving the following error :

[{"not_found":{"bucket":"goog","key":"1956200","keydata":"undefined"}}]


curl -X POST http://10.232.5.169:8098/mapred -H "Content-Type: 
application/json" -d @-
{"inputs":[["goog","2010-01-04"]],
"query":[{"map":{"language":"javascript","name":"Riak.mapValues","keep":true}}]
}
["{\"Date\":\"2010-01-04\",\"Open\":626.95,\"High\":629.51,\"Low\":624.24,\"Close\":626.75,\"Volume\":1956200,\"Adj.
 Close\":626.75}"]



curl -X POST http://10.232.5.169:8098/mapred -H "Content-Type: 
application/json" -d @-
{"inputs":[["goog","2010-01-04"]],
"query":[{"map":{"language":"javascript","name":"Riak.mapValues","keep":true}}]
}
["{\"Date\":\"2010-01-04\",\"Open\":626.95,\"High\":629.51,\"Low\":624.24,\"Close\":626.75,\"Volume\":1956200,\"Adj.
 Close\":626.75}"][ha^C
[hadoop@CTSINGMRGTO dev]$ curl -X POST http://10.232.5.169:8098/mapred -H 
"Content-Type: application/json" -d @-
{"inputs":[["goog","1956200"]],
"query":[{"map":{"language":"javascript","name":"Riak.mapValues","keep":true}}]
}
[{"not_found":{"bucket":"goog","key":"1956200","keydata":"undefined"}}]
Thanks & regards
sangeetha


This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful.
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com