Re: Datastax Java Driver connection issue

2013-04-22 Thread Abhijit Chanda
Aaron,

Just for clarification, why it is necessary to set the server rpc address
to 127.0.0.1?


On Mon, Apr 22, 2013 at 2:22 AM, aaron morton aa...@thelastpickle.comwrote:

 Make sure that the server rpc_address is set to 127.0.0.1

 Cheers

 -
 Aaron Morton
 Freelance Cassandra Consultant
 New Zealand

 @aaronmorton
 http://www.thelastpickle.com

 On 20/04/2013, at 1:47 PM, Techy Teck comptechge...@gmail.com wrote:

 I am also running into this problem. I have already enabled 
 *start_native_transport:
 true*

 And by this, I am trying to make a connection-

 private CassandraDatastaxConnection() {

 try{
 cluster =
 Cluster.builder().addContactPoint(localhost).build();
 session = cluster.connect(my_keyspace);
 } catch (NoHostAvailableException e) {
 throw new RuntimeException(e);
 }
 }

 And everytime it gives me the same exception-

 *com.datastax.driver.core.exceptions.NoHostAvailableException: All
 host(s) tried for query failed (tried: [localhost/127.0.0.1])*

 Any idea how to fix this problem?

 Thanks for the help.
 *
 *




 On Fri, Apr 19, 2013 at 6:41 AM, Abhijit Chanda abhijit.chan...@gmail.com
  wrote:

 @Gabriel, @Wright: thanks, such a silly of me.


 On Fri, Apr 19, 2013 at 6:48 PM, Keith Wright kwri...@nanigans.comwrote:

  Did you enable the binary protocol in Cassandra.yaml?

 Abhijit Chanda abhijit.chan...@gmail.com wrote:


  Hi,

  I have downloaded the CQL driver provided by Datastax using
 dependency
 groupIdcom.datastax.cassandra/groupId
 artifactIdcassandra-driver-core/artifactId
 version1.0.0-beta2/version
 /dependency

  Then tried a sample program to connect to the cluster
  Cluster cluster = Cluster.builder()
 .addContactPoints(db1)
 .withPort(9160)
 .build();

  But sadly its returning 
 c*om.datastax.driver.core.exceptions.NoHostAvailableException:
 All host(s) tried for query failed   *
 *
 *
 I am using cassandra 1.2.2

  Can any one suggest me whats wrong with that.

  And i am really sorry for posting  datastax java driver related
 question in this forum, can't find a better place for the instant reaction


  -Abhijit




 --
 -Abhijit






-- 
-Abhijit


Re: Retrieve data from Cassandra database using Datastax java driver

2013-04-20 Thread Abhijit Chanda
You have the collection attributeNames, just iterate it
  IteratorRow it = result.iterator();
while(it.hasNext()){
Row row = it.next();
for(String column : attributeNames) {
//not sure how to put the columnName and columnValue that
came back from the database
attributes.put(column,row.getString(column));
}
}


Cheers


On Sun, Apr 21, 2013 at 10:24 AM, Techy Teck comptechge...@gmail.comwrote:

 Thanks Dave for the suggestion. I have all my columns name in this
 collection-

  *final CollectionString attributeNames*
 *
 *
 And all my results back in this resultset-

 *ResultSet result =
 CassandraDatastaxConnection.getSession().execute(query);*
 *
 *
 Now I need to store the column name and its corresponding value in the
 Below Map-

   *MapString, String attributes = new
 ConcurrentHashMapString, String();*
 *
 *
 What's the best way to do that in this case?

 Thanks for the help.






 On Sat, Apr 20, 2013 at 9:36 PM, Dave Brosius dbros...@mebigfatguy.comwrote:

  getColumnDefinitions only returns meta data, to get the data, use the
 iterator to navigate the rows


 IteratorRow it = result.iterator();

 while (it.hasNext()) {
 Row r = it.next();
 //do stuff with row

 }

 On 04/21/2013 12:02 AM, Techy Teck wrote:

  I am working with Datastax java-driver. And I am trying to retrieve few
 columns from the database basis on the input that is being passed to the
 below method-


  public MapString, String getAttributes(final String userId, final
 CollectionString attributeNames) {

  String query=SELECT  +attributeNames.toString().substring(1,
 attributeNames.toString().length()-1)+  from profile where id = '+userId+
 ';;
   CassandraDatastaxConnection.getInstance();

  ResultSet result =
 CassandraDatastaxConnection.getSession().execute(query);

  MapString, String attributes = new ConcurrentHashMapString,
 String();
   for(Definition def : result.getColumnDefinitions()) {
  //not sure how to put the columnName and columnValue that came back from
 the database
  attributes.put(column name, column value);
  }
   return attributes;
  }

  Now I got the result back from the database in *result*
 *
 *
 Now how to put the colum name and column value that came back from the
 database in a map?

  I am not able to understand how to retrieve colum value for a
 particular column in datastax java driver?

  Any thoughts will be of great help.






-- 
-Abhijit


Datastax Java Driver connection issue

2013-04-19 Thread Abhijit Chanda
Hi,

I have downloaded the CQL driver provided by Datastax using
   dependency
groupIdcom.datastax.cassandra/groupId
artifactIdcassandra-driver-core/artifactId
version1.0.0-beta2/version
/dependency

Then tried a sample program to connect to the cluster
Cluster cluster = Cluster.builder()
.addContactPoints(db1)
.withPort(9160)
.build();

But sadly its returning
c*om.datastax.driver.core.exceptions.NoHostAvailableException:
All host(s) tried for query failed   *
*
*
I am using cassandra 1.2.2

Can any one suggest me whats wrong with that.

And i am really sorry for posting  datastax java driver related question in
this forum, can't find a better place for the instant reaction


-Abhijit


Re: Datastax Java Driver connection issue

2013-04-19 Thread Abhijit Chanda
@Gabriel, @Wright: thanks, such a silly of me.


On Fri, Apr 19, 2013 at 6:48 PM, Keith Wright kwri...@nanigans.com wrote:

  Did you enable the binary protocol in Cassandra.yaml?

 Abhijit Chanda abhijit.chan...@gmail.com wrote:


  Hi,

  I have downloaded the CQL driver provided by Datastax using
 dependency
 groupIdcom.datastax.cassandra/groupId
 artifactIdcassandra-driver-core/artifactId
 version1.0.0-beta2/version
 /dependency

  Then tried a sample program to connect to the cluster
  Cluster cluster = Cluster.builder()
 .addContactPoints(db1)
 .withPort(9160)
 .build();

  But sadly its returning 
 c*om.datastax.driver.core.exceptions.NoHostAvailableException:
 All host(s) tried for query failed   *
 *
 *
 I am using cassandra 1.2.2

  Can any one suggest me whats wrong with that.

  And i am really sorry for posting  datastax java driver related question
 in this forum, can't find a better place for the instant reaction


  -Abhijit




-- 
-Abhijit


Re: Can I create a counter column family with many rows in 1.1.10?

2013-03-05 Thread Abhijit Chanda
Thanks @aaron  for the rectification


On Wed, Mar 6, 2013 at 1:17 PM, aaron morton aa...@thelastpickle.comwrote:

 Note that CQL 3 in 1.1 is  compatible with CQL 3 in 1.2. Also you do not
 have to use CQL 3, you can still use the cassandra-cli to create CF's.

 The syntax you use to populate it depends on the client you are using.

 Cheers

 -
 Aaron Morton
 Freelance Cassandra Developer
 New Zealand

 @aaronmorton
 http://www.thelastpickle.com

 On 5/03/2013, at 9:16 PM, Abhijit Chanda abhijit.chan...@gmail.com
 wrote:

 Yes you can , you just have to use CQL3 and 1.1.10 onward cassandra
 supports CQL3.  Just you have to aware of the fact that a column family
 that contains a counter column can only contain counters. In other other
 words either all the columns of the column family excluding KEY have the
 counter type or none of them can have it.

 Best Regards,
 --
 Abhijit Chanda
 +91-974395





-- 
Abhijit Chanda
+91-974395


Re: UnavailableException() for keyspace

2013-02-20 Thread Abhijit Chanda
It looks like some keyspace creation issue. Can you paste the keyspace
creation schema?


On Wed, Feb 20, 2013 at 9:09 AM, Marcelo Elias Del Valle mvall...@gmail.com
 wrote:

 Hello,

 I have a cluster with 3 nodes, all of them configured as seeds and
 with correct listen_addess. If I run nodetool ring on any of the nodes, it
 seems ok:
 *$ nodetool ring*
 *Address DC  RackStatus State   Load
  Effective-Ownership Token   *
 *
113427455640312821154458202477256070485 *
 *10.84.65.108us-east 1b  Up Normal  69.46 KB
  0.00%   0   *
 *10.76.82.94 us-east 1b  Up Normal  61.39 KB
  0.00%   56713727820156410577229101238628035242  *
 *10.242.139.188  us-east 1b  Up Normal  65.71 KB
  0.00%   113427455640312821154458202477256070485 *

 However, in any of the nodes, if I connect to cassandra-cli and try to
 list a CF, I get unavailableException:

 *[default@unknown] use dmp_input;
 *
 *[default@dmp_input] list user;*
 *Using default limit of 100*
 *Using default column limit of 100*
 *null*
 *UnavailableException()*
 * at
 org.apache.cassandra.thrift.Cassandra$get_range_slices_result.read(Cassandra.java:12441)
 *
 * at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)*
 * at
 org.apache.cassandra.thrift.Cassandra$Client.recv_get_range_slices(Cassandra.java:696)
 *
 * at
 org.apache.cassandra.thrift.Cassandra$Client.get_range_slices(Cassandra.java:680)
 *
 * at org.apache.cassandra.cli.CliClient.executeList(CliClient.java:1425)*
 * at
 org.apache.cassandra.cli.CliClient.executeCLIStatement(CliClient.java:273)
 *
 * at
 org.apache.cassandra.cli.CliMain.processStatementInteractive(CliMain.java:219)
 *
 * at org.apache.cassandra.cli.CliMain.main(CliMain.java:346)*

 Any hint what I could be doing wrong and what to look for?

  I created the keyspace with NetworkTopologyStrategy and I am using
 Ec2Snitch.

 Thanks in advance.

 Best regards,
 --
 Marcelo Elias Del Valle
 http://mvalle.com - @mvallebr




-- 
Abhijit Chanda
+91-974395


Re: NPE in running ClientOnlyExample

2013-02-18 Thread Abhijit Chanda
I hope you have already gone through this link *
https://github.com/zznate/hector-examples*. If not will suggest you to go
through, and you can also refer
http://hector-client.github.com/hector/build/html/documentation.html.


Best Regards,


On Mon, Feb 18, 2013 at 12:15 AM, Jain Rahul ja...@ivycomptech.com wrote:

 Thanks Edward,

 My Bad. I was confused as It does seems to create keyspace also, As I
 understand (although i'm not sure)

ListCfDef cfDefList = new ArrayListCfDef();
 CfDef columnFamily = new CfDef(KEYSPACE, COLUMN_FAMILY);
 cfDefList.add(columnFamily);
 try
 {
 client.system_add_keyspace(new KsDef(KEYSPACE,
 org.apache.cassandra.locator.SimpleStrategy, 1, cfDefList));
 int magnitude = client.describe_ring(KEYSPACE).size();

 Can I request you to please point me to some examples with I can start. I
 try to see some example from hector but it does seems to be in-line with
 Cassandra's 1.1 version.

 Regards,
 Rahul


 -Original Message-
 From: Edward Capriolo [mailto:edlinuxg...@gmail.com]
 Sent: 17 February 2013 21:49
 To: user@cassandra.apache.org
 Subject: Re: NPE in running ClientOnlyExample

 This is a bad example to follow. This is the internal client the Cassandra
 nodes use to talk to each other (fat client) usually you do not use this
 unless you want to write some embedded code on the Cassandra server.

 Typically clients use thrift/native transport. But you are likely getting
 the error you are seeing because the keyspace or column family is not
 created yet.

 On Sat, Feb 16, 2013 at 11:41 PM, Jain Rahul ja...@ivycomptech.com
 wrote:
  Hi All,
 
 
 
  I am newbie to Cassandra and trying to run an example program
  ClientOnlyExample  taken from
 
 https://raw.github.com/apache/cassandra/cassandra-1.2/examples/client_only/src/ClientOnlyExample.java
 .
  But while executing  the program it gives me a null pointer exception.
  Can you guys please help me out what I am missing.
 
 
 
  I am using Cassandra 1.2.1 version. I have pasted the logs at
  http://pastebin.com/pmADWCYe
 
 
 
  Exception in thread main java.lang.NullPointerException
 
at
  org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:71)
 
at
  org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:66)
 
at
  org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:61)
 
at
  org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:56)
 
at org.apache.cassandra.db.RowMutation.add(RowMutation.java:183)
 
at org.apache.cassandra.db.RowMutation.add(RowMutation.java:204)
 
at ClientOnlyExample.testWriting(ClientOnlyExample.java:78)
 
at ClientOnlyExample.main(ClientOnlyExample.java:135)
 
 
 
  Regards,
 
  Rahul
 
  This email and any attachments are confidential, and may be legally
  privileged and protected by copyright. If you are not the intended
  recipient dissemination or copying of this email is prohibited. If you
  have received this in error, please notify the sender by replying by
  email and then delete the email completely from your system. Any views
  or opinions are solely those of the sender. This communication is not
  intended to form a binding contract unless expressly indicated to the
 contrary and properly authorised.
  Any actions taken on the basis of this email are at the recipient's
  own risk.
 This email and any attachments are confidential, and may be legally
 privileged and protected by copyright. If you are not the intended
 recipient dissemination or copying of this email is prohibited. If you have
 received this in error, please notify the sender by replying by email and
 then delete the email completely from your system. Any views or opinions
 are solely those of the sender. This communication is not intended to form
 a binding contract unless expressly indicated to the contrary and properly
 authorised. Any actions taken on the basis of this email are at the
 recipient's own risk.




-- 
Abhijit Chanda
+91-974395


Re: cassandra error: Line 1 = Keyspace names must be case-insensitively unique (usertable conflicts with usertable)

2013-02-14 Thread Abhijit Chanda
On Thu, Feb 14, 2013 at 1:36 PM, Muntasir Raihan Rahman 
muntasir.rai...@gmail.com wrote:

 Hi,

 I am trying to run cassandra on a 10 node cluster. But I keep getting this
 error: Line 1 = Keyspace names must be case-insensitively unique
 (usertable conflicts with usertable).


*When are you getting this error? I mean in which sort of operation *


 I checked the database, and I only have one keyspace named usertable

 Can anyone please suggest what's going on?

 Thanks
 Muntasir.

 --
 Best Regards
 Muntasir Raihan Rahman
 Email: muntasir.rai...@gmail.com
 Phone: 1-217-979-9307
 Department of Computer Science,
 University of Illinois Urbana Champaign,
 3111 Siebel Center,
 201 N. Goodwin Avenue,
 Urbana, IL  61801




-- 
Abhijit Chanda
+91-974395


Re: Accessing Metadata of Column Familes

2013-01-27 Thread Abhijit Chanda
Just use DESCRIBE command  in cqlsh. Refer to this link
http://www.datastax.com/docs/1.1/references/cql/DESCRIBE


On Mon, Jan 28, 2013 at 12:24 PM, Harshvardhan Ojha 
harshvardhan.o...@makemytrip.com wrote:

  Which API are you using?

 If you are using Hector use ColumnFamilyDefinition.



 Regards

 Harshvardhan OJha



 *From:* Rishabh Agrawal [mailto:rishabh.agra...@impetus.co.in]
 *Sent:* Monday, January 28, 2013 12:16 PM
 *To:* user@cassandra.apache.org
 *Subject:* Accessing Metadata of Column Familes



 Hello,



 I wish to access metadata information on column families. How can I do it?
 Any ideas?



 Thanks and Regards

 Rishabh Agrawal




  --







 NOTE: This message may contain information that is confidential,
 proprietary, privileged or otherwise protected by law. The message is
 intended solely for the named addressee. If received in error, please
 destroy and notify the sender. Any use of this email is prohibited when
 received in error. Impetus does not represent, warrant and/or guarantee,
 that the integrity of this communication has been maintained nor that the
 communication is free of errors, virus, interception or interference.
  The contents of this email, including the attachments, are *PRIVILEGED
 AND CONFIDENTIAL* to the intended recipient at the email address to which
 it has been addressed. If you receive it in error, please notify the sender
 immediately by return email and then permanently delete it from your
 system. The unauthorized use, distribution, copying or alteration of this
 email, including the attachments, is strictly forbidden. Please note that
 neither MakeMyTrip nor the sender accepts any responsibility for viruses
 and it is your responsibility to scan the email and attachments (if any).
 No contracts may be concluded on behalf of *MakeMyTrip* by means of email
 communications.




-- 
Abhijit Chanda
+91-974395


Re: rpc_timeout exception while inserting

2012-12-18 Thread Abhijit Chanda
I was trying to mix CQL2 and CQL3 to check whether a columnfamily with
compound keys can be further indexed. Because using CQL3 secondary indexing
on table with composite PRIMARY KEY is not possible. And surprisingly by
mixing the CQL versions i was able to do so. But when i want to insert
anything in the column family it gives me a rpc_timeout exception. I
personally found it quite abnormal, so thought of posting this thing in
forum.


Best,

On Mon, Dec 10, 2012 at 6:29 PM, Sylvain Lebresne sylv...@datastax.comwrote:

 On Mon, Dec 10, 2012 at 12:36 PM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Hi All,

 I have a column family which structure is

 CREATE TABLE practice (
   id text,
   name text,
   addr text,
   pin text,
   PRIMARY KEY (id, name)
 ) WITH
   comment='' AND
   caching='KEYS_ONLY' AND
   read_repair_chance=0.10 AND
   gc_grace_seconds=864000 AND
   replicate_on_write='true' AND
   compaction_strategy_class='SizeTieredCompactionStrategy' AND
   compression_parameters:sstable_compression='SnappyCompressor';

 CREATE INDEX idx_address ON practice (addr);

 Initially i have made the column family using CQL 3.0.0. Then for
 creating the index i have used CQL 2.0.

 Now when want to insert any data in the column family it always shows  a
 timeout exception.
 INSERT INTO practice (id, name, addr,pin) VALUES (
 '1','AB','kolkata','700052');
 Request did not complete within rpc_timeout.



 Please suggest me where i am getting wrong?


 That would be creating the index through CQL 2. Why did you use CQL 3 for
 the CF creation
 and CQL 2 for the index one? If you do both in CQL 3, that should work as
 expected.

 That being said, you should probably not get timeouts (that won't do what
 you want though).
 If you look at the server log, do you have an exception there?

 --
 Sylvain




-- 
Abhijit Chanda
Analyst
VeHere Interactive Pvt. Ltd.
+91-974395


Re: Data stax community

2012-09-19 Thread Abhijit Chanda
You better ask this question
http://www.datastax.com/support-forums/forum/datastax-enterprise there. Any
ways as far as i am concern it should not be problematic thing.

Regards,
Abhijit

On Thu, Sep 20, 2012 at 12:07 AM, Marcelo Elias Del Valle 
mvall...@gmail.com wrote:

 Not sure if this question should be asked in this list, if this is the
 wrong place to ask this, please tell me.

 Does anyone know if Data Stax community edition alows us to run in
 production? I plan to use the enterprise edition later, but for now even
 for production I am thinking in using community version.

 --
 Marcelo Elias Del Valle
 http://mvalle.com - @mvallebr




-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395


Re: change cluster name

2012-08-08 Thread Abhijit Chanda
If you have used the above commands then i guess problem lies in this step.
[default@system] set LocationInfo[utf8('L')][utf8('*Test
Cluster*')]=utf8('Jokefire
Cluster');

It should be like this:  set LocationInfo[utf8('L')][utf8('Cluster
Name')]=utf8('Jokefire Cluster');


Re: change cluster name

2012-08-08 Thread Abhijit Chanda
Hey Tim,

Can you  repeat these steps as given below? I guess now  you are missing
step no 6.

Start the Cassandra-cli connected  to your node.
Run the following:

   1. use system;
   2. set LocationInfo[utf8('L')][utf8('ClusterName')]=utf8('Brisk
   Cluster');
   3. exit;
   4. Run nodetool flush on this node.
   5. Update the cassandra.yaml file for the cluster_name
   6. Restart the node.

Check whether everything is fine or not. If not then delete the files in
your system keyspace folder except files like Schema*.*. Every time you
start cassandra node, it will compare the value between the one in system
keyspace and the one in you configuration file, if they're not equal,
you'll get an error. And please don't forget to keep the backup before
deletion if anything goes wrong.

Hope this will help you

Abhijit


Re: Error starting cassandra node

2012-08-07 Thread Abhijit Chanda
Perform these steps on each node:
Start the Cassandra-cli connected  to your node.
Run the following:

   1. use system;
   2. set LocationInfo[utf8('L')][utf8('ClusterName')]=utf8('Brisk
   Cluster');
   3. exit;
   4. Run nodetool flush on this node.
   5. Update the cassandra.yaml file for the cluster_name
   6. Restart the node.

Don't forget to kept the the default cluster name Test Cluster  while
performing the initial operations

Regards,
Abhijit


Re: change cluster name

2012-08-07 Thread Abhijit Chanda
have you flushed the node using NODETOOL after renaming the cluster?


Re: Got exception running Sqoop: org.apache.cassandra.db.marshal.MarshalException: 97 is not recognized as a valid type, while importing data from mysql to cassandra using sqoop

2012-08-03 Thread Abhijit Chanda
Hey Rajesh,
For better response put this question in Datastax support forum *
http://www.datastax.com/support-forums/forum/datastax-enterprise*

Regards,
Abhijit


Re: Creating counter columns in cassandra

2012-07-29 Thread Abhijit Chanda
There should be at least one = (equals) in the WHERE case on key or
secondary index column, this is the Cassandra limitation.


Re: Creating counter columns in cassandra

2012-07-26 Thread Abhijit Chanda
You can check Astyanax API
https://github.com/Netflix/astyanax/blob/5c05d118e22eef541a7a201adf7c1c610da13f5b/src/test/java/com/netflix/astyanax/thrift/ThrifeKeyspaceImplTest.java
There are some counter column example which will surely help you.


filtered value count

2012-07-25 Thread Abhijit Chanda
Hi All,

Can any one suggest me how to retrieve the result count after multiple
filtration operations performed on multiple column families something
similar like join query result count in normal RDBMS.   I guess its not
possible in Cassandra, still asking? Or any other alternative to do the same

Regards,
Abhijit


cql 3.0.0

2012-07-02 Thread Abhijit Chanda
Hi All,I am using cassandra 1.0.8. How can i use cql 3.0.0 in this?


-- 
Abhijit Chanda
Analyst
VeHere Interactive Pvt. Ltd.
+91-974395


Re: No indexed columns present in by-columns clause with equals operator

2012-07-01 Thread Abhijit Chanda
Hey Aaron,

I am able to sort out the problem. Thanks anyways.

Regards,
Abhijit


No indexed columns present in by-columns clause with equals operator

2012-06-28 Thread Abhijit Chanda
Hi All,
I have got a strange exception while using cassandra cql. Relational
operators like (, , =, =) are not working.
my columnfamily looks like this.
CREATE COLUMNFAMILY STEST (
  ROW_KEY text PRIMARY KEY,
  VALUE1 text,
  VALUE2 text
) WITH
  comment='' AND
  comparator=text AND
  read_repair_chance=0.10 AND
  gc_grace_seconds=864000 AND
  default_validation=text AND
  min_compaction_threshold=4 AND
  max_compaction_threshold=32 AND
  replicate_on_write=True;

CREATE INDEX VALUE1_IDX ON STEST (VALUE1);

CREATE INDEX VALUE2_IDX ON STEST (VALUE2);


Now in this columnfamily if i query this
SELECT * FROM STEST WHERE VALUE1 = 10; it returns -
 ROW_KEY | VALUE1 | VALUE2
 -+-+
2 | 10 | AB

But if i query like this
SELECT * FROM STEST WHERE VALUE1  10;
It is showing this exception
Bad Request: No indexed columns present in by-columns clause with equals
operator
Same with other relational operators(,=,=)

these are  the datas available in my columnfamily
ROW_KEY | VALUE1 | VALUE2
+--+
  3 | 100 |ABC
  5 |9 |  ABCDE
  2 |  10 | AB
  1 |1 |  A
  4 |  19 |   ABCD

Looks like some configuration problem. Please help me. Thanks in Advance




Regards,
-- 
Abhijit Chanda
Analyst
VeHere Interactive Pvt. Ltd.
+91-974395


Re: Setting up a cluster

2012-06-18 Thread Abhijit Chanda
Are you sure all your settings are perfect. If so, then plz follow this
steps

./nodetool disablethrift
./nodetool disablegossip
./nodetool drain

stop the service and then delete the all data, saved_caches and commitlog
files. Then restart your service.
Repeat these steps for all the nodes. I hope it will work.

Regards,
-- 
Abhijit Chanda
VeHere Interactive Pvt. Ltd.
+91-974395


portability between enterprise and community version

2012-06-13 Thread Abhijit Chanda
Hi All,

Is it possible to communicate from a  datastax enterprise edition to
datastax community edition.
Actually i want to set one of my node in linux box and other in windows.
Please suggest.


With Regards,
-- 
Abhijit Chanda
VeHere Interactive Pvt. Ltd.
+91-974395


Re: portability between enterprise and community version

2012-06-13 Thread Abhijit Chanda
Hi Viktor Jevadokimov,

May i know what are the issues i may face if i mix windows cluster along
with linux cluster.


Regards,
-- 
Abhijit Chanda
VeHere Interactive Pvt. Ltd.
+91-974395


Re: portability between enterprise and community version

2012-06-13 Thread Abhijit Chanda
Hi Sasha, Viktor,

In my case i have a project in which both java and .NET modules are there.
For Java i m using Astyanax API and for .NET Fluent Cassandra. I am using
DSE 2.1 for development purpose as i need partial searching in some of
queries, which i m doing with the help of solr which is integrated in DSE
latest versions.  And this is working fine for all the Java modules, but i
want the same for .NET modules also. Thats why i was looking for a mixed
environment.
Finally i want to ask whether i am moving in the right direction or not?
please suggest.

Thanks,
-- 
Abhijit Chanda
VeHere Interactive Pvt. Ltd.
+91-974395


Re: portability between enterprise and community version

2012-06-13 Thread Abhijit Chanda
Viktor,

For .NET currently i am using Datastax Community version as DSE can't be
installed in windows. And due to absence of DSE i m not able to use solr as
an integrated part of Datastax. Thats why i was looking for the mixed
environment so that i can use the features of DSE.

Thanks,
-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395


Re: how to create keyspace using cassandra API's

2012-06-06 Thread Abhijit Chanda
U can use Astyanax API. These sort minor issues are resolved in that API.

Regards,
Abhijit


project setup in asp.net Fluent Cassandra

2012-05-28 Thread Abhijit Chanda
Hi All,

Right now i am trying to use Fluent Cassandra API for development in asp.net
.
For the same purpose i have downloaded the same source from github. But
every time i add a new reference *fluentcassandra.dll*, i am unable to use
it
in my code. I am not able figure it out why this is happening? Any one has
any
clue.

Thanks In Advance,
Abhijit


Error loading data: Internal error processing get_range_slices / Unavailable Exception

2012-05-23 Thread Abhijit Chanda
Hi All,
i am facing problem while setting up my database. The error under mentioned
is reflected every time i try to
setup the DB. Unable to understand why these are occurring?  though
previously it was working fine, i guess
it is some connection related issues.

UnknownException: [host=192.168.2.13(192.168.2.13):9160, latency=11(31),
attempts=1] SchemaDisagreementException()
NoAvailableHostsException: [host=None(0.0.0.0):0, latency=0(0), attempts=0]
No hosts to borrow from
Describe Keyspace: vCRIME
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=10002(10002), attempts=1] TimedOutException()
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=10001(10001), attempts=1] TimedOutException()
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=1(1), attempts=1] TimedOutException()
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=10001(10001), attempts=1] TimedOutException()
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=10001(10001), attempts=1] TimedOutException()
OperationTimeoutException: [host=192.168.2.13(192.168.2.13):9160,
latency=10001(10001), attempts=1] TimedOutException()
TokenRangeOfflineException: [host=192.168.2.13(192.168.2.13):9160,
latency=2(2), attempts=1] UnavailableException()
TokenRangeOfflineException: [host=192.168.2.13(192.168.2.13):9160,
latency=2(2), attempts=1] UnavailableException()
TokenRangeOfflineException: [host=192.168.2.13(192.168.2.13):9160,
latency=2(2), attempts=1] UnavailableException()
TokenRangeOfflineException: [host=192.168.2.13(192.168.2.13):9160,
latency=2(2), attempts=1] UnavailableException()
TokenRangeOfflineException: [host=192.168.2.13(192.168.2.13):9160,
latency=2(2), attempts=1] UnavailableException()

Regards,
Abhijit


Re: Astyanax Error

2012-05-22 Thread Abhijit Chanda
Samal,


But I am setting up the Host.

On Tue, May 22, 2012 at 5:30 PM, samal samalgo...@gmail.com wrote:

 Host not found in client.
 On 22-May-2012 4:34 PM, Abhijit Chanda abhijit.chan...@gmail.com
 wrote:

 Hi All,

 Can any one suggest me why i am getting this error in Astyanax
 NoAvailableHostsException: [host=None(0.0.0.0):0, latency=0(0),
 attempts=0] No hosts to borrow from


 Thanks In Advance
 Abhijit




-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395


Re: Composite Column

2012-05-17 Thread Abhijit Chanda
Samal,

Thanks buddy for interpreting. Now suppose i am inserting data in a column
family using this data model dynamically, as a result columnNames will be
dynamic. Now consider there is a entry for *employee1* *name*d Smith, and
i want to retrieve that value?

Regards,
Abhijit

On Thu, May 17, 2012 at 12:03 PM, samal samalgo...@gmail.com wrote:

 It is like using your super column inside columns name.

 empKey{
   employee1+name:XX,
   employee1+addr:X,
   employee2+name:X,
   employee2+addr:X
 }

 Here all of your employee details are attached to one domain i.e. all of
 employee1 details will be *employee1+[anytihng.n numbers of
 column]*

 comaprator=CompositeType(UTF8Type1,UTF8Type2,...,n)

 /Samal

 On Thu, May 17, 2012 at 10:40 AM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Aaron,

 Actually Aaron i am looking for a scenario on super columns being
 replaced by composite column.
 Say this is a data model using super column
 rowKey{
   superKey1 {
 Name,
 Address,
 City,.
   }
 }

 Actually i am having confusion how exactly the data model will look if we
 use composite column instead of super column.

 Thanks,
 Abhijit



 On Wed, May 16, 2012 at 2:56 PM, aaron morton aa...@thelastpickle.comwrote:

 Abhijit,
 Can you explain the data model a bit more.

 Cheers

   -
 Aaron Morton
 Freelance Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 15/05/2012, at 10:32 PM, samal wrote:

 It is just column with JSON value

 On Tue, May 15, 2012 at 4:00 PM, samal samalgo...@gmail.com wrote:

 I have not used CC but yes you can.
 Below is not composite column. It is not not column with JSON hash
 value. Column value can be anything you like.
 date inside value are not indexed.


 On Tue, May 15, 2012 at 9:27 AM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Is it possible to create this data model with the help of composite
 column.

 User_Keys_By_Last_Name = {
   Engineering : {anderson, 1 : ac1263, anderson, 2 : 724f02, 
 ... },
   Sales : { adams, 1 : b32704, alden, 1 : 1553bd, ... },
 }

 I am using Astyanax. Please suggest...
 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395







 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395





-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395


Re: Composite Column

2012-05-16 Thread Abhijit Chanda
Aaron,

Actually Aaron i am looking for a scenario on super columns being replaced
by composite column.
Say this is a data model using super column
rowKey{
  superKey1 {
Name,
Address,
City,.
  }
}

Actually i am having confusion how exactly the data model will look if we
use composite column instead of super column.

Thanks,
Abhijit


On Wed, May 16, 2012 at 2:56 PM, aaron morton aa...@thelastpickle.comwrote:

 Abhijit,
 Can you explain the data model a bit more.

 Cheers

 -
 Aaron Morton
 Freelance Developer
 @aaronmorton
 http://www.thelastpickle.com

 On 15/05/2012, at 10:32 PM, samal wrote:

 It is just column with JSON value

 On Tue, May 15, 2012 at 4:00 PM, samal samalgo...@gmail.com wrote:

 I have not used CC but yes you can.
 Below is not composite column. It is not not column with JSON hash value.
 Column value can be anything you like.
 date inside value are not indexed.


 On Tue, May 15, 2012 at 9:27 AM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Is it possible to create this data model with the help of composite
 column.

 User_Keys_By_Last_Name = {
   Engineering : {anderson, 1 : ac1263, anderson, 2 : 724f02, ... 
 },
   Sales : { adams, 1 : b32704, alden, 1 : 1553bd, ... },
 }

 I am using Astyanax. Please suggest...
 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395







-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395


Re: How can I implement 'LIKE operation in SQL' on values while querying a column family in Cassandra

2012-05-15 Thread Abhijit Chanda
Tamar,

Can you please illustrate little bit with some sample code. It highly
appreciable.

Thanks,

On Tue, May 15, 2012 at 10:48 AM, Tamar Fraenkel ta...@tok-media.comwrote:

 I don't think this is possible, the best you can do is prefix, if your
 order is alphabetical. For example I have a CF with comparator UTF8Type,
 and then I can do slice query and bring all columns that start with the
 prefix, and end with the prefix where you replace the last char with the
 next one in order (i.e. aaa-aab).

 Hope that helps.

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 7:56 AM, Abhijit Chanda abhijit.chan...@gmail.com
  wrote:

 I don't know the exact value on a column, but I want to do a partial
 matching to know all available values that matches.
 I want to do similar kind of operation that LIKE operator in SQL do.
 Any help is highly appreciated.

 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395





-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395
tokLogo.png

Re: How can I implement 'LIKE operation in SQL' on values while querying a column family in Cassandra

2012-05-15 Thread Abhijit Chanda
Thanks so much Guys, specially Tamar, thank you so much man.

Regards,
Abhijit

On Tue, May 15, 2012 at 4:26 PM, Tamar Fraenkel ta...@tok-media.com wrote:

 Do you still need the sample code? I use Hector, well here is an example:
 *This is the Column Family definition:*
 (I have a composite, but if you like you can have only the UTF8Type).

 CREATE COLUMN FAMILY title_indx
 with comparator = 'CompositeType(UTF8Type,UUIDType)'
 and default_validation_class = 'UTF8Type'
 and key_validation_class = 'LongType';

 *The Query:*
 SliceQueryLong, Composite, String query =
 HFactory.createSliceQuery(CassandraHectorConn.getKeyspace(),
 LongSerializer.get(),
 CompositeSerializer.get(),
 StringSerializer.get());
 query.setColumnFamily(title_indx);
 query.setKey(...)

 Composite start = new Composite();
 start.add(prefix);
 char c = lowerCasePrefix.charAt(lastCharIndex);
 String prefixEnd =  prefix.substring(0, lastCharIndex) + ++c;
 Composite end = new Composite();
 end.add(prefixEnd);

 ColumnSliceIteratorLong, Composite, String iterator =
   new ColumnSliceIteratorLong, Composite, String(
query, start, end, false)
 while (iterator.hasNext()) {
 ...
}

 Cheers,

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 1:19 PM, samal samalgo...@gmail.com wrote:

 You cannot extract via relative column value.
 It can only extract via value if it has secondary index but exact column
 value need to match.

 as tamar suggested you can put value as column name , UTF8 comparator.

 {
 'name_abhijit'='abhijit'
 'name_abhishek'='abhiskek'
 'name_atul'='atul'
 }

 here you can do slice query on column name and get desired result.

 /samal

 On Tue, May 15, 2012 at 3:29 PM, selam selam...@gmail.com wrote:

 Mapreduce jobs may solve your problem  for batch processing


 On Tue, May 15, 2012 at 12:49 PM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Tamar,

 Can you please illustrate little bit with some sample code. It highly
 appreciable.

 Thanks,


 On Tue, May 15, 2012 at 10:48 AM, Tamar Fraenkel 
 ta...@tok-media.comwrote:

 I don't think this is possible, the best you can do is prefix, if your
 order is alphabetical. For example I have a CF with comparator UTF8Type,
 and then I can do slice query and bring all columns that start with the
 prefix, and end with the prefix where you replace the last char with
 the next one in order (i.e. aaa-aab).

 Hope that helps.

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 7:56 AM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 I don't know the exact value on a column, but I want to do a partial
 matching to know all available values that matches.
 I want to do similar kind of operation that LIKE operator in SQL do.
 Any help is highly appreciated.

 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395





 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395




 --
 Saygılar  İyi Çalışmalar
 Timu EREN ( a.k.a selam )






-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395
tokLogo.png

Re: How can I implement 'LIKE operation in SQL' on values while querying a column family in Cassandra

2012-05-15 Thread Abhijit Chanda
Sorry for the confusion Tamar. Any ways thanks dear.

Regards,
Abhijit

On Tue, May 15, 2012 at 9:36 PM, Tamar Fraenkel ta...@tok-media.com wrote:

 Actually woman ;-)

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 3:45 PM, Abhijit Chanda abhijit.chan...@gmail.com
  wrote:

 Thanks so much Guys, specially Tamar, thank you so much man.

 Regards,
 Abhijit


 On Tue, May 15, 2012 at 4:26 PM, Tamar Fraenkel ta...@tok-media.comwrote:

 Do you still need the sample code? I use Hector, well here is an example:
 *This is the Column Family definition:*
 (I have a composite, but if you like you can have only the UTF8Type).

 CREATE COLUMN FAMILY title_indx
 with comparator = 'CompositeType(UTF8Type,UUIDType)'
 and default_validation_class = 'UTF8Type'
 and key_validation_class = 'LongType';

 *The Query:*
 SliceQueryLong, Composite, String query =
 HFactory.createSliceQuery(CassandraHectorConn.getKeyspace(),
 LongSerializer.get(),
 CompositeSerializer.get(),
 StringSerializer.get());
 query.setColumnFamily(title_indx);
 query.setKey(...)

 Composite start = new Composite();
 start.add(prefix);
 char c = lowerCasePrefix.charAt(lastCharIndex);
 String prefixEnd =  prefix.substring(0, lastCharIndex) + ++c;
 Composite end = new Composite();
 end.add(prefixEnd);

 ColumnSliceIteratorLong, Composite, String iterator =
   new ColumnSliceIteratorLong, Composite, String(
query, start, end, false)
 while (iterator.hasNext()) {
 ...
}

 Cheers,

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 1:19 PM, samal samalgo...@gmail.com wrote:

 You cannot extract via relative column value.
 It can only extract via value if it has secondary index but exact
 column value need to match.

 as tamar suggested you can put value as column name , UTF8 comparator.

 {
 'name_abhijit'='abhijit'
 'name_abhishek'='abhiskek'
 'name_atul'='atul'
 }

 here you can do slice query on column name and get desired result.

 /samal

 On Tue, May 15, 2012 at 3:29 PM, selam selam...@gmail.com wrote:

 Mapreduce jobs may solve your problem  for batch processing


 On Tue, May 15, 2012 at 12:49 PM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 Tamar,

 Can you please illustrate little bit with some sample code. It highly
 appreciable.

 Thanks,


 On Tue, May 15, 2012 at 10:48 AM, Tamar Fraenkel ta...@tok-media.com
  wrote:

 I don't think this is possible, the best you can do is prefix, if
 your order is alphabetical. For example I have a CF with
 comparator UTF8Type, and then I can do slice query and bring all columns
 that start with the prefix, and end with the prefix where you replace 
 the
 last char with the next one in order (i.e. aaa-aab).

 Hope that helps.

 *Tamar Fraenkel *
 Senior Software Engineer, TOK Media

 [image: Inline image 1]

 ta...@tok-media.com
 Tel:   +972 2 6409736
 Mob:  +972 54 8356490
 Fax:   +972 2 5612956





 On Tue, May 15, 2012 at 7:56 AM, Abhijit Chanda 
 abhijit.chan...@gmail.com wrote:

 I don't know the exact value on a column, but I want to do a
 partial matching to know all available values that matches.
 I want to do similar kind of operation that LIKE operator in SQL
 do.
 Any help is highly appreciated.

 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395





 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395




 --
 Saygılar  İyi Çalışmalar
 Timu EREN ( a.k.a selam )






 --
 Abhijit Chanda
 Software Developer
 VeHere Interactive Pvt. Ltd.
 +91-974395





-- 
Abhijit Chanda
Software Developer
VeHere Interactive Pvt. Ltd.
+91-974395
tokLogo.png