Re: Which of these VPS configurations would perform better for Cassandra ?
okay, so what should a workable VPS configuration to start with & minimum how many nodes to start with(2 ok?) ? Seriously I cannot afford the tensions of colocation setup. My hosting provider provides SSD drives with KVM virtualization.
Re: What is be the best possible client option available to a PHP developer for implementing an application ready for production environments ?
Hey Brandon, 1. ) Is it devloped to the level in order to support all the necessary features to take full advantage of Cassandra? 2. ) Is it used in production by anyone ? 3. ) What are its limitations? Thanks. On Tue, Jan 18, 2011 at 7:11 AM, Brandon Williams wrote: > On Mon, Jan 17, 2011 at 7:22 PM, Ertio Lew wrote: >> >> What would be the best client option to go with in order to use > > Pycassa. https://github.com/thobbs/pycassa > >> >> Cassandra through an application to be implemented in PHP. > > Oh. Then https://github.com/thobbs/phpcassa > -Brandon
Re: Is there any way I could use keys of other rows as column names that could be sorted according to time ?
I am not sure but I guess because all the rows of certain time range will go to just one node & will not be evenly distributed because the timeUUID will not be random but sequential according to time... I am not sure anyways... On Fri, Jan 14, 2011 at 7:18 PM, Roshan Dawrani wrote: > On Fri, Jan 14, 2011 at 7:15 PM, Aklin_81 wrote: > >> @Roshan >> Yes, I thought about that, but then I wouldn't be able to use the >> Random Partitioner. >> >> > Can you please expand a bit on this? What is this restriction? Can you > point me to some relevant documentation on this? > > Thanks. > > <#12d84d3a0b3ce961_12d84c9312ae2134_> > <#12d84d3a0b3ce961_12d84c9312ae2134_> > <#12d84d3a0b3ce961_12d84c9312ae2134_> > <#12d84d3a0b3ce961_12d84c9312ae2134_> >
Re: quick question about super columns
Thanks. got it! On Sat, Jan 8, 2011 at 9:44 PM, Tyler Hobbs wrote: > A couple of alternatives off the top of my head: > > 1) A row of supercolumns becomes a row of standard columns with compound > column names. > > 2) A row of N supercolumns becomes N rows of standard columns (with compound > keys if needed); a separate timeline or index replaces the super column > names. > > There might be other data models that work for a specific case, as well. > > - Tyler > > On Sat, Jan 8, 2011 at 3:38 AM, Rajkumar Gupta > wrote: >> >> Thanks Tyler & Stu, >> >> Tyler, as the alternatives for large no of subcolumns in a >> supercolumn, what do you suggest ? Like splitting up a >> 'supercolumnFamily' into several 'columnfamilies' ?? What else ? >> >> >> On Sat, Jan 8, 2011 at 2:33 PM, Stu Hood wrote: >> > Raj: the super column indexing is a longstanding issue that we've been >> > considering recently, and would like to fix. >> > See https://issues.apache.org/jira/browse/CASSANDRA-674 >> > >> > On Fri, Jan 7, 2011 at 10:53 PM, Tyler Hobbs wrote: >> >> >> >> Not that I'm aware of. There are several other decent alternatives to >> >> large amounts of subcolumns in a supercolumn, so I don't think it's a >> >> high >> >> priority. >> >> >> >> - Tyler >> >> >> >> On Fri, Jan 7, 2011 at 9:59 PM, Rajkumar Gupta >> >> wrote: >> >>> >> >>> Hey Tyler, >> >>> >> >>> Is this limitation of supercolumns going to be removed anytime sooner >> >>> ? >> >>> >> >>> Raj >> >>> >> >>> On Fri, Jan 7, 2011 at 8:51 PM, Tyler Hobbs wrote: >> >>> > An important bit to read about supercolumn limitations: >> >>> > http://www.riptano.com/docs/0.6/data_model/supercolumns#limitations >> >>> > >> >>> > Don't make supercolumns with a huge number of subcolumns (or a few >> >>> > really >> >>> > large subcolumns) unless you plan to always read all of them at >> >>> > once. >> >>> > >> >>> > - Tyler >> >>> > >> >>> > On Fri, Jan 7, 2011 at 1:27 AM, Arijit Mukherjee >> >>> > >> >>> > wrote: >> >>> >> >> >>> >> Thanx to both of you. I can now go ahead a bit more. >> >>> >> >> >>> >> Arijit >> >>> >> >> >>> >> On 7 January 2011 12:53, Narendra Sharma >> >>> >> >> >>> >> wrote: >> >>> >> > With raw thrift APIs: >> >>> >> > >> >>> >> > 1. Fetch column from supercolumn: >> >>> >> > >> >>> >> > ColumnPath cp = new ColumnPath("ColumnFamily"); >> >>> >> > cp.setSuper_column("SuperColumnName"); >> >>> >> > cp.setColumn("ColumnName"); >> >>> >> > ColumnOrSuperColumn resp = client.get(getByteBuffer("RowKey"), >> >>> >> > cp, >> >>> >> > ConsistencyLevel.ONE); >> >>> >> > Column c = resp.getColumn(); >> >>> >> > >> >>> >> > 2. Add a new supercolumn: >> >>> >> > >> >>> >> > SuperColumn superColumn = new SuperColumn(); >> >>> >> > superColumn.setName(getBytes("SuperColumnName")); >> >>> >> > cols = new ArrayList(); >> >>> >> > Column c = new Column(); >> >>> >> > c.setName(name); >> >>> >> > c.setValue(value); >> >>> >> > c.setTimestamp(timeStamp); >> >>> >> > cols.add(c); >> >>> >> > //repeat above 5 lines for as many cols you want in >> >>> >> > supercolumn >> >>> >> > superColumn.setColumns(cols); >> >>> >> > >> >>> >> > >> >>> >> > List mutations = new ArrayList(); >> >>> >> > ColumnOrSuperColumn csc = new ColumnOrSuperColumn(); >> >>> >> > csc.setSuper_column(superColumn); >> >>> >&g
Re: quick question about super columns
Thanks Tyler & Stu, Tyler, as the alternatives for large no of subcolumns in a supercolumn, what do you suggest ? Like splitting up a 'supercolumnFamily' into several 'columnfamilies' ?? What else ? On Sat, Jan 8, 2011 at 2:33 PM, Stu Hood wrote: > Raj: the super column indexing is a longstanding issue that we've been > considering recently, and would like to fix. > See https://issues.apache.org/jira/browse/CASSANDRA-674 > > On Fri, Jan 7, 2011 at 10:53 PM, Tyler Hobbs wrote: >> >> Not that I'm aware of. There are several other decent alternatives to >> large amounts of subcolumns in a supercolumn, so I don't think it's a high >> priority. >> >> - Tyler >> >> On Fri, Jan 7, 2011 at 9:59 PM, Rajkumar Gupta >> wrote: >>> >>> Hey Tyler, >>> >>> Is this limitation of supercolumns going to be removed anytime sooner ? >>> >>> Raj >>> >>> On Fri, Jan 7, 2011 at 8:51 PM, Tyler Hobbs wrote: >>> > An important bit to read about supercolumn limitations: >>> > http://www.riptano.com/docs/0.6/data_model/supercolumns#limitations >>> > >>> > Don't make supercolumns with a huge number of subcolumns (or a few >>> > really >>> > large subcolumns) unless you plan to always read all of them at once. >>> > >>> > - Tyler >>> > >>> > On Fri, Jan 7, 2011 at 1:27 AM, Arijit Mukherjee >>> > wrote: >>> >> >>> >> Thanx to both of you. I can now go ahead a bit more. >>> >> >>> >> Arijit >>> >> >>> >> On 7 January 2011 12:53, Narendra Sharma >>> >> wrote: >>> >> > With raw thrift APIs: >>> >> > >>> >> > 1. Fetch column from supercolumn: >>> >> > >>> >> > ColumnPath cp = new ColumnPath("ColumnFamily"); >>> >> > cp.setSuper_column("SuperColumnName"); >>> >> > cp.setColumn("ColumnName"); >>> >> > ColumnOrSuperColumn resp = client.get(getByteBuffer("RowKey"), cp, >>> >> > ConsistencyLevel.ONE); >>> >> > Column c = resp.getColumn(); >>> >> > >>> >> > 2. Add a new supercolumn: >>> >> > >>> >> > SuperColumn superColumn = new SuperColumn(); >>> >> > superColumn.setName(getBytes("SuperColumnName")); >>> >> > cols = new ArrayList(); >>> >> > Column c = new Column(); >>> >> > c.setName(name); >>> >> > c.setValue(value); >>> >> > c.setTimestamp(timeStamp); >>> >> > cols.add(c); >>> >> > //repeat above 5 lines for as many cols you want in supercolumn >>> >> > superColumn.setColumns(cols); >>> >> > >>> >> > >>> >> > List mutations = new ArrayList(); >>> >> > ColumnOrSuperColumn csc = new ColumnOrSuperColumn(); >>> >> > csc.setSuper_column(superColumn); >>> >> > csc.setSuper_columnIsSet(true); >>> >> > Mutation m = new Mutation(); >>> >> > m.setColumn_or_supercolumn(csc); >>> >> > m.setColumn_or_supercolumnIsSet(true); >>> >> > mutations.add(m); >>> >> > >>> >> > >>> >> > Map> allMutations = new HashMap>> >> > List>(); >>> >> > allMutations.put("ColumnFamilyName", mutations); >>> >> > Map>> mutationMap = new >>> >> > HashMap>>(); >>> >> > mutationMap.put(getByteBuffer("RowKey"), mutations); >>> >> > client.batch_mutate(mutationMap, ConsistencyLevel.ONE); >>> >> > >>> >> > HTH! >>> >> > >>> >> > Thanks, >>> >> > Naren >>> >> > >>> >> > >>> >> > >>> >> > On Thu, Jan 6, 2011 at 10:42 PM, Arijit Mukherjee >>> >> > >>> >> > wrote: >>> >> >> >>> >> >> Thank you. And is it similar if I want to search a subcolumn within >>> >> >> a >>> >> >> given supercolumn? I mean I have the supercolumn key and the >>> &
Re: Is this a good schema design to implement a social application..
In the twissandra example, http://www.riptano.com/docs/0.6/data_model/twissandra#adding-friends , I find that they have split the materialized view of a user's homepage (like his followers list, tweets from friends) into several columnfamilies instead of putting in supercolumns inside a single SupercolumnFamily thereby making the rows skinnier, I was wandering as to which one will give better performance in terms of reads. I think skinnier will definitely have the advantage of less row mutations thus good read performance, when, only they, need to be retrieved, plus supercolumns of followerlist ,etc are avoided(this sounds good as supercolumn indexing limitations will not suck), but I still not pretty sure whether it would beneficial in terms of performance numbers, if I split the materialized view of single user into several columnfamilies instead of single row in single Supercolumnfamily. On Sat, Jan 8, 2011 at 2:05 AM, Rajkumar Gupta wrote: > The fact that subcolumns inside the supercolumns aren't indexed > currently may suck here, whenever a small no (10-20 ) of subcolumns > need to be retreived from a large list of subcolumns of a supercolumn > like MyPostsIdKeysList. > > On Fri, Jan 7, 2011 at 9:58 PM, Raj wrote: >> My question is in context of a social network schema design >> >> I am thinking of following schema for storing a user's data that is >> required as he logs in & is led to his homepage:- >> (I aimed at a schema design such that through a single row read query >> all the data that would be required to put up the homepage of that >> user, is retreived.) >> >> UserSuperColumnFamily: { // Column Family >> >> UserIDKey: >> {columns: MyName, MyEmail, MyCity,...etc >> supercolumns: MyFollowersList, MyFollowiesList, MyPostsIdKeysList, >> MyInterestsList, MyAlbumsIdKeysList, MyVideoIdKeysList, >> RecentNotificationsForUserList, MessagesReceivedList, >> MessagesSentList, AccountSettingsList, RecentSelfActivityList, >> UpdatesFromFollowiesList >> } >> } >> >> Thus user's newfeed would be generated using superColumn: >> UpdatesFromFollowiesList. But the UpdatesFromFollowiesList, would >> obviously contain only Id of the posts and not the entire post data. >> >> Questions: >> >> 1.) What could be the problems with this design, any improvements ? >> >> 2.) Would frequent & heavy overwrite operations/ row mutations (for >> example; when propagating the post updates for news-feed from some >> user to all his followies) which leads to rows ultimately being in >> several SSTables, will lead to degraded read performance ?? Is it >> suitable to use row Cache(too big row but all data required uptil user >> is logged in) If I do not use cache, it may be very expensive to pull >> the row each time a data is required for the given user since row >> would be in several sstables. How can I improve the >> read performance here >> >> The actual data of the posts from network would be retrieved using >> PostIdKey through subsequent read queries from columnFamily >> PostsSuperColumnFamily which would be like follows: >> >> PostsSuperColumnFamily:{ >> >> PostIdKey: >> { >> columns: PostOwnerId, PostBody >> supercolumns: TagsForPost {list of columns of all tags for the >> post}, PeopleWhoLikedThisPost {list of columns of UserIdKey of all the >> likers} >> } >> } >> >> Is this the best design to go with or are there any issues to consider >> here ? Thanks in anticipation of your valuable comments.! >> >
Re: quick question about super columns
Hey Tyler, Is this limitation of supercolumns going to be removed anytime sooner ? Raj On Fri, Jan 7, 2011 at 8:51 PM, Tyler Hobbs wrote: > An important bit to read about supercolumn limitations: > http://www.riptano.com/docs/0.6/data_model/supercolumns#limitations > > Don't make supercolumns with a huge number of subcolumns (or a few really > large subcolumns) unless you plan to always read all of them at once. > > - Tyler > > On Fri, Jan 7, 2011 at 1:27 AM, Arijit Mukherjee wrote: >> >> Thanx to both of you. I can now go ahead a bit more. >> >> Arijit >> >> On 7 January 2011 12:53, Narendra Sharma >> wrote: >> > With raw thrift APIs: >> > >> > 1. Fetch column from supercolumn: >> > >> > ColumnPath cp = new ColumnPath("ColumnFamily"); >> > cp.setSuper_column("SuperColumnName"); >> > cp.setColumn("ColumnName"); >> > ColumnOrSuperColumn resp = client.get(getByteBuffer("RowKey"), cp, >> > ConsistencyLevel.ONE); >> > Column c = resp.getColumn(); >> > >> > 2. Add a new supercolumn: >> > >> > SuperColumn superColumn = new SuperColumn(); >> > superColumn.setName(getBytes("SuperColumnName")); >> > cols = new ArrayList(); >> > Column c = new Column(); >> > c.setName(name); >> > c.setValue(value); >> > c.setTimestamp(timeStamp); >> > cols.add(c); >> > //repeat above 5 lines for as many cols you want in supercolumn >> > superColumn.setColumns(cols); >> > >> > >> > List mutations = new ArrayList(); >> > ColumnOrSuperColumn csc = new ColumnOrSuperColumn(); >> > csc.setSuper_column(superColumn); >> > csc.setSuper_columnIsSet(true); >> > Mutation m = new Mutation(); >> > m.setColumn_or_supercolumn(csc); >> > m.setColumn_or_supercolumnIsSet(true); >> > mutations.add(m); >> > >> > >> > Map> allMutations = new HashMap> > List>(); >> > allMutations.put("ColumnFamilyName", mutations); >> > Map>> mutationMap = new >> > HashMap>>(); >> > mutationMap.put(getByteBuffer("RowKey"), mutations); >> > client.batch_mutate(mutationMap, ConsistencyLevel.ONE); >> > >> > HTH! >> > >> > Thanks, >> > Naren >> > >> > >> > >> > On Thu, Jan 6, 2011 at 10:42 PM, Arijit Mukherjee >> > wrote: >> >> >> >> Thank you. And is it similar if I want to search a subcolumn within a >> >> given supercolumn? I mean I have the supercolumn key and the subcolumn >> >> key - can I fetch the particular subcolumn? >> >> >> >> Can you share a small piece of example code for both? >> >> >> >> I'm still new into this and trying to figure out the Thrift APIs. I >> >> attempted to use Hector, but got myself into more confusion. >> >> >> >> Arijit >> >> >> >> On 7 January 2011 11:44, Roshan Dawrani >> >> wrote: >> >> > >> >> > On Fri, Jan 7, 2011 at 11:39 AM, Arijit Mukherjee >> >> > >> >> > wrote: >> >> >> >> >> >> Hi >> >> >> >> >> >> I've a quick question about supercolumns. >> >> >> EventRecord = { >> >> >> eventKey2: { >> >> >> e2-ts1: {set of columns}, >> >> >> e2-ts2: {set of columns}, >> >> >> ... >> >> >> e2-tsn: {set of columns} >> >> >> } >> >> >> >> >> >> } >> >> >> >> >> >> If I want to append another "e2-tsp: {set of columns}" to the event >> >> >> record keyed by eventKey2, do I need to retrieve the entire >> >> >> eventKey2 >> >> >> map, and then append this new row and re-insert eventKey2? >> >> > >> >> > No, you can simply insert a new super column with its sub-columns >> >> > with >> >> > the rowKey that you want, and it will join the other super columns of >> >> > that >> >> > row. >> >> > >> >> > A row have billions of super columns. Imagine fetching them all, just >> >> > to >> >> > add one more super column into it. >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> >> >> >> -- >> >> "And when the night is cloudy, >> >> There is still a light that shines on me, >> >> Shine on until tomorrow, let it be." >> > >> > >> >> >> >> -- >> "And when the night is cloudy, >> There is still a light that shines on me, >> Shine on until tomorrow, let it be." > >
Re: Is this a good schema design to implement a social application..
The fact that subcolumns inside the supercolumns aren't indexed currently may suck here, whenever a small no (10-20 ) of subcolumns need to be retreived from a large list of subcolumns of a supercolumn like MyPostsIdKeysList. On Fri, Jan 7, 2011 at 9:58 PM, Raj wrote: > My question is in context of a social network schema design > > I am thinking of following schema for storing a user's data that is > required as he logs in & is led to his homepage:- > (I aimed at a schema design such that through a single row read query > all the data that would be required to put up the homepage of that > user, is retreived.) > > UserSuperColumnFamily: { // Column Family > > UserIDKey: > {columns: MyName, MyEmail, MyCity,...etc > supercolumns: MyFollowersList, MyFollowiesList, MyPostsIdKeysList, > MyInterestsList, MyAlbumsIdKeysList, MyVideoIdKeysList, > RecentNotificationsForUserList, MessagesReceivedList, > MessagesSentList, AccountSettingsList, RecentSelfActivityList, > UpdatesFromFollowiesList > } > } > > Thus user's newfeed would be generated using superColumn: > UpdatesFromFollowiesList. But the UpdatesFromFollowiesList, would > obviously contain only Id of the posts and not the entire post data. > > Questions: > > 1.) What could be the problems with this design, any improvements ? > > 2.) Would frequent & heavy overwrite operations/ row mutations (for > example; when propagating the post updates for news-feed from some > user to all his followies) which leads to rows ultimately being in > several SSTables, will lead to degraded read performance ?? Is it > suitable to use row Cache(too big row but all data required uptil user > is logged in) If I do not use cache, it may be very expensive to pull > the row each time a data is required for the given user since row > would be in several sstables. How can I improve the > read performance here > > The actual data of the posts from network would be retrieved using > PostIdKey through subsequent read queries from columnFamily > PostsSuperColumnFamily which would be like follows: > > PostsSuperColumnFamily:{ > > PostIdKey: > { > columns: PostOwnerId, PostBody > supercolumns: TagsForPost {list of columns of all tags for the > post}, PeopleWhoLikedThisPost {list of columns of UserIdKey of all the > likers} > } > } > > Is this the best design to go with or are there any issues to consider > here ? Thanks in anticipation of your valuable comments.! >
Re: meaning of eventual consistency in Cassandra ?
This means that nodes in cassandra cluster contain data that has been sharded onto serveral nodes as well as this sharded data may be replicated further across several nodes ? So cassandra storage utilizes both sharded as well as replication for load balancing? Is this correct ? On Mon, Jan 3, 2011 at 11:28 PM, Peter Schuller wrote: >> What is the meaning of eventual consistency in Cassandra when nodes in >> a single cluster do not mantain the copies of same data but rather >> data is distributed among nodes. Since a single peice of data is >> recorded at a single place(node),Why wouldn't Cassandra return the >> recent value from that single place of record? How do multiple copies >> arise in this situation ? Where are the replicas in Cassandra cluster >> ? > > There is normally not just a single copy. If you run with RF > (replication factor) = 1, you have a single copy. But this is only > useful if you don't care about redundancy at all. > > With multiple replicas, the consistency depends on what you're doing. > For example the choice of consistency level (see the levels listed on > http://wiki.apache.org/cassandra/API). > > However note that even with RF=1, there are some things that are still > only "eventual". For example if you submit a batch mutation, > concurrent readers may see a partially applied batch mutation for a > given row even though it is only being written to a single node. > > -- > / Peter Schuller >
meaning of eventual consistency in Cassandra ?
What is the meaning of eventual consistency in Cassandra when nodes in a single cluster do not mantain the copies of same data but rather data is distributed among nodes. Since a single peice of data is recorded at a single place(node),Why wouldn't Cassandra return the recent value from that single place of record? How do multiple copies arise in this situation ? Where are the replicas in Cassandra cluster ? Thanks
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
Thanks Nick your suggestion just worked.!! I just tried the command 'use Keyspace1' (the keyspace i was trying to access through my php script) at cassandra-cli and it was unable to let me use that keyspace but I could successfully write another it for another keyspace that actually existed. Thereby I have figured out the actual problem because of which phpcassa was unable to connect to cassandra (since there existed no keyspace by that name). So to complete this solution, could you let me know what is the proper way to define a keyspace and import it, on a windows machine? Thank you so much, Raj On Tue, Dec 21, 2010 at 8:30 AM, Rajkumar Gupta wrote: > I will try it out & let you know soon.. > > Thanks > > On Tue, Dec 21, 2010 at 1:20 AM, Tyler Hobbs wrote: >> Yes, Nick's suggestion is good. I've added a logging statement at that >> point in the latest commit to phpcassa. Perhaps you could try that and see >> what the error is? >> >> - Tyler >> >> On Mon, Dec 20, 2010 at 12:35 PM, Nick Bailey wrote: >>> >>> So it looks like phpcassa doesn't log any errors. The error you are seeing >>> is because the connection to the first server failed and there are no more >>> servers to try. It doesn't say why it failed though. The only thing i can >>> reccommend is on line 57 of connection.php to add a line to print out the >>> exception it catches there to see what the problem is. Or just throw the >>> exception again so the script dies there. >>> On Mon, Dec 20, 2010 at 11:38 AM, Rajkumar Gupta >>> wrote: >>>> >>>> Nick, >>>> >>>> Sorry I can not currently access my computer on which cassandra is >>>> installed but yes, earlier I used the 'show keyspaces;' command & it >>>> correctly showed me the keyspace1 with corresponding column families. >>>> Yes I was using Cassandra 0.6.8 earlier and now I have switched to >>>> 0.7. Since I was using thobbs phpcassa which infact worked with 0.7 >>>> version but I came to know lately. I have tried on ubuntu as well but >>>> I am not very proficient in ubuntu therefore I quit there and decided >>>> to get it running on windows only. >>>> >>>> So right now, I am using Cassandra 0.7.0 on windows. I am trying to >>>> use thobbs's PHPcassa with it but when I try this: >>>> >>>> >>> require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); >>>> require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); >>>> >>>> $servers[0]['host'] = 'localhost'; >>>> $servers[0]['port'] = '9160'; >>>> $conn = new Connection('Keyspace1', $servers); >>>> >>>> $column_family = new ColumnFamily($conn, 'Standard1'); >>>> ?> >>>> >>>> >>>> Fatal error: Uncaught exception 'NoServerAvailable' in >>>> Z:\wamp\bin\php\phpcassa\connection.php:153 >>>> Stack trace: #0 Z:\wamp\bin\php\phpcassa\connection.php(53): >>>> ServerSet->get() #1 Z:\wamp\bin\php\phpcassa\connection.php(64): >>>> Connection->connect() #2 >>>> Z:\wamp\bin\php\phpcassa\columnfamily.php(171): Connection->connect() >>>> #3 Z:\wamp\www\PhpProject\index.php(10): >>>> ColumnFamily->__construct(Object(Connection), 'Standard1') #4 {main} >>>> thrown in Z:\wamp\bin\php\phpcassa\connection.php on line 153 >>>> >>>> Thanks so much Nick .. >>>> >>>> >>>> On Mon, Dec 20, 2010 at 10:47 PM, Nick Bailey wrote: >>>> > Just to verify the keyspace exists can you run 'use Keyspace1;' in the >>>> > cli? >>>> > Also it looks like you were using 0.6.8 and now you are using 0.7.0? >>>> > What is >>>> > the exact error you are seeing now? >>>> > >>>> > On Mon, Dec 20, 2010 at 10:21 AM, Rajkumar Gupta >>>> > >>>> > wrote: >>>> >> >>>> >> Keyspace1 is included by default in the cassandra.yaml file and I >>>> >> imported the schema before running the php script >>>> >> so I hope that is not the problem.. >>>> >> >>>> >> I am now too much frustrated with this problem..:( and this is just >>>> >> the beginning of my Cassandra experiments >>>> >>
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
I will try it out & let you know soon.. Thanks On Tue, Dec 21, 2010 at 1:20 AM, Tyler Hobbs wrote: > Yes, Nick's suggestion is good. I've added a logging statement at that > point in the latest commit to phpcassa. Perhaps you could try that and see > what the error is? > > - Tyler > > On Mon, Dec 20, 2010 at 12:35 PM, Nick Bailey wrote: >> >> So it looks like phpcassa doesn't log any errors. The error you are seeing >> is because the connection to the first server failed and there are no more >> servers to try. It doesn't say why it failed though. The only thing i can >> reccommend is on line 57 of connection.php to add a line to print out the >> exception it catches there to see what the problem is. Or just throw the >> exception again so the script dies there. >> On Mon, Dec 20, 2010 at 11:38 AM, Rajkumar Gupta >> wrote: >>> >>> Nick, >>> >>> Sorry I can not currently access my computer on which cassandra is >>> installed but yes, earlier I used the 'show keyspaces;' command & it >>> correctly showed me the keyspace1 with corresponding column families. >>> Yes I was using Cassandra 0.6.8 earlier and now I have switched to >>> 0.7. Since I was using thobbs phpcassa which infact worked with 0.7 >>> version but I came to know lately. I have tried on ubuntu as well but >>> I am not very proficient in ubuntu therefore I quit there and decided >>> to get it running on windows only. >>> >>> So right now, I am using Cassandra 0.7.0 on windows. I am trying to >>> use thobbs's PHPcassa with it but when I try this: >>> >>> >> require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); >>> require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); >>> >>> $servers[0]['host'] = 'localhost'; >>> $servers[0]['port'] = '9160'; >>> $conn = new Connection('Keyspace1', $servers); >>> >>> $column_family = new ColumnFamily($conn, 'Standard1'); >>> ?> >>> >>> >>> Fatal error: Uncaught exception 'NoServerAvailable' in >>> Z:\wamp\bin\php\phpcassa\connection.php:153 >>> Stack trace: #0 Z:\wamp\bin\php\phpcassa\connection.php(53): >>> ServerSet->get() #1 Z:\wamp\bin\php\phpcassa\connection.php(64): >>> Connection->connect() #2 >>> Z:\wamp\bin\php\phpcassa\columnfamily.php(171): Connection->connect() >>> #3 Z:\wamp\www\PhpProject\index.php(10): >>> ColumnFamily->__construct(Object(Connection), 'Standard1') #4 {main} >>> thrown in Z:\wamp\bin\php\phpcassa\connection.php on line 153 >>> >>> Thanks so much Nick .. >>> >>> >>> On Mon, Dec 20, 2010 at 10:47 PM, Nick Bailey wrote: >>> > Just to verify the keyspace exists can you run 'use Keyspace1;' in the >>> > cli? >>> > Also it looks like you were using 0.6.8 and now you are using 0.7.0? >>> > What is >>> > the exact error you are seeing now? >>> > >>> > On Mon, Dec 20, 2010 at 10:21 AM, Rajkumar Gupta >>> > >>> > wrote: >>> >> >>> >> Keyspace1 is included by default in the cassandra.yaml file and I >>> >> imported the schema before running the php script >>> >> so I hope that is not the problem.. >>> >> >>> >> I am now too much frustrated with this problem..:( and this is just >>> >> the beginning of my Cassandra experiments >>> >> >>> >> >>> >> >>> >> >>> >> On Mon, Dec 20, 2010 at 8:36 PM, Nick Bailey wrote: >>> >> > Have you created Keyspace1? Looks like phpcassa requires you to set >>> >> > a >>> >> > keyspace when you connect but the cli would not. Which might explain >>> >> > why >>> >> > you >>> >> > are seeing problems. >>> >> > >>> >> > On Mon, Dec 20, 2010 at 5:42 AM, Rajkumar Gupta >>> >> > >>> >> > wrote: >>> >> >> >>> >> >> I am using the following code to connect to Cassandra 0.7.0 using >>> >> >> PHPcassa (thobbs) >>> >> >> >>> >> >> >> >> >> require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); >>> >> >
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
Nick, Sorry I can not currently access my computer on which cassandra is installed but yes, earlier I used the 'show keyspaces;' command & it correctly showed me the keyspace1 with corresponding column families. Yes I was using Cassandra 0.6.8 earlier and now I have switched to 0.7. Since I was using thobbs phpcassa which infact worked with 0.7 version but I came to know lately. I have tried on ubuntu as well but I am not very proficient in ubuntu therefore I quit there and decided to get it running on windows only. So right now, I am using Cassandra 0.7.0 on windows. I am trying to use thobbs's PHPcassa with it but when I try this: Fatal error: Uncaught exception 'NoServerAvailable' in Z:\wamp\bin\php\phpcassa\connection.php:153 Stack trace: #0 Z:\wamp\bin\php\phpcassa\connection.php(53): ServerSet->get() #1 Z:\wamp\bin\php\phpcassa\connection.php(64): Connection->connect() #2 Z:\wamp\bin\php\phpcassa\columnfamily.php(171): Connection->connect() #3 Z:\wamp\www\PhpProject\index.php(10): ColumnFamily->__construct(Object(Connection), 'Standard1') #4 {main} thrown in Z:\wamp\bin\php\phpcassa\connection.php on line 153 Thanks so much Nick .. On Mon, Dec 20, 2010 at 10:47 PM, Nick Bailey wrote: > Just to verify the keyspace exists can you run 'use Keyspace1;' in the cli? > Also it looks like you were using 0.6.8 and now you are using 0.7.0? What is > the exact error you are seeing now? > > On Mon, Dec 20, 2010 at 10:21 AM, Rajkumar Gupta > wrote: >> >> Keyspace1 is included by default in the cassandra.yaml file and I >> imported the schema before running the php script >> so I hope that is not the problem.. >> >> I am now too much frustrated with this problem..:( and this is just >> the beginning of my Cassandra experiments >> >> >> >> >> On Mon, Dec 20, 2010 at 8:36 PM, Nick Bailey wrote: >> > Have you created Keyspace1? Looks like phpcassa requires you to set a >> > keyspace when you connect but the cli would not. Which might explain why >> > you >> > are seeing problems. >> > >> > On Mon, Dec 20, 2010 at 5:42 AM, Rajkumar Gupta >> > wrote: >> >> >> >> I am using the following code to connect to Cassandra 0.7.0 using >> >> PHPcassa (thobbs) >> >> >> >> > >> require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); >> >> require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); >> >> >> >> $servers[0]['host'] = 'localhost'; >> >> $servers[0]['port'] = '9160'; >> >> $conn = new Connection('Keyspace1', $servers); >> >> >> >> $column_family = new ColumnFamily($conn, 'Standard1'); >> >> ?> >> >> >> >> However I am able to connect to cassandra instance through >> >> cassandra-cli at command prompt but not through this php script. >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Dec 20, 2010 at 11:10 AM, Nick Bailey wrote: >> >> > It would probably help if you posted the code you are trying to use >> >> > from >> >> > your php script. I don't know much about the php client but I now >> >> > someone on >> >> > this list does. >> >> > >> >> > On Sun, Dec 19, 2010 at 10:55 PM, Rajkumar Gupta >> >> > >> >> > wrote: >> >> >> >> >> >> I am able to connect to cassandra through cassandra-cli command at >> >> >> command prompt but not through my php script. I also checked after >> >> >> changing the rpc address to 0.0.0.0 in cassandra.yaml file but it >> >> >> still does not work! >> >> >> >> >> >> >> >> >> On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton >> >> >> >> >> >> wrote: >> >> >> > Forgot to say, 0.0.0.0 is not a good idea in production... >> >> >> > http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any >> >> >> > >> >> >> > >> >> >> > On 20/12/2010, at 9:12 AM, Aaron Morton >> >> >> > wrote: >> >> >> > >> >> >> >> I've not used the PHP client, but you can test connectivity to >> >> >> >> your >> >> >> >> cluster using the cassandra-cli command line client in the bin/ >
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
Keyspace1 is included by default in the cassandra.yaml file and I imported the schema before running the php script so I hope that is not the problem.. I am now too much frustrated with this problem..:( and this is just the beginning of my Cassandra experiments On Mon, Dec 20, 2010 at 8:36 PM, Nick Bailey wrote: > Have you created Keyspace1? Looks like phpcassa requires you to set a > keyspace when you connect but the cli would not. Which might explain why you > are seeing problems. > > On Mon, Dec 20, 2010 at 5:42 AM, Rajkumar Gupta > wrote: >> >> I am using the following code to connect to Cassandra 0.7.0 using >> PHPcassa (thobbs) >> >> > require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); >> require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); >> >> $servers[0]['host'] = 'localhost'; >> $servers[0]['port'] = '9160'; >> $conn = new Connection('Keyspace1', $servers); >> >> $column_family = new ColumnFamily($conn, 'Standard1'); >> ?> >> >> However I am able to connect to cassandra instance through >> cassandra-cli at command prompt but not through this php script. >> >> >> >> >> >> On Mon, Dec 20, 2010 at 11:10 AM, Nick Bailey wrote: >> > It would probably help if you posted the code you are trying to use from >> > your php script. I don't know much about the php client but I now >> > someone on >> > this list does. >> > >> > On Sun, Dec 19, 2010 at 10:55 PM, Rajkumar Gupta >> > >> > wrote: >> >> >> >> I am able to connect to cassandra through cassandra-cli command at >> >> command prompt but not through my php script. I also checked after >> >> changing the rpc address to 0.0.0.0 in cassandra.yaml file but it >> >> still does not work! >> >> >> >> >> >> On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton >> >> wrote: >> >> > Forgot to say, 0.0.0.0 is not a good idea in production... >> >> > http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any >> >> > >> >> > >> >> > On 20/12/2010, at 9:12 AM, Aaron Morton >> >> > wrote: >> >> > >> >> >> I've not used the PHP client, but you can test connectivity to your >> >> >> cluster using the cassandra-cli command line client in the bin/ >> >> >> folder. >> >> >> >> >> >> Also check the ThriftAddress setting in your storage-config, this >> >> >> address is the one that the server will be listening on. Set it to >> >> >> 0.0.0.0 >> >> >> to listen on all. >> >> >> >> >> >> Aaron >> >> >> >> >> >> On 19/12/2010, at 8:45 AM, Rajkumar Gupta >> >> >> wrote: >> >> >> >> >> >>> Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but >> >> >>> when >> >> >>> I try to run the following php script that includes phpcassa, >> >> >>> >> >> >>> >> >> >>> > >> >>> $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; >> >> >>> require_once >> >> >>> $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; >> >> >>> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; >> >> >>> require_once >> >> >>> $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; >> >> >>> require_once >> >> >>> $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; >> >> >>> require_once >> >> >>> $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; >> >> >>> >> >> >>> include_once('Z:/wamp/bin/php/include/phpcassa.php'); >> >> >>> include_once('Z:/wamp/bin/php/include/uuid.php'); >> >> >>> >> >> >>> CassandraConn::add_node('192.168.1.1', 9160); >> >> >>> >> >> >>> $users = new CassandraCF('Keyspace1', 'Users'); >> >> >>> >> >> >>> $users->insert('1', array('email' => 'hoan.tont...@gmail.com', >> >> >>> 'password' => 'test')); >> >> >>> ?> >> >> >>> >> >> >>> >> >> >>> on running above script I get this error: >> >> >>> >> >> >>> Fatal error: Uncaught exception 'Exception' with message 'Could not >> >> >>> connect to a cassandra server' in >> >> >>> Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 >> >> >>> Z:\wamp\bin\php\include\phpcassa.php(193): >> >> >>> CassandraConn::get_client() >> >> >>> #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF->insert('1', >> >> >>> Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on >> >> >>> line 70 >> >> >>> >> >> >>> Please let me know how can I make it work >> >> >>> >> >> >>> Thanks... >> >> >>> -- >> >> > >> >> >> >> >> >> >> >> -- >> >> >> >> ___ >> >> >> >> Rajkumar Gupta >> >> Dihing 173, >> >> Indian Institute of Technology Guwahati >> >> India >> >> >> >> >> >> http://in.linkedin.com/in/rajkumargupta1 >> > >> > > >
Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
I am using the following code to connect to Cassandra 0.7.0 using PHPcassa (thobbs) However I am able to connect to cassandra instance through cassandra-cli at command prompt but not through this php script. On Mon, Dec 20, 2010 at 11:10 AM, Nick Bailey wrote: > It would probably help if you posted the code you are trying to use from > your php script. I don't know much about the php client but I now someone on > this list does. > > On Sun, Dec 19, 2010 at 10:55 PM, Rajkumar Gupta > wrote: >> >> I am able to connect to cassandra through cassandra-cli command at >> command prompt but not through my php script. I also checked after >> changing the rpc address to 0.0.0.0 in cassandra.yaml file but it >> still does not work! >> >> >> On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton >> wrote: >> > Forgot to say, 0.0.0.0 is not a good idea in production... >> > http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any >> > >> > >> > On 20/12/2010, at 9:12 AM, Aaron Morton wrote: >> > >> >> I've not used the PHP client, but you can test connectivity to your >> >> cluster using the cassandra-cli command line client in the bin/ folder. >> >> >> >> Also check the ThriftAddress setting in your storage-config, this >> >> address is the one that the server will be listening on. Set it to 0.0.0.0 >> >> to listen on all. >> >> >> >> Aaron >> >> >> >> On 19/12/2010, at 8:45 AM, Rajkumar Gupta >> >> wrote: >> >> >> >>> Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when >> >>> I try to run the following php script that includes phpcassa, >> >>> >> >>> >> >>> > >>> $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; >> >>> require_once >> >>> $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; >> >>> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; >> >>> require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; >> >>> require_once >> >>> $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; >> >>> require_once >> >>> $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; >> >>> >> >>> include_once('Z:/wamp/bin/php/include/phpcassa.php'); >> >>> include_once('Z:/wamp/bin/php/include/uuid.php'); >> >>> >> >>> CassandraConn::add_node('192.168.1.1', 9160); >> >>> >> >>> $users = new CassandraCF('Keyspace1', 'Users'); >> >>> >> >>> $users->insert('1', array('email' => 'hoan.tont...@gmail.com', >> >>> 'password' => 'test')); >> >>> ?> >> >>> >> >>> >> >>> on running above script I get this error: >> >>> >> >>> Fatal error: Uncaught exception 'Exception' with message 'Could not >> >>> connect to a cassandra server' in >> >>> Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 >> >>> Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() >> >>> #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF->insert('1', >> >>> Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on >> >>> line 70 >> >>> >> >>> Please let me know how can I make it work >> >>> >> >>> Thanks... >> >>> -- >> > >> >> >> >> -- >> >> ___ >> >> Rajkumar Gupta >> Dihing 173, >> Indian Institute of Technology Guwahati >> India >> >> >> http://in.linkedin.com/in/rajkumargupta1 > >
Re: Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
I am able to connect to cassandra through cassandra-cli command at command prompt but not through my php script. I also checked after changing the rpc address to 0.0.0.0 in cassandra.yaml file but it still does not work! On Mon, Dec 20, 2010 at 1:47 AM, Aaron Morton wrote: > Forgot to say, 0.0.0.0 is not a good idea in production... > http://wiki.apache.org/cassandra/FAQ#cant_listen_on_ip_any > > > On 20/12/2010, at 9:12 AM, Aaron Morton wrote: > >> I've not used the PHP client, but you can test connectivity to your cluster >> using the cassandra-cli command line client in the bin/ folder. >> >> Also check the ThriftAddress setting in your storage-config, this address is >> the one that the server will be listening on. Set it to 0.0.0.0 to listen on >> all. >> >> Aaron >> >> On 19/12/2010, at 8:45 AM, Rajkumar Gupta wrote: >> >>> Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when >>> I try to run the following php script that includes phpcassa, >>> >>> >>> >> $GLOBALS['THRIFT_ROOT'] = 'Z:/wamp/bin/php/include/thrift/'; >>> require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php'; >>> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php'; >>> require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php'; >>> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php'; >>> require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php'; >>> >>> include_once('Z:/wamp/bin/php/include/phpcassa.php'); >>> include_once('Z:/wamp/bin/php/include/uuid.php'); >>> >>> CassandraConn::add_node('192.168.1.1', 9160); >>> >>> $users = new CassandraCF('Keyspace1', 'Users'); >>> >>> $users->insert('1', array('email' => 'hoan.tont...@gmail.com', >>> 'password' => 'test')); >>> ?> >>> >>> >>> on running above script I get this error: >>> >>> Fatal error: Uncaught exception 'Exception' with message 'Could not >>> connect to a cassandra server' in >>> Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 >>> Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() >>> #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF->insert('1', >>> Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on >>> line 70 >>> >>> Please let me know how can I make it work >>> >>> Thanks... >>> -- > -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India http://in.linkedin.com/in/rajkumargupta1
Cassandra not able to listen to incoming commands from PHPcassa
Hi I am using Cassandra 0.7 with PHPcassa on windows. I run the cassandra server from command prompt and then run my php script which include the phpcassa files, but my cassandra does not respond to the phpcassa calls. I get errors like phpcassa could not connect to cassandra server. My cassandra server runs fine on command prompt and im able to do some small interactions through cassandra-cli. I have also imported the schema beforehand using schematool from command prompt, but phpcassa could not connect to cassandra server. Please let me know how can I fix this..It has been really frustrating since past 3 days Thanks in advance.. -- ___ Raj
Re: How to add schema in cassandra 0.7.0
I guess my phpcassa is not able to connect with the cassandra I havenot done any modifications to phpcassa folder I downloaded from github.. but my cassandra is running fine when I run it through Command prompt. On Sun, Dec 19, 2010 at 2:29 AM, Rajkumar Gupta wrote: > hi > I am using Cassandra 0.7.0 on windows. I am trying to use thobbs's > PHPcassa with it but when I try this: > > require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); > require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); > $conn = new Connection('Keyspace'); > $column_family = new ColumnFamily($conn, 'Standard1'); > > I get error on the 4th line...Fatal error: Uncaught exception > 'NoServerAvailable' in Z:\wamp\bin\php\phpcassa\connection.php:153 > Stack trace: #0 Z:\wamp\bin\php\phpcassa\connection.php(53): > ServerSet->get() #1 Z:\wamp\bin\php\phpcassa\connection.php(64): > Connection->connect() #2 > Z:\wamp\bin\php\phpcassa\columnfamily.php(171): Connection->connect() > #3 Z:\wamp\www\PhpProject\index.php(10): > ColumnFamily->__construct(Object(Connection), 'Standard1') #4 {main} > thrown in Z:\wamp\bin\php\phpcassa\connection.php on line 153 > > > I guess I need to import the schema first, to remove this error. > Please tell me how to add the schema & if there is any another fixing > to be done. > > > -- > > ___ > > Raj >
How to add schema in cassandra 0.7.0
hi I am using Cassandra 0.7.0 on windows. I am trying to use thobbs's PHPcassa with it but when I try this: require_once('Z:/wamp/bin/php/'.'phpcassa/connection.php'); require_once('Z:/wamp/bin/php/'.'phpcassa/columnfamily.php'); $conn = new Connection('Keyspace'); $column_family = new ColumnFamily($conn, 'Standard1'); I get error on the 4th line...Fatal error: Uncaught exception 'NoServerAvailable' in Z:\wamp\bin\php\phpcassa\connection.php:153 Stack trace: #0 Z:\wamp\bin\php\phpcassa\connection.php(53): ServerSet->get() #1 Z:\wamp\bin\php\phpcassa\connection.php(64): Connection->connect() #2 Z:\wamp\bin\php\phpcassa\columnfamily.php(171): Connection->connect() #3 Z:\wamp\www\PhpProject\index.php(10): ColumnFamily->__construct(Object(Connection), 'Standard1') #4 {main} thrown in Z:\wamp\bin\php\phpcassa\connection.php on line 153 I guess I need to import the schema first, to remove this error. Please tell me how to add the schema & if there is any another fixing to be done. -- ___ Raj
Problem in using PHPcassa: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server'
Hi, I am trying to use phpcassa(Hoan's) with Cassandra 0.6.8 but when I try to run the following php script that includes phpcassa, insert('1', array('email' => 'hoan.tont...@gmail.com', 'password' => 'test')); ?> on running above script I get this error: Fatal error: Uncaught exception 'Exception' with message 'Could not connect to a cassandra server' in Z:\wamp\bin\php\include\phpcassa.php:70 Stack trace: #0 Z:\wamp\bin\php\include\phpcassa.php(193): CassandraConn::get_client() #1 Z:\wamp\www\PhpProject\index.php(38): CassandraCF->insert('1', Array) #2 {main} thrown in Z:\wamp\bin\php\include\phpcassa.php on line 70 Please let me know how can I make it work Thanks... --
Re: Installing Cassandra on windows
Thanks a ton Nicolas! This helped..its working now :) Can you also tell me where to keep the cassandra folder with phpcassa to use it with wamp server.. Thanks for your great help!! Regards Rajkumar On Fri, Dec 17, 2010 at 2:31 AM, Nick Santini wrote: > just tried my self > seems to be that you are not starting the cassandra process first > the cli is only to access it, not to start it > > execute cassandra first > > Nicolas Santini > > > On Fri, Dec 17, 2010 at 9:55 AM, Rajkumar Gupta wrote: > >> yes I tried to connect through: >> >> *cassandra-cli -host localhost -9160* >> >> It gave me the error *java.net.connection exception: Connection refused* >> >> but still says: "Welcome to Cassandra CLI". When I try to see the name of >> cluster by show, it says not connected to a cassandra instance >> >> >> >> >> >> On Fri, Dec 17, 2010 at 2:12 AM, Nick Bailey wrote: >> >>> You are trying to connect through cassandra-cli? >>> >>> Does the cassandra log indicate it started correctly? Can you hit port >>> 9160 (telnet localhost 9160)? >>> >>> >>> On Thu, Dec 16, 2010 at 2:34 PM, Rajkumar Gupta >>> wrote: >>> >>>> >>>> Hi there, >>>> >>>> I am trying to install Cassandra on windows.. I have downloaded the >>>> files and when I try to connect to the cassandra through command prompt I >>>> get an error: >>>> >>>> *java.net connection exception: Connection refused >>>> >>>> *I have set the environment variables properly & pointed to my JDK >>>> installation. >>>> >>>> -- >>>> >>>> ___ >>>> >>>> Rajkumar Gupta >>>> Dihing 173, >>>> Indian Institute of Technology Guwahati >>>> India >>>> >>> >>> >> >> >> -- >> >> _ >> > > --
Re: Installing Cassandra on windows
yes I tried to connect through: *cassandra-cli -host localhost -9160* It gave me the error *java.net.connection exception: Connection refused* but still says: "Welcome to Cassandra CLI". When I try to see the name of cluster by show, it says not connected to a cassandra instance On Fri, Dec 17, 2010 at 2:12 AM, Nick Bailey wrote: > You are trying to connect through cassandra-cli? > > Does the cassandra log indicate it started correctly? Can you hit port 9160 > (telnet localhost 9160)? > > > On Thu, Dec 16, 2010 at 2:34 PM, Rajkumar Gupta wrote: > >> >> Hi there, >> >> I am trying to install Cassandra on windows.. I have downloaded the files >> and when I try to connect to the cassandra through command prompt I get an >> error: >> >> *java.net connection exception: Connection refused >> >> *I have set the environment variables properly & pointed to my JDK >> installation. >> >> -- >> >> ___ >> >> Rajkumar Gupta >> Dihing 173, >> Indian Institute of Technology Guwahati >> India >> > > -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India rajku...@iitg.ac.in skype: rajkumargupta.iit http://in.linkedin.com/in/rajkumargupta1
Installing Cassandra on windows
Hi there, I am trying to install Cassandra on windows.. I have downloaded the files and when I try to connect to the cassandra through command prompt I get an error: *java.net connection exception: Connection refused *I have set the environment variables properly & pointed to my JDK installation. -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India
easiest learning resources on Cassandra?
Could anyone tell me about where I can get learning resources on Cassandra? I am beginning in cassandra to develop a social network application. Please suggest a language/framework suitable for this purpose. Thanks -- ___ Rajkumar Gupta Dihing 173, Indian Institute of Technology Guwahati India http://in.linkedin.com/in/rajkumargupta1