incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paderno Giampaolo" <Giampaolo.Pade...@yoox.com>
Subject RE: bootstrap & rack aware on Cassandra4.1
Date Mon, 02 Nov 2009 09:21:10 GMT
Yes we already tried your suggested configuration but it doesn't work: every time we try to
write to a rack-aware node we get the exception: java.lang.UnsupportedOperationException:
Rack-aware bootstrapping not supported... It's really strange to me that this config is working
on your environment, maybe we're missing something but I can't figure out what and where...
in the meantime we're trying the workaround suggested by Jonathan. 

Regards
Giampaolo


-----Original Message-----
From: Santal Li [mailto:santal.li@gmail.com] 
Sent: sabato 31 ottobre 2009 9.36
To: cassandra-dev@incubator.apache.org
Subject: Re: bootstrap & rack aware on Cassandra4.1

In 0.4.1, you can using bellow configure to make RackAwareStrategy work:

bash>vi storage-conf.xml

  <!--
   ~ Strategy: Setting this to the class that implements
   ~ IReplicaPlacementStrategy will change the way the node picker works.
   ~ Out of the box, Cassandra provides
   ~ org.apache.cassandra.locator.RackUnawareStrategy and
   ~ org.apache.cassandra.locator.RackAwareStrategy (place one replica in
   ~ a different datacenter, and the others on different racks in the same
   ~ one.)
  -->

<ReplicaPlacementStrategy>org.apache.cassandra.locator.RackAwareStrategy</ReplicaPlacementStrategy>

It will using IP address to make aware different DC:
192.168.0.1 - 192.168.0.2  --> same DC , same Rack
192.168.0.1 - 192.168.1.2  --> same DC , different Rack
192.168.0.1 - 192.169.0.2  --> different DC


I had test it in my lab, things works fine.
If you meet problem in test, I can provide help.

Regards
-Santal



2009/10/31 Jonathan Ellis <jbellis@gmail.com>

> Oh, I misunderstood -- you're not trying to bootstrap, but getting
> this error anyway.
>
> I'd probably call this "wontfix" for 0.4 since the fix is basically
> all the work on ReplicationStrategy that's been done for 0.5, which
> shouldn't be backported to a stable release imo.  The silver lining is
> that 0.5 will be out soon.
>
> If you want a workaround in the meantime, make
> getWriteStorageEndPoints just return getReadStorageEndPoints(token)
> which will not treat bootstrap nodes correctly but it should work fine
> otherwise. :)
>
> -Jonathan
>
> On Fri, Oct 30, 2009 at 10:39 AM, Paderno Giampaolo
> <Giampaolo.Paderno@yoox.com> wrote:
> > Thanks for the reply, in the meantime it's possible to manage replica
> between two datacenter with 0.4.1 even without bootstrap? In other words is
> it possible to write on a rack-aware node? If so can you post me a sample
> configuration?
> >
> > Thanks
> >
> > -----Original Message-----
> > From: Jonathan Ellis [mailto:jbellis@gmail.com]
> > Sent: venerdì 30 ottobre 2009 17.28
> > To: cassandra-dev@incubator.apache.org
> > Subject: Re: bootstrap & rack aware on Cassandra4.1
> >
> > Right, rack-aware (really, endpointsnitch-aware) bootstrap isn't
> supported
> > until 0.5, which trunk will become probably some time in November.
> >
> > On Fri, Oct 30, 2009 at 9:26 AM, Paderno Giampaolo <
> > Giampaolo.Paderno@yoox.com> wrote:
> >
> >>  Hi all, we experienced that writing on a rack aware node we get the
> >> following error:
> >>
> >>
> >>
> >> ERROR [pool-1-thread-1] 2009-10-30 15:48:55,467 StorageProxy.java (line
> >> 179) error writing key 13345671
> >>
> >> java.lang.UnsupportedOperationException: Rack-aware bootstrapping not
> >> supported
> >>
> >>             at
> >>
> org.apache.cassandra.locator.RackAwareStrategy.getWriteStorageEndPoints(RackAwareStrategy.java:132)
> >>
> >>             at
> >>
> org.apache.cassandra.locator.AbstractReplicationStrategy.getHintedStorageEndPoints(AbstractReplicationStrategy.java:69)
> >>
> >>             at
> >>
> org.apache.cassandra.service.StorageService.getHintedStorageEndpointMap(StorageService.java:982)
> >>
> >>             at
> >>
> org.apache.cassandra.service.StorageProxy.insertBlocking(StorageProxy.java:151)
> >>
> >>             at
> >>
> org.apache.cassandra.service.CassandraServer.doInsert(CassandraServer.java:468)
> >>
> >>             at
> >>
> org.apache.cassandra.service.CassandraServer.insert(CassandraServer.java:421)
> >>
> >>             at
> >>
> org.apache.cassandra.service.Cassandra$Processor$insert.process(Cassandra.java:824)
> >>
> >>             at
> >>
> org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:627)
> >>
> >>             at
> >>
> org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> >>
> >>             at
> >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
> >>
> >>             at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
> >> Source)
> >>
> >>             at java.lang.Thread.run(Unknown Source)
> >>
> >>
> >>
> >> We haven't understand how bootstrap works in Cassandra and how to enable
> or
> >> disable it.
> >>
> >> With trunk version everything works properly.
> >>
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >> Giampaolo Paderno
> >>
> >> Software Factory Developer
> >>
> >> YOOX Group
> >>
> >> Via Nannetti 1, 40069 Zola Predosa, Bologna, Italia
> >>
> >> T  +39 051 6184211
> >>
> >> F  +39 051 6184215
> >>
> >> giampaolo.paderno@yoox.com
> >>
> >>
> >>
> >> [image: http://cdn2.yoox.biz/signature/yooxygen.jpg]
> >>
> >> Please consider the environment before printing this e-mail.
> >>
> >>
> >>
> >> *NOTICE: The information contained in this message is confidential,
> >> intended only for the use of the individual or entity named above.*
> >>
> >> *If you are not the intended recipient, please notify us immediately by
> >> telephone or e-mail and destroy this communication. Thank you**.*
> >>
> >
>

Mime
View raw message