You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Prakrati Agrawal <Pr...@mu-sigma.com> on 2012/06/05 11:24:40 UTC

How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

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.

RE: How to configure the Cassandra connection using Hector

Posted by Harshvardhan Ojha <Ha...@makemytrip.com>.
It seems you are missing ip:port like:
cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");

If this doesn't work please provide complete stack trace.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 3:00 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

cluster = HFactory.getCluster("Test Cluster");
keySpace = HFactory.createKeyspace("mstream", cluster);

These are the lines that I am executing and getting an error

Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://www.mu-sigma.com>

From: Harshvardhan Ojha [mailto:Harshvardhan.Ojha@makemytrip.com]
Sent: Tuesday, June 05, 2012 2:59 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

Check if you have rightly provided your cluster name.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 2:55 PM
To: user@cassandra.apache.org
Subject: How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

Thanks and Regards
Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://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.

RE: How to configure the Cassandra connection using Hector

Posted by Prakrati Agrawal <Pr...@mu-sigma.com>.
Thank you all for the quick response :)

Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com

From: MOHD ARSHAD SALEEM [mailto:marshadsaleem@tataelxsi.co.in]
Sent: Tuesday, June 05, 2012 3:07 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

In the following line give

cluster = HFactory.getCluster("Test Cluster",ip:9160);
ip =ip address of your machine and respective port no.

Regards
Arshad
________________________________
From: Prakrati Agrawal [Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 3:00 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector
cluster = HFactory.getCluster("Test Cluster");
keySpace = HFactory.createKeyspace("mstream", cluster);

These are the lines that I am executing and getting an error

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 2:59 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

Check if you have rightly provided your cluster name.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 2:55 PM
To: user@cassandra.apache.org
Subject: How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

Thanks and Regards
Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://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.

________________________________
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.

RE: How to configure the Cassandra connection using Hector

Posted by MOHD ARSHAD SALEEM <ma...@tataelxsi.co.in>.
In the following line give

cluster = HFactory.getCluster("Test Cluster",ip:9160);
ip =ip address of your machine and respective port no.

Regards
Arshad
________________________________
From: Prakrati Agrawal [Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 3:00 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

cluster = HFactory.getCluster("Test Cluster");
keySpace = HFactory.createKeyspace("mstream", cluster);

These are the lines that I am executing and getting an error

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 2:59 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

Check if you have rightly provided your cluster name.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 2:55 PM
To: user@cassandra.apache.org
Subject: How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

Thanks and Regards
Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://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.

RE: How to configure the Cassandra connection using Hector

Posted by Prakrati Agrawal <Pr...@mu-sigma.com>.
cluster = HFactory.getCluster("Test Cluster");
keySpace = HFactory.createKeyspace("mstream", cluster);

These are the lines that I am executing and getting an error

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 2:59 PM
To: user@cassandra.apache.org
Subject: RE: How to configure the Cassandra connection using Hector

Check if you have rightly provided your cluster name.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 2:55 PM
To: user@cassandra.apache.org
Subject: How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

Thanks and Regards
Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://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.

RE: How to configure the Cassandra connection using Hector

Posted by Harshvardhan Ojha <Ha...@makemytrip.com>.
Check if you have rightly provided your cluster name.

Regards
Harsh

From: Prakrati Agrawal [mailto:Prakrati.Agrawal@mu-sigma.com]
Sent: Tuesday, June 05, 2012 2:55 PM
To: user@cassandra.apache.org
Subject: How to configure the Cassandra connection using Hector

Dear all,

I am writing a java code using Hector but when I am configuring the already created key space using HFactory.createKeySpace its giving me the error Null Point Exception. What am I doing wrong. Please help me.

Thanks and Regards
Prakrati Agrawal | Developer - Big Data(I&D)| 9731648376 | www.mu-sigma.com<http://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.