incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samal <samalgo...@gmail.com>
Subject Re: How to include two nodes in Java code using Hector
Date Wed, 06 Jun 2012 03:46:16 GMT
I don't use hector, don't know much about internals, this may help

*  Cluster cluster = HFactory.getOrCreateCluster("
TestCluster","host1:9160,host2:9160,host3:9160")*

If you have 2 node cluster with RF=2, your data will be present in both
node. And if consistency level 2 is used both node must be UP to read and
write.

It doesn't matter which node you connect, if your data is present in
cluster it will be read directly or through coordinator node.

Read hector doc-
http://hector-client.github.com/hector/build/html/documentation.html

/Samal

On Wed, Jun 6, 2012 at 8:35 AM, Prakrati Agrawal <
Prakrati.Agrawal@mu-sigma.com> wrote:

>  But the data is distributed on the nodes ( meaning 50% of data is on one
> node and 50% of data is on another node) so I need to specify the node ip
> address somewhere in the code. But where do I specify that is what I am
> clueless about. Please help me****
>
> ** **
>
> Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 |
> www.mu-sigma.com ****
>
> ** **
>
> *From:* Harshvardhan Ojha [mailto:Harshvardhan.Ojha@makemytrip.com]
> *Sent:* Tuesday, June 05, 2012 5:51 PM
> *To:* user@cassandra.apache.org
> *Subject:* RE: How to include two nodes in Java code using Hector****
>
> ** **
>
> Use Consistency Level =2.****
>
> ** **
>
> Regards****
>
> Harsh****
>
> ** **
>
> *From:* Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
> *Sent:* Tuesday, June 05, 2012 4:08 PM
> *To:* user@cassandra.apache.org
> *Subject:* How to include two nodes in Java code using Hector****
>
> ** **
>
> Dear all****
>
> ** **
>
> I am using a two node Cassandra cluster. How do I code in Java using
> Hector to get data from both the nodes. Please help****
>
> ** **
>
> Thanks and Regards****
>
> ** **
>
> Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 |
> www.mu-sigma.com ****
>
> ** **
>
> ** **
>  ------------------------------
>
> This email message may contain proprietary, private and confidential
> information. The information transmitted is intended only for the person(s)
> or entities to which it is addressed. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended recipient
> is prohibited and may be illegal. If you received this in error, please
> contact the sender and delete the message from your system.
>
> Mu Sigma takes all reasonable steps to ensure that its electronic
> communications are free from viruses. However, given Internet
> accessibility, the Company cannot accept liability for any virus introduced
> by this e-mail or any attachment and you are advised to use up-to-date
> virus checking software.****
>
> ------------------------------
> This email message may contain proprietary, private and confidential
> information. The information transmitted is intended only for the person(s)
> or entities to which it is addressed. Any review, retransmission,
> dissemination or other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended recipient
> is prohibited and may be illegal. If you received this in error, please
> contact the sender and delete the message from your system.
>
> Mu Sigma takes all reasonable steps to ensure that its electronic
> communications are free from viruses. However, given Internet
> accessibility, the Company cannot accept liability for any virus introduced
> by this e-mail or any attachment and you are advised to use up-to-date
> virus checking software.
>

Mime
View raw message