How many Column Families can Cassandra handle?
I am working on a use case for Timeline series data. I have been told to create 600 column families in Cassandra. Meaning for 10 minutes, I will be having column families in Cassandra. Each second will have its own column family, so till 10 minutes which is 600 second, I will be having 600 column families... In each second, we will write into that particular second column family.. so at 10 minutes (which is 600 second), we will write into 600 second column family.. I am wondering whether Cassandra will be able to handle 600 column families or not.. Right now, I am not sure how much data each column family will have... What I know so far is write will be coming at a rate of 20,000 writes per second... Can anyone shed some light into this?
How to create multiple column families using some script?
I have to create Multiple Column Families in my keyspace. One way is to create the column families one by one.. But in my case, I have around 100 column families so I cannot do it one by one... So is there any way, I can create multiple column families through some sort of script which can create multiple column families for me in one short? create column family USER_DATA_SECOND_1 with comparator = 'UTF8Type' and key_validation_class = 'CompositeType(DateType,UTF8Type)' and default_validation_class = 'BytesType' and gc_grace = 86400 create column family USER_DATA_SECOND_2 with comparator = 'UTF8Type' and key_validation_class = 'CompositeType(DateType,UTF8Type)' and default_validation_class = 'BytesType' and gc_grace = 86400 create column family USER_DATA_SECOND_3 with comparator = 'UTF8Type' and key_validation_class = 'CompositeType(DateType,UTF8Type)' and default_validation_class = 'BytesType' and gc_grace = 86400 create column family USER_DATA_SECOND_100 with comparator = 'UTF8Type' and key_validation_class = 'CompositeType(DateType,UTF8Type)' and default_validation_class = 'BytesType' and gc_grace = 86400 And also after creating these multiple column families.. Suppose if I need to drop all these column families again then how to do that using some script again? Below is the way, I am creating the column families now from my local machine to my staging cassandra server one by one, which is not what I want.. C:\Apache Cassandra\apache-cassandra-1.2.3\bincassandra-cli -h sc-cdbhost01.vip.slc.qa.host.com Starting Cassandra Client Connected to: Staging Cluster cass01 on sc-cdbhost01.vip.slc.qa.host.com/9160 Welcome to Cassandra CLI version 1.2.3 Type 'help;' or '?' for help. Type 'quit;' or 'exit;' to quit. [default@unknown] use profileks; Authenticated to keyspace: profileks [default@profileks] create column family USER_DATA_SECOND_1 ... with comparator = 'UTF8Type' ... and key_validation_class = 'CompositeType(DateType,UTF8Type)' ... and default_validation_class = 'BytesType' ... and gc_grace = 86400; 27fe1848-c7de-3994-9289-486a9bbbf344 [default@profileks] Can anyone help me whether this is possible to create multiple column families through some sort of script and then drop those column families as well through some sort of script?
Composite Values in Cassandra Column Family?
Can we have a composite values in each columns in Cassandra Column Family? user-id column1-name 123 (Column1-Value Column1-SchemaName Column1-LastModifiedDate) userId is the rowKey here. And same thing will be for other columns as well. Each column value will contain below three things always- ByteType for Column-Value UTF8Type for Column-SchemaName DateType for LastModifiedDate If yes, can anyone help me in designing the column family for this? I will be using Astyanax client to insert into above column family.
Storing binary blobs data in Cassandra Column family?
I need to store binary byte data in Cassandra column family in all my columns. Each columns will have its own binary byte data. Below is the code where I will be getting binary byte data. My rowKey is going to be String but all my columns has to store binary blobs data. GenericDatumWriterGenericRecord writer = new GenericDatumWriterGenericRecord(schema); ByteArrayOutputStream os = new ByteArrayOutputStream(); Encoder e = EncoderFactory.get().binaryEncoder(os, null); writer.write(record, e); e.flush(); byte[] byteData = os.toByteArray(); os.close(); // write byteData in Cassandra for the columns I am not sure what should be the right way to create the Cassandra column family for the above use case? Below is the column family, I have created but I am not sure this is the right way to do that for above use case? create column family TESTING with key_validation_class = 'UTF8Type' and comparator = 'BytesType' and default_validation_class = 'UTF8Type' and gc_grace = 86400 and column_metadata = [ {column_name : 'lmd', validation_class : DateType}]; *Raihan Jamal*
Re: Cassandra column family using Composite Columns
Can anyone help me on this? Any help will be appreciated.. Thanks.. *Raihan Jamal* On Tue, Sep 17, 2013 at 4:44 PM, Raihan Jamal jamalrai...@gmail.com wrote: I am designing the Column Family for our use case in Cassandra. I am planning to go with Dynamic Column Structure. Below is my requirement per our use case- user-id column1123 (Column1-Value Column1-SchemaName LMD) For each user-id, we will be storing column1 and its value and that value will store these three things always- (Column1-Value Column1-SchemaName LMD) In my above example, I have show only one columns but it might have more columns and those columns will also follow the same concept. Now I am not sure, how to store these three things always at a column value level? Should I use composite columns at a column level? if yes, then I am not sure how to make a column family like this in Cassandra. Column1-value will be in binary, Column1-SchemaName will be String, LMD will be DateType. This is what I have so far- create column family USER_DATA with key_validation_class = 'UTF8Type' and comparator = 'UTF8Type' and default_validation_class = 'UTF8Type' and gc_grace = 86400 and column_metadata = [ {column_name : 'lmd', validation_class : DateType}]; Can anyone help me in designing the column family for this? Thanks.
Performance Difference between Cassandra version
I am trying to see whether there will be any performance difference between Cassandra 1.0.8 vs Cassandra 1.2.2 for reading the data mainly? Has anyone seen any major performance difference?
Re: How to stop Cassandra and then restart it in windows?
Hello, Can anyone provide any help on this? Thanks in advance. *Raihan Jamal* On Tue, Apr 16, 2013 at 6:50 PM, Raihan Jamal jamalrai...@gmail.com wrote: Hello, I installed single node cluster in my local dev box which is running Windows 7 and it was working fine. Due to some reason, I need to restart my desktop and then after that whenever I am doing like this on the command prompt, it always gives me the below exception- S:\Apache Cassandra\apache-cassandra-1.2.3\bincassandra -f Starting Cassandra Server Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is: java.net.BindException: Address already in use: JVM_Bind Meaning port being used somewhere. I have made some changes in *cassandra.yaml *file so I need to shutdown the Cassandra server and then restart it again. Can anybody help me with this? Thanks for the help.
How to stop Cassandra and then restart it in windows?
Hello, I installed single node cluster in my local dev box which is running Windows 7 and it was working fine. Due to some reason, I need to restart my desktop and then after that whenever I am doing like this on the command prompt, it always gives me the below exception- S:\Apache Cassandra\apache-cassandra-1.2.3\bincassandra -f Starting Cassandra Server Error: Exception thrown by the agent : java.rmi.server.ExportException: Port already in use: 7199; nested exception is: java.net.BindException: Address already in use: JVM_Bind Meaning port being used somewhere. I have made some changes in *cassandra.yaml *file so I need to shutdown the Cassandra server and then restart it again. Can anybody help me with this? Thanks for the help.
Re: Two Cluster each with 12 nodes- Cassandra database
Folks, Any thoughts on this? I am still in the learning process. So any guidance will be of great help. *Raihan Jamal* On Wed, Apr 10, 2013 at 10:39 PM, Raihan Jamal jamalrai...@gmail.comwrote: I have started working on a project in which I am using `Cassandra database`. Our production DBA's have setup `two cluster` and each cluster will have `12 nodes`. I will be using `Pelops client` to read the data from Cassandra database. Now I am thinking what's the best way to create `Cluster` using `Pelops client` like how many nodes I should add while creating cluster? My understanding was to create the cluster with all the `24 nodes` as I will be having two cluster each with 12 nodes? This is the right approach? *If not, then how we decide what nodes (from each cluster) I should add while creating the cluster using Pelops client? * String[] nodes = cfg.getStringArray(cassandra.servers); int port = cfg.getInt(cassandra.port); boolean dynamicND = true; // dynamic node discovery Config casconf = new Config(port, true, 0); Cluster cluster = new Cluster(nodes, casconf, dynamicND); Pelops.addPool(Const.CASSANDRA_POOL, cluster, Const.CASSANDRA_KS); Can anyone help me out with this? Any help will be appreciated. **
Two Cluster each with 12 nodes- Cassandra database
I have started working on a project in which I am using `Cassandra database`. Our production DBA's have setup `two cluster` and each cluster will have `12 nodes`. I will be using `Pelops client` to read the data from Cassandra database. Now I am thinking what's the best way to create `Cluster` using `Pelops client` like how many nodes I should add while creating cluster? My understanding was to create the cluster with all the `24 nodes` as I will be having two cluster each with 12 nodes? This is the right approach? *If not, then how we decide what nodes (from each cluster) I should add while creating the cluster using Pelops client? * String[] nodes = cfg.getStringArray(cassandra.servers); int port = cfg.getInt(cassandra.port); boolean dynamicND = true; // dynamic node discovery Config casconf = new Config(port, true, 0); Cluster cluster = new Cluster(nodes, casconf, dynamicND); Pelops.addPool(Const.CASSANDRA_POOL, cluster, Const.CASSANDRA_KS); Can anyone help me out with this? Any help will be appreciated. **