Sorry, here's the complete email:
Ok, so the real issue i was running into was calling
StreamingOperation.getContinuation() *before* calling
StreamingOperation.getAll(). Once i reversed the calls it was fine.
But the real pain came from the above error. I upgraded to 1.4.8, and instead
of getting:
Exception in thread "main" com.basho.riak.pbc.RiakError: 50693238
I was getting:
Exception in thread "main" com.basho.riak.pbc.RiakError: {db_write,"IO error:
./data/leveldb/1164634117248063262943561351070788031288321245184/000013.log:
Cannot allocate memory"}
So that gave me something to work with. I tried all kinds of config changes
(since i'm still uncertain as to what exactly the above means), and eventually
i ended up with a corrupt db. Riak would not start with the app.config i was
using (even though it looked ok and "riak chkconfig" was fine). There were no
error messages in the logs, riak would just die a few seconds after startup.
Once i wiped the db physically from disk (the /data/leveldb dir), then riak
started up fine with the current app.config AND your gist was working fine. I
was able to store elements w/o running into errors.
Now, this is on a VM with 4G of ram and 10G of disk space; it was surprising to
get mem errors when i had nothing in the db whatsoever, and all i was trying to
do was store 50 small objects.
The differences in my app.config from the stock one: n_val=1 (since i just have
one test node), i turned off anti_entropy, and i reduced ring_creation_size
from 64 to 16. It's unclear which of these (if not all) did the trick; but
things are working fine now.
But this leads to several questions:
- Why did i end up with a corrupt db?
- Why does the default config not work on a single node with 4G ram and 10G of
disk space for just some simple development testing?
- What happens when n_val=3 (the default) on a single node env?
- Is it ok to store data when n_val=3, then change it to n_val=1, restart riak,
and not end up with corrupt data?
On Monday, February 24, 2014 3:01 PM, joe dude <mipito0...@yahoo.com> wrote:
Ok, so the real issue i was running into was calling
StreamingOperation.getContinuation() *before* calling
StreamingOperation.getAll(). Once i reversed the calls it was fine.
But the real pain came from the above error. I upgraded to 1.4.8, and instead
of getting:
On Sunday, February 16, 2014 12:31 PM, joe dude <mipito0...@yahoo.com> wrote:
Ok, so now i'm starting to wonder if i have some sort of mis-install. I'm using
the java 1.4.4 client, with a 1.4.7 server. Now, the server is just one
instance running inside an ubuntu vmware vm on my windows box.This is what i
get when i run your gist above:
STORING: key0
STORING: key1
STORING: key2
STORING: key3
STORING: key4
STORING: key5
Exception in thread "main" com.basho.riak.pbc.RiakError: 50693238
at com.basho.riak.pbc.RiakConnection.receive(RiakConnection.java:125)
at com.basho.riak.pbc.RiakClient.store(RiakClient.java:674)
at com.basho.riak.client.raw.pbc.PBClientAdapter.store(PBClientAdapter.java:185)
at com.basho.riak.client.raw.pbc.PBClientAdapter.store(PBClientAdapter.java:205)
at IndexTester.java:27) // This is the store call in that initial for loop.
I'll run this over and over, changing the bucket name, and it blows up at
different objects. Sometimes i only get 2 objects in there before it blows up,
and sometimes as many as 15, but so far never more than that. I can query riak
and see the buckets, see the keys, and see the objects that made it just fine.
So first, what is that error telling me?
Second, nothing shows up in the riak logs at all. Note that i run the above on
both the windows host machine, and on the ubuntu instance, with the same
results.
Perhaps there are issues running riak inside an ubuntu vmware vm?
Thanks.
On Wednesday, February 12, 2014 8:48 AM, Brian Roach <ro...@basho.com> wrote:
Joe -
The current Java client codebase it built in layers. The top-level
user API uses an instance of the mid-level RawClient interface which
passes it to the appropriate protocol-specific layer at the bottom.
We are not able to reproduce what you are
describing using the 1.4.4
version of the client. Doing a 2i query (with a range or a single
value) and specifying a max number of results
returns the results
requested and a continuation.
Here's a gist using the RawClient:
https://gist.github.com/broach/99880915e8c71c53e9bb
If you have a test case that demonstrates the issue you're having and
can post it as a gist in github (or a pastie, etc) we'll be happy to
look at it.
Thanks!
- Roach
On Tue, Feb 11, 2014 at 10:32 PM, joe dude <mipito0...@yahoo.com> wrote:
> Yeah, i looked at your code and it looks very similar to what i'm doing. The
>
difference is i'm just talking to the client
directly:
>
> StreamingOperation<IndexEntry> result = rawClient.fetchIndex(query);
>
> And rawClient is a "PBClusterClient". Might that have something to do with
> it?
>
>
> On Tuesday, February 11, 2014 5:00 PM, Dave Rusek <dru...@basho.com> wrote:
> Joe,
>
> Sorry, I wanted to get that email out before I stepped out. The specific
> test I added is here:
>
> https://github.com/basho/riak-java-client/blob/1.4.x-develop/src/test/java/com/basho/riak/client/itest/ITestBucket.java#L280
>
> Does this represent your use case? If not, do you happen to have a failing
> test I could take a look at?
>
> Thanks!
>
> --
> Dave Rusek
> Software Engineer
> Basho Technologies
> @davidjrusek
>
> On February 11, 2014 at 5:33:57 PM, Dave Rusek (dru...@basho.com) wrote:
>
> Joe,
>
> I added an integration test to the 1.4.x-develop and the 1.4.4 branch of the
> client and tried them
against the latest 1.4 branch of Riak but was not able
> to reproduce your issue.
>
> https://github.com/basho/riak-java-client/tree/1.4.x-develop
>
> --
> Dave Rusek
> Software Engineer
> Basho Technologies
> @davidjrusek
>
> On February 11, 2014 at 5:21:11 PM, Brian Roach (ro...@basho.com) wrote:
>
> ---------- Forwarded message ----------
> From: joe dude <mipito0...@yahoo.com>
> Date: Tue,
Feb 11, 2014 at 2:15 PM
> Subject: Re: pagination over 2i indexes in java
> To: Brian Roach <ro...@basho.com>
> Cc: "riak-users@lists.basho.com" <riak-users@lists.basho.com>
>
>
> I'm using 1.4.4, and creating a PBClusterClient.
>
> Thanks.
>
>
> On Tuesday, February 11, 2014 11:03 AM, Brian Roach <ro...@basho.com> wrote:
> Hi Joe -
>
> What version of the Riak Java client are you using, and which protocol
> (PB or HTTP)?
>
> Will take a look at it.
>
> Thanks!
> - Roach
>
> On Tue, Feb 11, 2014 at 11:50 AM, joe dude <mipito0...@yahoo.com> wrote:
>> Hi, trying to figure out how to use the java client to do 2i index queries
>> with pagination.
>>
>> I can issue the query with max_results and get back exactly the number
>>
that
>> i asked for, but the continuation value in the returned StreamingOperation
>> object is null.
>>
>> In contrast, i get pagination to work just fine using the examples from:
>> http://docs.basho.com/riak/latest/dev/using/2i/
>>
>> I'm using:
>>
>> public StreamingOperation<IndexEntry> fetchIndex(IndexSpec indexSpec)
>> throws IOException
>>
>>
>> It's as if i'm missing something when building IndexSpec, but not sure
>> what.
>>
>> Thx.
>>
>>
>> _______________________________________________
>> riak-users mailing list
>> 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
>
>
>
> _______________________________________________
> riak-users mailing list
> 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
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com