You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Everton Lima <pe...@gmail.com> on 2012/11/27 13:40:45 UTC

Other problem in update

People, when i try to execute my program that use EmbeddedCassandraService,
with the version 1.1.2 of cassandra in "OpenSuse Real Time" operation
system it is throwing the follow exception:


[27/11/12 10:27:28,314 BRST] ERROR service.CassandraDaemon: Exception in
thread Thread[MutationStage:20,5,main]
java.lang.NullPointerException
        at org.apache.cassandra.utils.UUIDGen.decompose(UUIDGen.java:96)
        at
org.apache.cassandra.cql.jdbc.JdbcUUID.decompose(JdbcUUID.java:55)
        at
org.apache.cassandra.db.marshal.UUIDType.decompose(UUIDType.java:187)
        at org.apache.cassandra.db.RowMutation.hintFor(RowMutation.java:107)
        at
org.apache.cassandra.service.StorageProxy.writeHintForMutation(StorageProxy.java:582)
        at
org.apache.cassandra.service.StorageProxy$5.runMayThrow(StorageProxy.java:557)
        at
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
        at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)

When I try to execute the same program in Ubuntu 12.04 the program starts
without ERRORS.
Someone could help me??

-- 

Everton Lima Aleixo
Bacharel em Ciencia da Computação
Universidade Federal de Goiás

Re: JDBC, Pools and clusters ?

Posted by aaron morton <aa...@thelastpickle.com>.
If you are feeling adventurous this has connection pooling, it will only work with 1.2 though https://github.com/datastax/java-driver

I'm not aware of the current best practice for connecting pooling with the older JDBC driver. I can see some support for pooling in the trunk but it does not appear to be in the (current) 1.1.2 branch. 

Cheers

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 10/12/2012, at 3:23 AM, Andy Cobley <ac...@computing.dundee.ac.uk> wrote:

> I'm starting to move to JBC for Cassandra (away from Hector).    In his strange loop 2012 anti-pattern presentation, Mathew Dennis writes:
> 
> "Sometimes people try to restrict clients to a single node. This actually takes work, and causes problems. Don’t do it."
> 
> Now, I note that the JDBC pooled connection class takes a single  node as an argument creating  a pool of connections to that node.   So, Whats the best way of handling this in a (web) application ?  Should I create multiple pools to each of the nodes in the cluster or is there a better best practice.
> 
> BTW
> Is there an equivalent  to Hector's getKnownPoolHosts for JDBC ?
> 
> Many Thanks
> 
> Andy C
> 
> The University of Dundee is a Scottish Registered Charity, No. SC015096.


JDBC, Pools and clusters ?

Posted by Andy Cobley <ac...@computing.dundee.ac.uk>.
I'm starting to move to JBC for Cassandra (away from Hector).    In his strange loop 2012 anti-pattern presentation, Mathew Dennis writes:

"Sometimes people try to restrict clients to a single node. This actually takes work, and causes problems. Don’t do it."

Now, I note that the JDBC pooled connection class takes a single  node as an argument creating  a pool of connections to that node.   So, Whats the best way of handling this in a (web) application ?  Should I create multiple pools to each of the nodes in the cluster or is there a better best practice.

BTW
Is there an equivalent  to Hector's getKnownPoolHosts for JDBC ?

Many Thanks

Andy C


The University of Dundee is a Scottish Registered Charity, No. SC015096.



Re: Other problem in update

Posted by Everton Lima <pe...@gmail.com>.
The problens was that my unit tests are not cleaning up their data
directory and there is some corrupt data in there.
The problem was fixed by del the directory manualy.

Thanks

2012/11/27 Tupshin Harper <tu...@tupshin.com>

> Unless I'm misreading the git history, the stack trace you referenced
> isn't from 1.1.2. In particular, the "writeHintForMutation" method in
> StorageProxy.java wasn't added to the codebase until September 9th (
> https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commitdiff;h=b38ca2879cf1cbf5de17e1912772b6588eaa7de6),
> and wasn't part of any release until 1.2.0-beta1.
>
> -Tupshin
>
> On Tue, Nov 27, 2012 at 7:40 AM, Everton Lima <pe...@gmail.com>wrote:
>
>> writeHintForMutation
>
>
>


-- 

Everton Lima Aleixo
Bacharel em Ciencia da Computação
Universidade Federal de Goiás

Re: Other problem in update

Posted by Tupshin Harper <tu...@tupshin.com>.
Unless I'm misreading the git history, the stack trace you referenced isn't
from 1.1.2. In particular, the "writeHintForMutation" method in
StorageProxy.java wasn't added to the codebase until September 9th (
https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=commitdiff;h=b38ca2879cf1cbf5de17e1912772b6588eaa7de6),
and wasn't part of any release until 1.2.0-beta1.

-Tupshin

On Tue, Nov 27, 2012 at 7:40 AM, Everton Lima <pe...@gmail.com>wrote:

> writeHintForMutation

Re: Other problem in update

Posted by Edward Capriolo <ed...@gmail.com>.
I am just taking a stab at this one. UUID's interact with system time and
maybe your "real time" os is doing something funky there. The other option,
which seems more likely, is that your unit tests are not cleaning up their
data directory and there is some corrupt data in there.

On Tue, Nov 27, 2012 at 7:40 AM, Everton Lima <pe...@gmail.com>wrote:

> People, when i try to execute my program that use
> EmbeddedCassandraService, with the version 1.1.2 of cassandra in "OpenSuse
> Real Time" operation system it is throwing the follow exception:
>
>
> [27/11/12 10:27:28,314 BRST] ERROR service.CassandraDaemon: Exception in
> thread Thread[MutationStage:20,5,main]
> java.lang.NullPointerException
>         at org.apache.cassandra.utils.UUIDGen.decompose(UUIDGen.java:96)
>         at
> org.apache.cassandra.cql.jdbc.JdbcUUID.decompose(JdbcUUID.java:55)
>         at
> org.apache.cassandra.db.marshal.UUIDType.decompose(UUIDType.java:187)
>         at
> org.apache.cassandra.db.RowMutation.hintFor(RowMutation.java:107)
>         at
> org.apache.cassandra.service.StorageProxy.writeHintForMutation(StorageProxy.java:582)
>         at
> org.apache.cassandra.service.StorageProxy$5.runMayThrow(StorageProxy.java:557)
>         at
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
>         at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>         at java.lang.Thread.run(Thread.java:636)
>
> When I try to execute the same program in Ubuntu 12.04 the program starts
> without ERRORS.
> Someone could help me??
>
> --
>
> Everton Lima Aleixo
> Bacharel em Ciencia da Computação
> Universidade Federal de Goiás
>