[jira] [Commented] (CASSANDRA-2820) Re-introduce FastByteArrayInputStream (and Output equivalent)

2011-08-18 Thread Norman Maurer (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086831#comment-13086831
 ] 

Norman Maurer commented on CASSANDRA-2820:
--

Wouldn't this stuff be a nice contribution to the commons-io project ? 

 Re-introduce FastByteArrayInputStream (and Output equivalent)
 -

 Key: CASSANDRA-2820
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2820
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.0
 Environment: n/a
Reporter: Paul Loy
Assignee: Paul Loy
Priority: Minor
  Labels: bytearrayinputstream, bytearrayoutputstream, license, 
 synchronized
 Fix For: 1.0

 Attachments: fast_bytearray_iostreams_harmony-patch-2.txt, 
 fast_bytearray_iostreams_harmony-patch-3.txt, 
 fast_bytearray_iostreams_harmony-patch-4.txt, 
 fast_bytearray_iostreams_harmony-patch-5.txt, 
 fast_bytearray_iostreams_harmony-patch-6.txt


 In https://issues.apache.org/jira/browse/CASSANDRA-37 
 FastByteArrayInputStream and FastByteArrayOutputStream were removed due to 
 being code copied from the JDK and then subsequently modified. The JDK 
 license is incompatible with Apache 2 license so the code had to go.
 I have since had a look at the performance of the JDK ByteArrayInputStream 
 and a FastByteArrayInputStream (i.e. one with synchronized methods made 
 un-synchronized) and seen the difference is significant.
 After a warmup-period of 1 loops I get the following for 1 loops 
 through a 128000 byte array:
 bais : 3513ms
 fbais: 72ms
 This varies depending on the OS, machine and Java version, but it's always in 
 favour of the FastByteArrayInputStream as you might expect.
 Then, at Jonathan Ellis' suggestion, I tried this using a modified Apache 
 Harmony ByteArrayInputStream - i.e. one whose license is compatible - and the 
 results were the same. A significant boost.
 I will attach a patch with changes for the 0.8.0 tag.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3048) SimpleAuthority should reload property file automatically

2011-08-18 Thread Thomas Peuss (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086832#comment-13086832
 ] 

Thomas Peuss commented on CASSANDRA-3048:
-

Like in SimpleAuthenticator the properties-file is loaded on every request. If 
that is not OK I can change the patch in a way to check the 
lastModified-timestamp of the property-file.
If we do that we should change SimpleAuthenticator as well.

 SimpleAuthority should reload property file automatically
 -

 Key: CASSANDRA-3048
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3048
 Project: Cassandra
  Issue Type: Improvement
Reporter: Thomas Peuss
Priority: Minor
 Attachments: CASSANDRA-3048.patch


 Currently you need a restart of Cassandra to load a changed access.properties 
 file. This is very annoying. The patch changes the behaviour of 
 SimpleAuthority to match the behaviour of SimpleAuthenticator.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-2630) CLI - 'describe column family' would be nice

2011-08-18 Thread satish babu krishnamoorthy (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

satish babu krishnamoorthy updated CASSANDRA-2630:
--

Attachment: cassandra-0.8.2-2630.txt

 CLI - 'describe column family' would be nice
 

 Key: CASSANDRA-2630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2630
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.2
Reporter: Jeremy Hanna
Priority: Minor
  Labels: cli, lhf
 Attachments: cassandra-0.8.2-2630.txt


 I end up verifying column families a lot and using 'describe keyspace 
 keyspace;' spits out a whole bunch of data since our keyspace has a lot of 
 metadata.  It would be really useful to have a 'describe column family;' 
 for a given column family in the currently authenticated keyspace.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Carl Heymann (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086835#comment-13086835
 ] 

Carl Heymann commented on CASSANDRA-1285:
-

I see the issue is resolved. Is there any special procedure necessary to change 
the replication factor? If I try to update as follows (on a keyspace with 
RF=2), using the CLI:
{code}
update keyspace LTS with strategy_options=[{replication_factor:3}];
{code}
I don't see any change in RF reported with describe keyspace LTS; It remains 
2. Adding the placement strategy into the update command doesn't make a 
difference. If I run repair on all nodes (there are 3 nodes), I don't see any 
changes either.

Is there a different way I can try to achieve this?

 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Issue Comment Edited] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Carl Heymann (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086835#comment-13086835
 ] 

Carl Heymann edited comment on CASSANDRA-1285 at 8/18/11 6:42 AM:
--

I see the issue is resolved. Is there any special procedure necessary to change 
the replication factor? If I try to update as follows (on a keyspace with 
RF=2), using the CLI (cassandra v0.8.0):
{code}
update keyspace LTS with strategy_options=[{replication_factor:3}];
{code}
I don't see any change in RF reported with describe keyspace LTS; It remains 
2. Adding the placement strategy into the update command doesn't make a 
difference. If I run repair on all nodes (there are 3 nodes), I don't see any 
changes either.

Is there a different way I can try to achieve this?

  was (Author: carl.heymann):
I see the issue is resolved. Is there any special procedure necessary to 
change the replication factor? If I try to update as follows (on a keyspace 
with RF=2), using the CLI:
{code}
update keyspace LTS with strategy_options=[{replication_factor:3}];
{code}
I don't see any change in RF reported with describe keyspace LTS; It remains 
2. Adding the placement strategy into the update command doesn't make a 
difference. If I run repair on all nodes (there are 3 nodes), I don't see any 
changes either.

Is there a different way I can try to achieve this?
  
 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3044) Hector NodeAutoDiscoverService fails to resolve hosts due to / being part of the IP address

2011-08-18 Thread Tomas Salfischberger (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086940#comment-13086940
 ] 

Tomas Salfischberger commented on CASSANDRA-3044:
-

Issue also affects the Pelops client from Scale7 
(https://github.com/s7/scale7-pelops).

 Hector NodeAutoDiscoverService fails to resolve hosts due to / being part of 
 the IP address
 ---

 Key: CASSANDRA-3044
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3044
 Project: Cassandra
  Issue Type: Bug
  Components: Core, Drivers
Affects Versions: 0.8.4
 Environment: Cassandra 0.8.4, hector 0.8.0
Reporter: Aaron Turner
Assignee: Brandon Williams
 Fix For: 0.8.5


 Didn't get this problem with Cassandra 0.8.2- started happening under 0.8.4.  
 Temporary work around was to disable node auto discovery.  Seems to be 
 related to:
 http://svn.apache.org/viewvc?view=revrevision=1155157
 http://issues.apache.org/jira/browse/CASSANDRA-1777
 LOG:
 240514 [pool-2-thread-1] INFO 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService - using existing 
 hosts [10.255.255.176(10.255.255.176):9160, 
 10.255.255.175(10.255.255.175):9160]
 240553 [pool-2-thread-1] ERROR me.prettyprint.cassandra.service.CassandraHost 
 - Unable to resolve host /10.255.255.176
 240553 [pool-2-thread-1] INFO 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService - Found a node we 
 don't know about /10.255.255.176(/10.255.255.176):9160 for TokenRange 
 TokenRange(start_token:33370589793653380361461751202224080323, 
 end_token:93518639523624865529944734322199113946, endpoints:[/10.255.255.176])
 240553 [pool-2-thread-1] INFO 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService - Found 1 new 
 host(s) in Ring
 240553 [pool-2-thread-1] INFO 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService - Addding found 
 host /10.255.255.176(/10.255.255.176):9160 to pool
 240554 [pool-2-thread-1] ERROR 
 me.prettyprint.cassandra.connection.HConnectionManager - General exception 
 host to HConnectionManager: /10.255.255.176(/10.255.255.176):9160
 java.lang.IllegalArgumentException: protocol = socket host = null
 at 
 sun.net.spi.DefaultProxySelector.select(DefaultProxySelector.java:151)
 at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:358)
 at java.net.Socket.connect(Socket.java:529)
 at org.apache.thrift.transport.TSocket.open(TSocket.java:178)
 at 
 org.apache.thrift.transport.TFramedTransport.open(TFramedTransport.java:81)
 at 
 me.prettyprint.cassandra.connection.HThriftClient.open(HThriftClient.java:123)
 at 
 me.prettyprint.cassandra.connection.ConcurrentHClientPool.init(ConcurrentHClientPool.java:43)
 at 
 me.prettyprint.cassandra.connection.RoundRobinBalancingPolicy.createConnection(RoundRobinBalancingPolicy.java:68)
 at 
 me.prettyprint.cassandra.connection.HConnectionManager.addCassandraHost(HConnectionManager.java:103)
 at 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService.doAddNodes(NodeAutoDiscoverService.java:68)
 at 
 me.prettyprint.cassandra.connection.NodeAutoDiscoverService$QueryRing.run(NodeAutoDiscoverService.java:53)
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
 at 
 java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2630) CLI - 'describe column family' would be nice

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086983#comment-13086983
 ] 

Jonathan Ellis commented on CASSANDRA-2630:
---

Can we drop the column family keywords and just say describe X where X is 
either a KS or CF?

 CLI - 'describe column family' would be nice
 

 Key: CASSANDRA-2630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2630
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.2
Reporter: Jeremy Hanna
Priority: Minor
  Labels: cli, lhf
 Attachments: cassandra-0.8.2-2630.txt


 I end up verifying column families a lot and using 'describe keyspace 
 keyspace;' spits out a whole bunch of data since our keyspace has a lot of 
 metadata.  It would be really useful to have a 'describe column family;' 
 for a given column family in the currently authenticated keyspace.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086985#comment-13086985
 ] 

Jonathan Ellis commented on CASSANDRA-1285:
---

You're probably using NetworkTopologyStrategy.  replication_factor is ignored 
there.

 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Carl Heymann (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13086995#comment-13086995
 ] 

Carl Heymann commented on CASSANDRA-1285:
-

Actually, I'm using SimpleStrategy:
{code}
[localcluster@unknown] describe keyspace LTS;
Keyspace: LTS:
  Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
Options: [replication_factor:2]
...
{code}

 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087009#comment-13087009
 ] 

Jonathan Ellis commented on CASSANDRA-1285:
---

Then the first thing you should do is upgrade in case there is a bug in your 
version.

P.S. a year-old ticket is the wrong place to discuss this.

 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-1285) Have a way to increase the replication factor

2011-08-18 Thread Carl Heymann (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-1285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087031#comment-13087031
 ] 

Carl Heymann commented on CASSANDRA-1285:
-

OK, I tested with 0.8.4, and seems to be working there. I think I ran into 
CASSANDRA-2846

 Have a way to increase the replication factor
 -

 Key: CASSANDRA-1285
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1285
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Affects Versions: 0.7 beta 1
Reporter: Arya Goudarzi
Assignee: Gary Dusbabek
 Fix For: 0.7 beta 2

 Attachments: v2-0001-thrift-changes.txt, 
 v2-0002-UpdateKeyspace-migration.txt, v2-0003-UpdateColumn-family.txt, 
 v2-0004-avro-update-ks-and-cf-implementations.txt


 In 0.6 we were able to change the storage.conf and increase the replication 
 factor and restart the server then repair the data across cluster to increase 
 the replication factor for a keyspace. In 0.7 having moved away from 
 storage.conf, it would be a good idea to have a method in api/jmx to alter 
 keyspace so that replication factor could be changed as in 0.6. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2630) CLI - 'describe column family' would be nice

2011-08-18 Thread Benjamin Coverston (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087046#comment-13087046
 ] 

Benjamin Coverston commented on CASSANDRA-2630:
---

Would work as long as the pre-condition is that the connection was already 
within the context of a KS, otherwise you run into all kinds of potential 
ambiguity.

 CLI - 'describe column family' would be nice
 

 Key: CASSANDRA-2630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2630
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.2
Reporter: Jeremy Hanna
Priority: Minor
  Labels: cli, lhf
 Attachments: cassandra-0.8.2-2630.txt


 I end up verifying column families a lot and using 'describe keyspace 
 keyspace;' spits out a whole bunch of data since our keyspace has a lot of 
 metadata.  It would be really useful to have a 'describe column family;' 
 for a given column family in the currently authenticated keyspace.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2630) CLI - 'describe column family' would be nice

2011-08-18 Thread satish babu krishnamoorthy (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087048#comment-13087048
 ] 

satish babu krishnamoorthy commented on CASSANDRA-2630:
---

Nice, will send an updated patch

 CLI - 'describe column family' would be nice
 

 Key: CASSANDRA-2630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2630
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.2
Reporter: Jeremy Hanna
Priority: Minor
  Labels: cli, lhf
 Attachments: cassandra-0.8.2-2630.txt


 I end up verifying column families a lot and using 'describe keyspace 
 keyspace;' spits out a whole bunch of data since our keyspace has a lot of 
 metadata.  It would be really useful to have a 'describe column family;' 
 for a given column family in the currently authenticated keyspace.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2630) CLI - 'describe column family' would be nice

2011-08-18 Thread satish babu krishnamoorthy (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087049#comment-13087049
 ] 

satish babu krishnamoorthy commented on CASSANDRA-2630:
---

will drop column family keyword

 CLI - 'describe column family' would be nice
 

 Key: CASSANDRA-2630
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2630
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.2
Reporter: Jeremy Hanna
Priority: Minor
  Labels: cli, lhf
 Attachments: cassandra-0.8.2-2630.txt


 I end up verifying column families a lot and using 'describe keyspace 
 keyspace;' spits out a whole bunch of data since our keyspace has a lot of 
 metadata.  It would be really useful to have a 'describe column family;' 
 for a given column family in the currently authenticated keyspace.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2280) Request specific column families using StreamIn

2011-08-18 Thread Huy Le (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087055#comment-13087055
 ] 

Huy Le commented on CASSANDRA-2280:
---

Is there any plan to merge this fix into 0.8.x soon?  I checked the latest 
stable build 
(https://builds.apache.org/job/Cassandra-0.8/lastStableBuild/artifact/cassandra/build/apache-cassandra-2011-08-17_23-00-56-bin.tar.gz)
 but I don't see the fix list in CHANGES.txt.  I also checked the latest build 
(https://builds.apache.org/job/Cassandra-0.8/284/artifact/cassandra/build/apache-cassandra-2011-08-17_23-00-56-bin.tar.gz)
 and I don't see it listed in CHANGES.txt.

I tried https://builds.apache.org/job/Cassandra-0.8/214/, but got HTTP 404.

 Request specific column families using StreamIn
 ---

 Key: CASSANDRA-2280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2280
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Jonathan Ellis
 Fix For: 1.0

 Attachments: 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 2280-v3.txt, 
 2280-v4.txt, 2280-v5.txt


 StreamIn.requestRanges only specifies a keyspace, meaning that requesting a 
 range will request it for all column families: if you have a large number of 
 CFs, this can cause quite a headache.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3054) CLI drop index doesn't handle numeric-only hex column identifiers properly

2011-08-18 Thread Dan Kuebrich (JIRA)
CLI drop index doesn't handle numeric-only hex column identifiers properly


 Key: CASSANDRA-3054
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3054
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.8.4
Reporter: Dan Kuebrich
Priority: Trivial


CLI drop index doesn't accept requests to drop columns whose hex names include 
only numeric characters.  The 617070 column name below is col2.

[default@Host] use MyKeyspace;
Authenticated to keyspace: MyKeyspace
[default@Host] drop index on MyCF.617070; 
Syntax error at position 22: mismatched input '617070' expecting Identifier

While drop index seems to parse correctly with alpha chars included:

[default@Host] drop index on MyCF.617070x;
Column '617070x' definition was not found in ColumnFamily 'MyCF'.
[default@Host] drop index on MyCF.col2;
Column 'col2' definition was not found in ColumnFamily 'MyCF'.

cassandra-user thread: 
http://mail-archives.apache.org/mod_mbox/cassandra-user/201108.mbox/%3cb2d1533b-c69e-467a-9653-1d086e332...@thelastpickle.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-1391) Allow Concurrent Schema Migrations

2011-08-18 Thread Pavel Yaskevich (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-1391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-1391:
---

Fix Version/s: 1.0

 Allow Concurrent Schema Migrations
 --

 Key: CASSANDRA-1391
 URL: https://issues.apache.org/jira/browse/CASSANDRA-1391
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Pavel Yaskevich
 Fix For: 1.0


 CASSANDRA-1292 fixed multiple migrations started from the same node to 
 properly queue themselves, but it is still possible for migrations initiated 
 on different nodes to conflict and leave the cluster in a bad state. Since 
 the system_add/drop/rename methods are accessible directly from the client 
 API, they should be completely safe for concurrent use.
 It should be possible to allow for most types of concurrent migrations by 
 converting the UUID schema ID into a VersionVectorClock (as provided by 
 CASSANDRA-580).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2280) Request specific column families using StreamIn

2011-08-18 Thread Huy Le (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087077#comment-13087077
 ] 

Huy Le commented on CASSANDRA-2280:
---

Thanks Jonathan.

Is 1.0 tentative release date still Oct 8th? We are currently running 0.6.11 
and would like to upgrade to 0.8.x, but this issue is very much a show stopper. 
 We run repair every weekend on our 0.6.11 production environment, but the kind 
of load that I saw while testing repair 0.8.4 in our testing environment is not 
suitable for production environment.



 Request specific column families using StreamIn
 ---

 Key: CASSANDRA-2280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2280
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Jonathan Ellis
 Fix For: 1.0

 Attachments: 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 2280-v3.txt, 
 2280-v4.txt, 2280-v5.txt


 StreamIn.requestRanges only specifies a keyspace, meaning that requesting a 
 range will request it for all column families: if you have a large number of 
 CFs, this can cause quite a headache.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3055) Add links to books covering supported Cassandra versions

2011-08-18 Thread Jonathan Ellis (JIRA)
Add links to books covering supported Cassandra versions


 Key: CASSANDRA-3055
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3055
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor


(The PMC considers stable and oldstable versions to be supported.  
Currently, that means 0.8.x and 0.7.x.)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3055) Add links to books covering supported Cassandra versions

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3055:
--

Attachment: 3055.txt

The only book that currently meets this criterion is Cassandra High 
Performance Cookbook.  Patch attached.

 Add links to books covering supported Cassandra versions
 

 Key: CASSANDRA-3055
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3055
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Attachments: 3055.txt


 (The PMC considers stable and oldstable versions to be supported.  
 Currently, that means 0.8.x and 0.7.x.)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3055) Add links to books covering supported Cassandra versions

2011-08-18 Thread Gary Dusbabek (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087085#comment-13087085
 ] 

Gary Dusbabek commented on CASSANDRA-3055:
--

+1

 Add links to books covering supported Cassandra versions
 

 Key: CASSANDRA-3055
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3055
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Attachments: 3055.txt


 (The PMC considers stable and oldstable versions to be supported.  
 Currently, that means 0.8.x and 0.7.x.)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3055) Add links to books covering supported Cassandra versions

2011-08-18 Thread Eric Evans (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087088#comment-13087088
 ] 

Eric Evans commented on CASSANDRA-3055:
---

+1

 Add links to books covering supported Cassandra versions
 

 Key: CASSANDRA-3055
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3055
 Project: Cassandra
  Issue Type: Task
  Components: Documentation  website
Reporter: Jonathan Ellis
Assignee: Jonathan Ellis
Priority: Minor
 Attachments: 3055.txt


 (The PMC considers stable and oldstable versions to be supported.  
 Currently, that means 0.8.x and 0.7.x.)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3054) CLI drop index doesn't handle numeric-only hex column identifiers properly

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3054:
--

Fix Version/s: 0.8.5
 Assignee: Pavel Yaskevich

 CLI drop index doesn't handle numeric-only hex column identifiers properly
 

 Key: CASSANDRA-3054
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3054
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Affects Versions: 0.8.4
Reporter: Dan Kuebrich
Assignee: Pavel Yaskevich
Priority: Trivial
 Fix For: 0.8.5


 CLI drop index doesn't accept requests to drop columns whose hex names 
 include only numeric characters.  The 617070 column name below is col2.
 [default@Host] use MyKeyspace;
 Authenticated to keyspace: MyKeyspace
 [default@Host] drop index on MyCF.617070; 
 Syntax error at position 22: mismatched input '617070' expecting Identifier
 While drop index seems to parse correctly with alpha chars included:
 [default@Host] drop index on MyCF.617070x;
 Column '617070x' definition was not found in ColumnFamily 'MyCF'.
 [default@Host] drop index on MyCF.col2;
 Column 'col2' definition was not found in ColumnFamily 'MyCF'.
 cassandra-user thread: 
 http://mail-archives.apache.org/mod_mbox/cassandra-user/201108.mbox/%3cb2d1533b-c69e-467a-9653-1d086e332...@thelastpickle.com%3E

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2280) Request specific column families using StreamIn

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087089#comment-13087089
 ] 

Jonathan Ellis commented on CASSANDRA-2280:
---

This is present in 0.6 too, so not sure how to explain that. :)

 Request specific column families using StreamIn
 ---

 Key: CASSANDRA-2280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2280
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Jonathan Ellis
 Fix For: 1.0

 Attachments: 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 2280-v3.txt, 
 2280-v4.txt, 2280-v5.txt


 StreamIn.requestRanges only specifies a keyspace, meaning that requesting a 
 range will request it for all column families: if you have a large number of 
 CFs, this can cause quite a headache.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2280) Request specific column families using StreamIn

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087090#comment-13087090
 ] 

Jonathan Ellis commented on CASSANDRA-2280:
---

(Yes, still shooting for Oct 8 on 1.0.)

 Request specific column families using StreamIn
 ---

 Key: CASSANDRA-2280
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2280
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Stu Hood
Assignee: Jonathan Ellis
 Fix For: 1.0

 Attachments: 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 
 0001-Allow-specific-column-families-to-be-requested-for-str.txt, 2280-v3.txt, 
 2280-v4.txt, 2280-v5.txt


 StreamIn.requestRanges only specifies a keyspace, meaning that requesting a 
 range will request it for all column families: if you have a large number of 
 CFs, this can cause quite a headache.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1159297 - in /cassandra/site: publish/index.html src/content/index.html

2011-08-18 Thread jbellis
Author: jbellis
Date: Thu Aug 18 16:17:45 2011
New Revision: 1159297

URL: http://svn.apache.org/viewvc?rev=1159297view=rev
Log:
add Dead Trees section
patch by jbellis; reviewed by gdusbabek and eevans for CASSANDRA-3055

Modified:
cassandra/site/publish/index.html
cassandra/site/src/content/index.html

Modified: cassandra/site/publish/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/publish/index.html?rev=1159297r1=1159296r2=1159297view=diff
==
--- cassandra/site/publish/index.html (original)
+++ cassandra/site/publish/index.html Thu Aug 18 16:17:45 2011
@@ -208,7 +208,12 @@
 Many of the Cassandra developers and community members hang out in the 
b#cassandra/b channel on a href=http://freenode.net/; title=Freenode IRC 
networkirc.freenode.net/a.
 /p
 p
-If you are new to IRC and don't have a client, you can use a 
href=http://webchat.freenode.net/?channels=#cassandra; title=Connect to 
#cassandra using webchata web-based client/a.
+If you are new to IRC, you can use a 
href=http://webchat.freenode.net/?channels=#cassandra; title=Connect to 
#cassandra using webchata web-based client/a.
+/p
+
+h3 class=hdrDead Trees/h3
+p
+a 
href=http://www.packtpub.com/cassandra-apache-high-performance-cookbook/book;Cassandra
 High Performance Cookbook/a, by Ed Capriolo.  Covers Cassandra 0.8.  Also a 
href=http://www.amazon.com/Cassandra-Performance-Cookbook-Edward-Capriolo/dp/1849515123;on
 Amazon/a.
 /p
   /div
 /div

Modified: cassandra/site/src/content/index.html
URL: 
http://svn.apache.org/viewvc/cassandra/site/src/content/index.html?rev=1159297r1=1159296r2=1159297view=diff
==
--- cassandra/site/src/content/index.html (original)
+++ cassandra/site/src/content/index.html Thu Aug 18 16:17:45 2011
@@ -146,7 +146,12 @@
 Many of the Cassandra developers and community members hang out in the 
b#cassandra/b channel on a href=http://freenode.net/; title=Freenode IRC 
networkirc.freenode.net/a.
 /p
 p
-If you are new to IRC and don't have a client, you can use a 
href=http://webchat.freenode.net/?channels=#cassandra; title=Connect to 
#cassandra using webchata web-based client/a.
+If you are new to IRC, you can use a 
href=http://webchat.freenode.net/?channels=#cassandra; title=Connect to 
#cassandra using webchata web-based client/a.
+/p
+
+h3 class=hdrDead Trees/h3
+p
+a 
href=http://www.packtpub.com/cassandra-apache-high-performance-cookbook/book;Cassandra
 High Performance Cookbook/a, by Ed Capriolo.  Covers Cassandra 0.8.  Also a 
href=http://www.amazon.com/Cassandra-Performance-Cookbook-Edward-Capriolo/dp/1849515123;on
 Amazon/a.
 /p
   /div
 /div




[jira] [Updated] (CASSANDRA-292) Cassandra should be runnable as a Windows service and distribute a Windows installer

2011-08-18 Thread Benjamin Coverston (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Coverston updated CASSANDRA-292:
-

Attachment: (was: 0001-adding-windows-service-option-to-cassandra.patch)

 Cassandra should be runnable as a Windows service and distribute a Windows 
 installer
 

 Key: CASSANDRA-292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
 Environment: OS: Windows
Reporter: Michael Greene
Assignee: Benjamin Coverston
Priority: Minor
 Attachments: 0001-added-shutdown-hook.patch, windows.zip, 
 windows_u1.zip


 In addition to the tarballs already distributed, Cassandra should distribute 
 an exe installer that can install the Cassandra daemon as a Windows service.
 Tomcat's NSIS scripts can be used as a reference for the installer: 
 http://svn.apache.org/repos/asf/tomcat/trunk/res/
 Apache Commons Daemon's procrun would probably be used to create the Win32 
 service: http://commons.apache.org/daemon/procrun.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-292) Cassandra should be runnable as a Windows service and distribute a Windows installer

2011-08-18 Thread Benjamin Coverston (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Coverston updated CASSANDRA-292:
-

Attachment: 0001-added-shutdown-hook.patch

Added a shutdown hook s.t. the service will stop when connections are active.

 Cassandra should be runnable as a Windows service and distribute a Windows 
 installer
 

 Key: CASSANDRA-292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
 Environment: OS: Windows
Reporter: Michael Greene
Assignee: Benjamin Coverston
Priority: Minor
 Attachments: 0001-added-shutdown-hook.patch, windows.zip, 
 windows_u1.zip


 In addition to the tarballs already distributed, Cassandra should distribute 
 an exe installer that can install the Cassandra daemon as a Windows service.
 Tomcat's NSIS scripts can be used as a reference for the installer: 
 http://svn.apache.org/repos/asf/tomcat/trunk/res/
 Apache Commons Daemon's procrun would probably be used to create the Win32 
 service: http://commons.apache.org/daemon/procrun.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3056) Able to set path location of HeapDump in cassandra-env

2011-08-18 Thread David Talbott (JIRA)
Able to set path location of HeapDump in cassandra-env
--

 Key: CASSANDRA-3056
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3056
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.4, 0.7.8
Reporter: David Talbott
Priority: Minor


We should be able to designate the path location to put any perf dumps that are 
performed. By Default with this not set the perf dump can occur on the root 
disk and fill the drive. 

Should be able to solve this by simply inserting JVM_OPTS=$JVM_OPTS 
-XX:+HeapDumpPath=path to dir into cassandra-env.sh as a default option 
available and set. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3056) Able to set path location of HeapDump in cassandra-env

2011-08-18 Thread David Talbott (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Talbott updated CASSANDRA-3056:
-

Description: 
We should be able to designate the path location to put any perf dumps that are 
performed. By Default with this not set the perf dump can occur on the root 
disk and fill the drive. 

Should be able to solve this by simply inserting JVM_OPTS=$JVM_OPTS 
-XX:HeapDumpPath=path to dir into cassandra-env.sh as a default option 
available and set. 

  was:
We should be able to designate the path location to put any perf dumps that are 
performed. By Default with this not set the perf dump can occur on the root 
disk and fill the drive. 

Should be able to solve this by simply inserting JVM_OPTS=$JVM_OPTS 
-XX:+HeapDumpPath=path to dir into cassandra-env.sh as a default option 
available and set. 


 Able to set path location of HeapDump in cassandra-env
 --

 Key: CASSANDRA-3056
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3056
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.7.8, 0.8.4
Reporter: David Talbott
Priority: Minor

 We should be able to designate the path location to put any perf dumps that 
 are performed. By Default with this not set the perf dump can occur on the 
 root disk and fill the drive. 
 Should be able to solve this by simply inserting JVM_OPTS=$JVM_OPTS 
 -XX:HeapDumpPath=path to dir into cassandra-env.sh as a default option 
 available and set. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3052) CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement

2011-08-18 Thread Cathy Daw (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087113#comment-13087113
 ] 

Cathy Daw commented on CASSANDRA-3052:
--

Hi Rick,

I am using a test harness which runs cql from a flat file, and up until this 
point all queries ran fine through executeQuery().

Thanks,
Cathy

 CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement
 

 Key: CASSANDRA-3052
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3052
 Project: Cassandra
  Issue Type: Bug
Reporter: Cathy Daw
  Labels: cql

 This test script used to work until I upgraded the jdbc driver to 1.0.4.
 *CQL 1.0.4*: apache-cassandra-cql-1.0.4-SNAPSHOT.jar build at revision 1158979
 *Repro Script*: 
 * drop in test directory, change package declaration and run:  ant test 
 -Dtest.name=resultSetNPE
 * The script gives you a NullPointerException when you uncomment out the 
 following lines after a CREATE or INSERT statement.
 {code}
 colCount = res.getMetaData().getColumnCount();
 res.next();
 {code}
 * Please note that there is no need to comment out those lines if a SELECT 
 statement was run prior.
 {code}
 package com.datastax.bugs;
 import java.sql.DriverManager;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import org.junit.Test;
 public class resultSetNPE {
 
 @Test
 public void createKS() throws Exception {   
 Connection initConn = null;
 Connection connection = null;
 ResultSet res;
 Statement stmt;
 int colCount = 0;
 
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 
 // Check create keyspace
 initConn = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/default); 
 stmt = initConn.createStatement();
 try {
   System.out.println(Running DROP KS Statement);  
   res = stmt.executeQuery(DROP KEYSPACE ks1);  
   // res.next();
   
 } catch (SQLException e) {
 if (e.getMessage().startsWith(Keyspace does not exist)) 
 {
 // Do nothing - this just means you tried to drop something 
 that was not there.
 // res = stmt.executeQuery(CREATE KEYSPACE ks1 with 
 strategy_class =  'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 } 
 }   
   
 System.out.println(Running CREATE KS Statement);
 res = stmt.executeQuery(CREATE KEYSPACE ks1 with strategy_class =  
 'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 // res.next();
 initConn.close();
 }  
  
 @Test
 public void createCF() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 System.out.print(Running CREATE CF Statement);
 ResultSet res = stmt.executeQuery(CREATE COLUMNFAMILY users (KEY 
 varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, 
 state varchar, birth_year bigint));
 
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 connection.close();   
 }  
 
 @Test
 public void simpleSelect() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 
 System.out.print(Running INSERT Statement);
 ResultSet res = stmt.executeQuery(INSERT INTO users (KEY, password) 
 VALUES ('user1', 'ch@nge'));  
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 System.out.print(Running SELECT Statement);
 res = stmt.executeQuery(SELECT KEY, gender, state FROM users);  
 colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 res.getRow();
 res.next();
 
 connection.close(); 
 }  
 }
 {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3052) CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087117#comment-13087117
 ] 

Jonathan Ellis commented on CASSANDRA-3052:
---

Unfortunate that improving our spec-compliance broke the test harness, but Rick 
is correct: the JDBC spec says that executeQuery may only be used for SQL 
returning a resultset, otherwise you must use executeUpdate.

Since CQL is relatively simple I don't think you need to get much more 
sophisticated than if statement.startswith(select) executeQuery, else 
executeUpdate.

 CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement
 

 Key: CASSANDRA-3052
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3052
 Project: Cassandra
  Issue Type: Bug
Reporter: Cathy Daw
  Labels: cql

 This test script used to work until I upgraded the jdbc driver to 1.0.4.
 *CQL 1.0.4*: apache-cassandra-cql-1.0.4-SNAPSHOT.jar build at revision 1158979
 *Repro Script*: 
 * drop in test directory, change package declaration and run:  ant test 
 -Dtest.name=resultSetNPE
 * The script gives you a NullPointerException when you uncomment out the 
 following lines after a CREATE or INSERT statement.
 {code}
 colCount = res.getMetaData().getColumnCount();
 res.next();
 {code}
 * Please note that there is no need to comment out those lines if a SELECT 
 statement was run prior.
 {code}
 package com.datastax.bugs;
 import java.sql.DriverManager;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import org.junit.Test;
 public class resultSetNPE {
 
 @Test
 public void createKS() throws Exception {   
 Connection initConn = null;
 Connection connection = null;
 ResultSet res;
 Statement stmt;
 int colCount = 0;
 
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 
 // Check create keyspace
 initConn = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/default); 
 stmt = initConn.createStatement();
 try {
   System.out.println(Running DROP KS Statement);  
   res = stmt.executeQuery(DROP KEYSPACE ks1);  
   // res.next();
   
 } catch (SQLException e) {
 if (e.getMessage().startsWith(Keyspace does not exist)) 
 {
 // Do nothing - this just means you tried to drop something 
 that was not there.
 // res = stmt.executeQuery(CREATE KEYSPACE ks1 with 
 strategy_class =  'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 } 
 }   
   
 System.out.println(Running CREATE KS Statement);
 res = stmt.executeQuery(CREATE KEYSPACE ks1 with strategy_class =  
 'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 // res.next();
 initConn.close();
 }  
  
 @Test
 public void createCF() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 System.out.print(Running CREATE CF Statement);
 ResultSet res = stmt.executeQuery(CREATE COLUMNFAMILY users (KEY 
 varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, 
 state varchar, birth_year bigint));
 
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 connection.close();   
 }  
 
 @Test
 public void simpleSelect() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 
 System.out.print(Running INSERT Statement);
 ResultSet res = stmt.executeQuery(INSERT INTO users (KEY, password) 
 VALUES ('user1', 'ch@nge'));  
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 System.out.print(Running SELECT Statement);
 res = stmt.executeQuery(SELECT KEY, gender, state FROM users);  
 colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 res.getRow();
 res.next();
   

[Cassandra Wiki] Update of FrontPage by daisyjrt

2011-08-18 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The FrontPage page has been changed by daisyjrt:
http://wiki.apache.org/cassandra/FrontPage?action=diffrev1=65rev2=66

   * Commits: commits@cassandra.apache.org 
[[mailto:commits-subscr...@cassandra.apache.org|(subscribe)]]
  
  == Related Information ==
-  * [[http://incubator.apache.org/thrift|Thrift]], used by Cassandra for 
client access
+  * [[http://www.bohemjewel.com|Unique]], used by Cassandra for client access
   * RelatedProjects: Projects using or extending Cassandra
  
  == Google SoC 2010 Page ==


[Cassandra Wiki] Update of ClientOptions07 by Guido Appenzeller

2011-08-18 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on Cassandra Wiki for 
change notification.

The ClientOptions07 page has been changed by Guido Appenzeller:
http://wiki.apache.org/cassandra/ClientOptions07?action=diffrev1=132rev2=133

   * Python:
* Pycassa: http://github.com/pycassa/pycassa
* Telephus: http://github.com/driftx/Telephus (Twisted)
+   * Django: https://github.com/vaterlaus/django_cassandra_backend
   * Java:
* [[DatanucleusJDO|Datanucleus JDO]]: 
http://github.com/tnine/Datanucleus-Cassandra-Plugin '''[this is deprecated] '''
* Hector JPA: https://github.com/riptano/hector-jpa  '''Replacement for the 
above plugin'''


[jira] [Commented] (CASSANDRA-3052) CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement

2011-08-18 Thread Cathy Daw (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087186#comment-13087186
 ] 

Cathy Daw commented on CASSANDRA-3052:
--

I will make the updates to the test harness as recommended above.

 CQL: ResultSet.next() gives NPE when run after an INSERT or CREATE statement
 

 Key: CASSANDRA-3052
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3052
 Project: Cassandra
  Issue Type: Bug
Reporter: Cathy Daw
  Labels: cql

 This test script used to work until I upgraded the jdbc driver to 1.0.4.
 *CQL 1.0.4*: apache-cassandra-cql-1.0.4-SNAPSHOT.jar build at revision 1158979
 *Repro Script*: 
 * drop in test directory, change package declaration and run:  ant test 
 -Dtest.name=resultSetNPE
 * The script gives you a NullPointerException when you uncomment out the 
 following lines after a CREATE or INSERT statement.
 {code}
 colCount = res.getMetaData().getColumnCount();
 res.next();
 {code}
 * Please note that there is no need to comment out those lines if a SELECT 
 statement was run prior.
 {code}
 package com.datastax.bugs;
 import java.sql.DriverManager;
 import java.sql.Connection;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 import org.junit.Test;
 public class resultSetNPE {
 
 @Test
 public void createKS() throws Exception {   
 Connection initConn = null;
 Connection connection = null;
 ResultSet res;
 Statement stmt;
 int colCount = 0;
 
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 
 // Check create keyspace
 initConn = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/default); 
 stmt = initConn.createStatement();
 try {
   System.out.println(Running DROP KS Statement);  
   res = stmt.executeQuery(DROP KEYSPACE ks1);  
   // res.next();
   
 } catch (SQLException e) {
 if (e.getMessage().startsWith(Keyspace does not exist)) 
 {
 // Do nothing - this just means you tried to drop something 
 that was not there.
 // res = stmt.executeQuery(CREATE KEYSPACE ks1 with 
 strategy_class =  'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 } 
 }   
   
 System.out.println(Running CREATE KS Statement);
 res = stmt.executeQuery(CREATE KEYSPACE ks1 with strategy_class =  
 'org.apache.cassandra.locator.SimpleStrategy' and 
 strategy_options:replication_factor=1);  
 // res.next();
 initConn.close();
 }  
  
 @Test
 public void createCF() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 System.out.print(Running CREATE CF Statement);
 ResultSet res = stmt.executeQuery(CREATE COLUMNFAMILY users (KEY 
 varchar PRIMARY KEY, password varchar, gender varchar, session_token varchar, 
 state varchar, birth_year bigint));
 
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 connection.close();   
 }  
 
 @Test
 public void simpleSelect() throws Exception 
 {   
 Class.forName(org.apache.cassandra.cql.jdbc.CassandraDriver);
 int colCount = 0;
 Connection connection = 
 DriverManager.getConnection(jdbc:cassandra://127.0.0.1:9160/ks1); 
 Statement stmt = connection.createStatement();
 
 System.out.print(Running INSERT Statement);
 ResultSet res = stmt.executeQuery(INSERT INTO users (KEY, password) 
 VALUES ('user1', 'ch@nge'));  
 //colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 //res.next();
 
 System.out.print(Running SELECT Statement);
 res = stmt.executeQuery(SELECT KEY, gender, state FROM users);  
 colCount = res.getMetaData().getColumnCount();
 System.out.println( -- Column Count:  + colCount); 
 res.getRow();
 res.next();
 
 connection.close(); 
 }  
 }
 {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3056) Able to set path location of HeapDump in cassandra-env

2011-08-18 Thread Brandon Williams (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-3056:


Labels: lhf  (was: )

 Able to set path location of HeapDump in cassandra-env
 --

 Key: CASSANDRA-3056
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3056
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.7.8, 0.8.4
Reporter: David Talbott
Priority: Minor
  Labels: lhf

 We should be able to designate the path location to put any perf dumps that 
 are performed. By Default with this not set the perf dump can occur on the 
 root disk and fill the drive. 
 Should be able to solve this by simply inserting JVM_OPTS=$JVM_OPTS 
 -XX:HeapDumpPath=path to dir into cassandra-env.sh as a default option 
 available and set. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-292) Cassandra should be runnable as a Windows service and distribute a Windows installer

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087212#comment-13087212
 ] 

Jonathan Ellis commented on CASSANDRA-292:
--

Is there a reason to keep the commented-out lines in cassandra.bat?

 Cassandra should be runnable as a Windows service and distribute a Windows 
 installer
 

 Key: CASSANDRA-292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
 Environment: OS: Windows
Reporter: Michael Greene
Assignee: Benjamin Coverston
Priority: Minor
 Attachments: 0001-added-shutdown-hook.patch, windows.zip, 
 windows_u1.zip


 In addition to the tarballs already distributed, Cassandra should distribute 
 an exe installer that can install the Cassandra daemon as a Windows service.
 Tomcat's NSIS scripts can be used as a reference for the installer: 
 http://svn.apache.org/repos/asf/tomcat/trunk/res/
 Apache Commons Daemon's procrun would probably be used to create the Win32 
 service: http://commons.apache.org/daemon/procrun.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-292) Cassandra should be runnable as a Windows service and distribute a Windows installer

2011-08-18 Thread Benjamin Coverston (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087214#comment-13087214
 ] 

Benjamin Coverston commented on CASSANDRA-292:
--

Only the explanatory comments, I'll get rid of the extra ones.

 Cassandra should be runnable as a Windows service and distribute a Windows 
 installer
 

 Key: CASSANDRA-292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
 Environment: OS: Windows
Reporter: Michael Greene
Assignee: Benjamin Coverston
Priority: Minor
 Attachments: 0001-added-shutdown-hook.patch, windows.zip, 
 windows_u1.zip


 In addition to the tarballs already distributed, Cassandra should distribute 
 an exe installer that can install the Cassandra daemon as a Windows service.
 Tomcat's NSIS scripts can be used as a reference for the installer: 
 http://svn.apache.org/repos/asf/tomcat/trunk/res/
 Apache Commons Daemon's procrun would probably be used to create the Win32 
 service: http://commons.apache.org/daemon/procrun.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1159372 - /cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java

2011-08-18 Thread jbellis
Author: jbellis
Date: Thu Aug 18 19:38:40 2011
New Revision: 1159372

URL: http://svn.apache.org/viewvc?rev=1159372view=rev
Log:
load access.properties for each request so you don't have to restart server to 
see changes
patch by Thomas Peuss; reviewed by jbellis for CASSANDRA-3048

Modified:
cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java?rev=1159372r1=1159371r2=1159372view=diff
==
--- cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java Thu 
Aug 18 19:38:40 2011
@@ -21,20 +21,22 @@ package org.apache.cassandra.auth;
  */
 
 
+import java.io.BufferedInputStream;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.io.InputStream;
 import java.util.EnumSet;
 import java.util.List;
 import java.util.Properties;
 
 import org.apache.cassandra.config.ConfigurationException;
+import org.apache.cassandra.io.util.FileUtils;
 
 public class SimpleAuthority implements IAuthority
 {
 public final static String ACCESS_FILENAME_PROPERTY = access.properties;
 // magical property for WRITE permissions to the keyspaces list
 public final static String KEYSPACES_WRITE_PROPERTY = modify-keyspaces;
-private Properties accessProperties = null;
 
 public EnumSetPermission authorize(AuthenticatedUser user, ListObject 
resource)
 {
@@ -68,17 +70,13 @@ public class SimpleAuthority implements 
 }
 
 String accessFilename = System.getProperty(ACCESS_FILENAME_PROPERTY);
+InputStream in=null;
 try
 {
-// TODO: auto-reload when the file has been updated
-if (accessProperties == null)   // Don't hit the disk on every 
invocation
-{
-FileInputStream in = new FileInputStream(accessFilename);
-accessProperties = new Properties();
-accessProperties.load(in);
-in.close();
-}
-
+in = new BufferedInputStream(new FileInputStream(accessFilename));
+Properties accessProperties = new Properties();
+accessProperties.load(in);
+
 // Special case access to the keyspace list
 if (keyspace == KEYSPACES_WRITE_PROPERTY)
 {
@@ -138,6 +136,10 @@ public class SimpleAuthority implements 
  accessFilename,
  e.getMessage()));
 }
+finally
+{
+FileUtils.closeQuietly(in);
+}
 
 return authorized;
 }




[jira] [Resolved] (CASSANDRA-3048) SimpleAuthority should reload property file automatically

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis resolved CASSANDRA-3048.
---

   Resolution: Fixed
Fix Version/s: 1.0
 Reviewer: jbellis
 Assignee: Thomas Peuss

Ah, I see.  That's fine, it's intended more as a demo than anything.  Committed.

 SimpleAuthority should reload property file automatically
 -

 Key: CASSANDRA-3048
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3048
 Project: Cassandra
  Issue Type: Improvement
Reporter: Thomas Peuss
Assignee: Thomas Peuss
Priority: Minor
 Fix For: 1.0

 Attachments: CASSANDRA-3048.patch


 Currently you need a restart of Cassandra to load a changed access.properties 
 file. This is very annoying. The patch changes the behaviour of 
 SimpleAuthority to match the behaviour of SimpleAuthenticator.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1159374 - /cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java

2011-08-18 Thread jbellis
Author: jbellis
Date: Thu Aug 18 19:41:36 2011
New Revision: 1159374

URL: http://svn.apache.org/viewvc?rev=1159374view=rev
Log:
update EH.equals to work with any Object
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-3053

Modified:
cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java?rev=1159374r1=1159373r2=1159374view=diff
==
--- cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java 
Thu Aug 18 19:41:36 2011
@@ -188,10 +188,18 @@ public class EstimatedHistogram
 return buckets.get(buckets.length() - 1)  0;
 }
 
-public boolean equals(EstimatedHistogram o)
+@Override
+public boolean equals(Object o)
 {
-return Arrays.equals(getBucketOffsets(), o.getBucketOffsets()) 
-   Arrays.equals(getBuckets(false), o.getBuckets(false));
+if (this == o)
+return true;
+
+if (!(o instanceof EstimatedHistogram))
+return false;
+
+EstimatedHistogram that = (EstimatedHistogram) o;
+return Arrays.equals(getBucketOffsets(), that.getBucketOffsets()) 
+   Arrays.equals(getBuckets(false), that.getBuckets(false));
 }
 
 public static class EstimatedHistogramSerializer implements 
ICompactSerializer2EstimatedHistogram




[jira] [Resolved] (CASSANDRA-3053) [patch] EstimatedHIstogram doesn't overide equals correctly

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis resolved CASSANDRA-3053.
---

   Resolution: Fixed
Fix Version/s: 1.0
 Reviewer: jbellis
 Assignee: Dave Brosius

committed, thanks!

 [patch] EstimatedHIstogram doesn't overide equals correctly
 ---

 Key: CASSANDRA-3053
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3053
 Project: Cassandra
  Issue Type: Bug
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 1.0

 Attachments: override_equals.diff


 EstimatedHistogram declares equals with an EstimatedHistogram parameter, 
 instead of Object, thus only working correctly for statically typed 
 EstimatedHistogram references. Fixed to take Object parm.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3048) SimpleAuthority should reload property file automatically

2011-08-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087252#comment-13087252
 ] 

Hudson commented on CASSANDRA-3048:
---

Integrated in Cassandra #1034 (See 
[https://builds.apache.org/job/Cassandra/1034/])
load access.properties for each request so you don't have to restart server 
to see changes
patch by Thomas Peuss; reviewed by jbellis for CASSANDRA-3048

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1159372
Files : 
* /cassandra/trunk/src/java/org/apache/cassandra/auth/SimpleAuthority.java


 SimpleAuthority should reload property file automatically
 -

 Key: CASSANDRA-3048
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3048
 Project: Cassandra
  Issue Type: Improvement
Reporter: Thomas Peuss
Assignee: Thomas Peuss
Priority: Minor
 Fix For: 1.0

 Attachments: CASSANDRA-3048.patch


 Currently you need a restart of Cassandra to load a changed access.properties 
 file. This is very annoying. The patch changes the behaviour of 
 SimpleAuthority to match the behaviour of SimpleAuthenticator.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3053) [patch] EstimatedHIstogram doesn't overide equals correctly

2011-08-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087253#comment-13087253
 ] 

Hudson commented on CASSANDRA-3053:
---

Integrated in Cassandra #1034 (See 
[https://builds.apache.org/job/Cassandra/1034/])
update EH.equals to work with any Object
patch by Dave Brosius; reviewed by jbellis for CASSANDRA-3053

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1159374
Files : 
* /cassandra/trunk/src/java/org/apache/cassandra/utils/EstimatedHistogram.java


 [patch] EstimatedHIstogram doesn't overide equals correctly
 ---

 Key: CASSANDRA-3053
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3053
 Project: Cassandra
  Issue Type: Bug
Reporter: Dave Brosius
Assignee: Dave Brosius
Priority: Trivial
 Fix For: 1.0

 Attachments: override_equals.diff


 EstimatedHistogram declares equals with an EstimatedHistogram parameter, 
 instead of Object, thus only working correctly for statically typed 
 EstimatedHistogram references. Fixed to take Object parm.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-292) Cassandra should be runnable as a Windows service

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-292:
-

Summary: Cassandra should be runnable as a Windows service  (was: Cassandra 
should be runnable as a Windows service and distribute a Windows installer)

 Cassandra should be runnable as a Windows service
 -

 Key: CASSANDRA-292
 URL: https://issues.apache.org/jira/browse/CASSANDRA-292
 Project: Cassandra
  Issue Type: New Feature
  Components: Tools
 Environment: OS: Windows
Reporter: Michael Greene
Assignee: Benjamin Coverston
Priority: Minor
 Attachments: 0001-added-shutdown-hook.patch, windows.zip, 
 windows_u1.zip


 In addition to the tarballs already distributed, Cassandra should distribute 
 an exe installer that can install the Cassandra daemon as a Windows service.
 Tomcat's NSIS scripts can be used as a reference for the installer: 
 http://svn.apache.org/repos/asf/tomcat/trunk/res/
 Apache Commons Daemon's procrun would probably be used to create the Win32 
 service: http://commons.apache.org/daemon/procrun.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Jackson Chung (JIRA)
secondary index on a column that has a value of size  64k will fail on flush
-

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Priority: Minor


exception seen on flush when an indexed column contain size  64k:

granted that having a value  64k possibly mean something that shouldn't be 
indexed as it most likely would have a high cardinality, but i think there 
would still be some valid use case for it.

test case:
simply run the stress test with 
-n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS

then call a flush

exception:
 INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) Writing 
Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
(line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
java.lang.AssertionError: 65536
at 
org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
at 
org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
at 
org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
at 
org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis reassigned CASSANDRA-3057:
-

Assignee: Pavel Yaskevich

Let's add a ThriftValidation check that values inserted into an indexed column 
are less than the short length.

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor

 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Matthew F. Dennis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087340#comment-13087340
 ] 

Matthew F. Dennis commented on CASSANDRA-3057:
--

+1 on validation approach (rejecting indexed values  max column name size) + 
useful error message can't index column value of size A for index B in CF C of 
KS D instead of assertion spew

for durability of previous conversations: the problem is the value in a column 
ends up as the name in a the index column family.  So, if you try to index a 
value that is greater than the max column name size it is not handled well.

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor

 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087342#comment-13087342
 ] 

Jonathan Ellis commented on CASSANDRA-3057:
---

(technically, the value becomes a row key, which happens to have the same size 
limit as column names.)

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor

 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Pavel Yaskevich (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-3057:
---

Attachment: CASSANDRA-3057.patch

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Pavel Yaskevich (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Yaskevich updated CASSANDRA-3057:
---

Fix Version/s: 0.8.5

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3025) PHP/PDO driver for Cassandra CQL

2011-08-18 Thread paul cannon (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3025?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

paul cannon updated CASSANDRA-3025:
---

Attachment: php_test_results_20110818_2317.txt

So, I found it necessary to symlink pdo.so from my normal php extension dir 
into modules/, and run make test hijacking the $TESTS variable in order to 
pass some extra arguments:

{noformat}
  make test TESTS='-d extension=pdo.so'
{noformat}

Not clear whether there's supposed to be an easier way to load a shared pdo 
lib. Anyway, once I got the tests to run in what looks like the right way, 9 
out of 16 fail. I'm attaching the test results. Probably it's just some other 
dumb thing related to this Debian php setup. Or maybe is this not meant to work 
against cassandra 0.8.x?

 PHP/PDO driver for Cassandra CQL
 

 Key: CASSANDRA-3025
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3025
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Mikko Koppanen
  Labels: php
 Attachments: pdo_cassandra-0.1.0.tgz, 
 php_test_results_20110818_2317.txt


 Hello,
 attached is the initial version of the PDO driver for Cassandra CQL language. 
 This is a native PHP extension written in what I would call a combination of 
 C and C++, due to PHP being C. The thrift API used is the C++.
 The API looks roughly following:
 {code}
 ?php
 $db = new PDO('cassandra:host=127.0.0.1;port=9160');
 $db-exec (CREATE KEYSPACE mytest with strategy_class = 'SimpleStrategy' and 
 strategy_options:replication_factor=1;);
 $db-exec (USE mytest);
 $db-exec (CREATE COLUMNFAMILY users (
   my_key varchar PRIMARY KEY,
   full_name varchar ););
   
 $stmt = $db-prepare (INSERT INTO users (my_key, full_name) VALUES (:key, 
 :full_name););
 $stmt-execute (array (':key' = 'mikko', ':full_name' = 'Mikko K' ));
 {code}
 Currently prepared statements are emulated on the client side but I 
 understand that there is a plan to add prepared statements to Cassandra CQL 
 API as well. I will add this feature in to the extension as soon as they are 
 implemented.
 Additional documentation can be found in github 
 https://github.com/mkoppanen/php-pdo_cassandra, in the form of rendered 
 MarkDown file. Tests are currently not included in the package file and they 
 can be found in the github for now as well.
 I have created documentation in docbook format as well, but have not yet 
 rendered it.
 Comments and feedback are welcome.
 Thanks,
 Mikko

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3060) Boostrapping node stuck after receiving file with version mismatch

2011-08-18 Thread Benjamin Schrauwen (JIRA)
Boostrapping node stuck after receiving file with version mismatch
--

 Key: CASSANDRA-3060
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3060
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 0.8.3
Reporter: Benjamin Schrauwen
Priority: Minor


When adding a node to the cluster, the boostrapping process get's stuck when it 
receives a file which is apparently from an older version. This is the Exception

java.lang.RuntimeException: Cannot recover SSTable 
/var/lib/cassandra/data/Mollom/recent_sessions-tmp-f-1 due to version mismatch. 
(current version is g).
at 
org.apache.cassandra.io.sstable.SSTableWriter.createBuilder(SSTableWriter.java:240)
at 
org.apache.cassandra.db.compaction.CompactionManager.submitSSTableBuild(CompactionManager.java:1090)
at 
org.apache.cassandra.streaming.StreamInSession.finished(StreamInSession.java:110)
at 
org.apache.cassandra.streaming.IncomingStreamReader.readFile(IncomingStreamReader.java:104)
at 
org.apache.cassandra.streaming.IncomingStreamReader.read(IncomingStreamReader.java:61)
at 
org.apache.cassandra.net.IncomingTcpConnection.stream(IncomingTcpConnection.java:177)
at 
org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:114)


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087439#comment-13087439
 ] 

Jonathan Ellis commented on CASSANDRA-3057:
---

We're already looping through ColumnDefinitions for getValueValidator, let's 
extract a getColumnDefinition from that so we only do the search once.

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2500) Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter

2011-08-18 Thread Robert Jackson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087445#comment-13087445
 ] 

Robert Jackson commented on CASSANDRA-2500:
---

It would be fairly easy to update the fauna/cassandra gem to use an external 
thrift binding source.  The cassandra-thrift repository looks good, and I could 
get the fauna gem updated to use it pretty easily. 

We just need to figure out the specifics of where this would be managed, and 
how would the updates get pushed out.




 Ruby dbi client (for CQL) that conforms to AR:ConnectionAdapter
 ---

 Key: CASSANDRA-2500
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2500
 Project: Cassandra
  Issue Type: Task
  Components: API
Reporter: Jon Hermes
Assignee: Kelley Reynolds
  Labels: cql
 Fix For: 0.8.5

 Attachments: 2500.txt, genthriftrb.txt, rbcql-0.0.0.tgz


 Create a ruby driver for CQL.
 Lacking something standard (such as py-dbapi), going with something common 
 instead -- RoR ActiveRecord Connection Adapter 
 (http://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/AbstractAdapter.html).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3057:
--

Attachment: 3057-v3.txt

v3 attached to only do the definition lookup once.

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: 3057-v3.txt, CASSANDRA-3057-v2.patch, 
 CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Pavel Yaskevich (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087450#comment-13087450
 ] 

Pavel Yaskevich commented on CASSANDRA-3057:


Misunderstood what you meant... +1

 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: 3057-v3.txt, CASSANDRA-3057-v2.patch, 
 CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




svn commit: r1159473 - in /cassandra/branches/cassandra-0.8: CHANGES.txt src/java/org/apache/cassandra/config/CFMetaData.java src/java/org/apache/cassandra/thrift/ThriftValidation.java test/unit/org/a

2011-08-18 Thread jbellis
Author: jbellis
Date: Fri Aug 19 01:54:25 2011
New Revision: 1159473

URL: http://svn.apache.org/viewvc?rev=1159473view=rev
Log:
return an InvalidRequestException if an indexed column is assigned a value 
larger than 64K
patch by pyaskevich and jbellis for CASSANDRA-3057

Modified:
cassandra/branches/cassandra-0.8/CHANGES.txt

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java

cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java

cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java

Modified: cassandra/branches/cassandra-0.8/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/CHANGES.txt?rev=1159473r1=1159472r2=1159473view=diff
==
--- cassandra/branches/cassandra-0.8/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.8/CHANGES.txt Fri Aug 19 01:54:25 2011
@@ -13,8 +13,11 @@
(rows containing nothing but expired tombstones) (CASSANDRA-3039)
  * work around native memory leak in com.sun.management.GarbageCollectorMXBean
(CASSANDRA-2868)
- * validate that column names in column_metadata does not equal to key_alias
+ * validate that column names in column_metadata are not equal to key_alias
on create/update of the ColumnFamily and CQL 'ALTER' statement 
(CASSANDRA-3036)
+ * return an InvalidRequestException if an indexed column is assigned
+   a value larger than 64KB (CASSANDRA-3057)
+
 
 0.8.4
  * include files-to-be-streamed in StreamInSession.getSources (CASSANDRA-2972)

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java?rev=1159473r1=1159472r2=1159473view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java
 Fri Aug 19 01:54:25 2011
@@ -602,13 +602,16 @@ public final class CFMetaData
 
 public AbstractType getValueValidator(ByteBuffer column)
 {
-AbstractType validator = defaultValidator;
-ColumnDefinition columnDefinition = column_metadata.get(column);
-if (columnDefinition != null)
-validator = columnDefinition.getValidator();
-return validator;
+return getValueValidator(column_metadata.get(column));
 }
-
+
+public AbstractType getValueValidator(ColumnDefinition columnDefinition)
+{
+return columnDefinition == null
+   ? defaultValidator
+   : columnDefinition.getValidator();
+}
+
 /** applies implicit defaults to cf definition. useful in updates */
 public static void applyImplicitDefaults(org.apache.cassandra.thrift.CfDef 
cf_def) 
 {

Modified: 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java
URL: 
http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java?rev=1159473r1=1159472r2=1159473view=diff
==
--- 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java
 (original)
+++ 
cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java
 Fri Aug 19 01:54:25 2011
@@ -410,9 +410,11 @@ public class ThriftValidation
 throw new InvalidRequestException(Column value is required);
 if (!column.isSetTimestamp())
 throw new InvalidRequestException(Column timestamp is required);
+
+ColumnDefinition columnDef = metadata.getColumnDefinition(column.name);
 try
 {
-AbstractType validator = metadata.getValueValidator(column.name);
+AbstractType validator = metadata.getValueValidator(columnDef);
 if (validator != null)
 validator.validate(column.value);
 }
@@ -426,6 +428,14 @@ public class ThriftValidation
 metadata.cfName,
 (isSubColumn ? 
metadata.subcolumnComparator : metadata.comparator).getString(column.name)));
 }
+
+// Indexed column values cannot be larger than 64K.  See 
CASSANDRA-3057 for more details
+if (columnDef != null  columnDef.getIndexType() != null  
column.value.remaining()  FBUtilities.MAX_UNSIGNED_SHORT)
+throw new InvalidRequestException(String.format(Can't index 
column value of size %d for index %s in CF %s of KS %s,
+
column.value.remaining(),
+

svn commit: r1159474 - in /cassandra/trunk: ./ contrib/ interface/thrift/gen-java/org/apache/cassandra/thrift/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/cql/ src/java/org/apa

2011-08-18 Thread jbellis
Author: jbellis
Date: Fri Aug 19 01:59:22 2011
New Revision: 1159474

URL: http://svn.apache.org/viewvc?rev=1159474view=rev
Log:
merge from 0.8

Modified:
cassandra/trunk/   (props changed)
cassandra/trunk/CHANGES.txt
cassandra/trunk/contrib/   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Column.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/InvalidRequestException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/NotFoundException.java
   (props changed)

cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/SuperColumn.java
   (props changed)
cassandra/trunk/src/java/org/apache/cassandra/config/CFMetaData.java
cassandra/trunk/src/java/org/apache/cassandra/cql/AlterTableStatement.java

cassandra/trunk/src/java/org/apache/cassandra/cql/CreateColumnFamilyStatement.java
cassandra/trunk/src/java/org/apache/cassandra/cql/QueryProcessor.java
cassandra/trunk/src/java/org/apache/cassandra/gms/VersionedValue.java
cassandra/trunk/src/java/org/apache/cassandra/thrift/ThriftValidation.java
cassandra/trunk/test/system/test_cql.py

cassandra/trunk/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java

Propchange: cassandra/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 19 01:59:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6:922689-1052356,1052358-1053452,1053454,1053456-1131291
 /cassandra/branches/cassandra-0.7:1026516-1151306
 /cassandra/branches/cassandra-0.7.0:1053690-1055654
-/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1158856
+/cassandra/branches/cassandra-0.8:1090934-1125013,1125019-1159473
 /cassandra/branches/cassandra-0.8.0:1125021-1130369
 /cassandra/branches/cassandra-0.8.1:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3:1051699-1053689

Modified: cassandra/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/CHANGES.txt?rev=1159474r1=1159473r2=1159474view=diff
==
--- cassandra/trunk/CHANGES.txt (original)
+++ cassandra/trunk/CHANGES.txt Fri Aug 19 01:59:22 2011
@@ -49,6 +49,10 @@
(rows containing nothing but expired tombstones) (CASSANDRA-3039)
  * work around native memory leak in com.sun.management.GarbageCollectorMXBean
(CASSANDRA-2868)
+ * validate that column names in column_metadata are not equal to key_alias
+   on create/update of the ColumnFamily and CQL 'ALTER' statement 
(CASSANDRA-3036)
+ * return an InvalidRequestException if an indexed column is assigned
+   a value larger than 64KB (CASSANDRA-3057)
 
 
 0.8.4

Propchange: cassandra/trunk/contrib/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 19 01:59:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/contrib:922689-1052356,1052358-1053452,1053454,1053456-1068009
 /cassandra/branches/cassandra-0.7/contrib:1026516-1151306
 /cassandra/branches/cassandra-0.7.0/contrib:1053690-1055654
-/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1158856
+/cassandra/branches/cassandra-0.8/contrib:1090934-1125013,1125019-1159473
 /cassandra/branches/cassandra-0.8.0/contrib:1125021-1130369
 /cassandra/branches/cassandra-0.8.1/contrib:1101014-1125018
 /cassandra/tags/cassandra-0.7.0-rc3/contrib:1051699-1053689

Propchange: 
cassandra/trunk/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 19 01:59:22 2011
@@ -1,7 +1,7 @@
 
/cassandra/branches/cassandra-0.6/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:922689-1052356,1052358-1053452,1053454,1053456-1131291
 
/cassandra/branches/cassandra-0.7/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1026516-1151306
 
/cassandra/branches/cassandra-0.7.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1053690-1055654
-/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1158856
+/cassandra/branches/cassandra-0.8/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1090934-1125013,1125019-1159473
 
/cassandra/branches/cassandra-0.8.0/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1125021-1130369
 
/cassandra/branches/cassandra-0.8.1/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1101014-1125018
 
/cassandra/tags/cassandra-0.7.0-rc3/interface/thrift/gen-java/org/apache/cassandra/thrift/Cassandra.java:1051699-1053689


[jira] [Updated] (CASSANDRA-3059) sstable2json on an index sstable failed with NPE

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3059:
--

Component/s: Tools
   Priority: Minor  (was: Major)

 sstable2json on an index sstable failed with NPE
 

 Key: CASSANDRA-3059
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3059
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jackson Chung
Priority: Minor

 $ ./bin/sstable2json 
 /var/lib/cassandra-trunk/data/Keyspace1/Standard1.Idx1-h-1-Data.db 
 {
 Exception in thread main java.lang.NullPointerException
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:74)
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:69)
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:64)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:147)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:87)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:71)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:177)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:142)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:134)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:304)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:335)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:348)
 at 
 org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:406)
 cfm is null for Index CF?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-3057) secondary index on a column that has a value of size 64k will fail on flush

2011-08-18 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-3057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087462#comment-13087462
 ] 

Hudson commented on CASSANDRA-3057:
---

Integrated in Cassandra-0.8 #285 (See 
[https://builds.apache.org/job/Cassandra-0.8/285/])
return an InvalidRequestException if an indexed column is assigned a value 
larger than 64K
patch by pyaskevich and jbellis for CASSANDRA-3057

jbellis : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1159473
Files : 
* 
/cassandra/branches/cassandra-0.8/test/unit/org/apache/cassandra/thrift/ThriftValidationTest.java
* /cassandra/branches/cassandra-0.8/CHANGES.txt
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/thrift/ThriftValidation.java
* 
/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/config/CFMetaData.java


 secondary index on a column that has a value of size  64k will fail on flush
 -

 Key: CASSANDRA-3057
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3057
 Project: Cassandra
  Issue Type: Bug
Reporter: Jackson Chung
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 0.8.5

 Attachments: 3057-v3.txt, CASSANDRA-3057-v2.patch, 
 CASSANDRA-3057.patch


 exception seen on flush when an indexed column contain size  64k:
 granted that having a value  64k possibly mean something that shouldn't be 
 indexed as it most likely would have a high cardinality, but i think there 
 would still be some valid use case for it.
 test case:
 simply run the stress test with 
 -n 1 -u 0 -c 2  -y Standard  -o INSERT  -S 65536 -x KEYS
 then call a flush
 exception:
  INFO [FlushWriter:8] 2011-08-18 21:49:33,214 Memtable.java (line 218) 
 Writing Memtable-Standard1.Idx1@1652462853(16/20 serialized/live bytes, 1 ops)
 Standard1@980087547(196659/245823 serialized/live bytes, 3 ops)
 ERROR [FlushWriter:8] 2011-08-18 21:49:33,230 AbstractCassandraDaemon.java 
 (line 133) Fatal exception in thread Thread[FlushWriter:8,5,RMI Runtime]
 java.lang.AssertionError: 65536
 at 
 org.apache.cassandra.utils.ByteBufferUtil.writeWithShortLength(ByteBufferUtil.java:330)
 at 
 org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:164)
 at 
 org.apache.cassandra.db.Memtable.writeSortedContents(Memtable.java:245)
 at org.apache.cassandra.db.Memtable.access$400(Memtable.java:49)
 at org.apache.cassandra.db.Memtable$3.runMayThrow(Memtable.java:270)
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3059) sstable2json on an index sstable failed with NPE

2011-08-18 Thread Jonathan Ellis (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3059?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jonathan Ellis updated CASSANDRA-3059:
--

Attachment: 3059.txt

patch against 0.8

 sstable2json on an index sstable failed with NPE
 

 Key: CASSANDRA-3059
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3059
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jackson Chung
Priority: Minor
 Fix For: 0.8.5

 Attachments: 3059.txt


 $ ./bin/sstable2json 
 /var/lib/cassandra-trunk/data/Keyspace1/Standard1.Idx1-h-1-Data.db 
 {
 Exception in thread main java.lang.NullPointerException
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:74)
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:69)
 at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:64)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:147)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:87)
 at 
 org.apache.cassandra.io.sstable.SSTableIdentityIterator.init(SSTableIdentityIterator.java:71)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:177)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:142)
 at 
 org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:134)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:304)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:335)
 at 
 org.apache.cassandra.tools.SSTableExport.export(SSTableExport.java:348)
 at 
 org.apache.cassandra.tools.SSTableExport.main(SSTableExport.java:406)
 cfm is null for Index CF?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (CASSANDRA-2474) CQL support for compound columns

2011-08-18 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-2474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13087505#comment-13087505
 ] 

Jonathan Ellis commented on CASSANDRA-2474:
---

What about this?  
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-BuiltinTableGeneratingFunctions%28UDTF%29

Could we write a UDTF such that we could write

{code}
SELECT transposed(subcolumn, value) FROM foo WHERE key=X AND column=Y
{code}

I'm guessing that would require some modifications to the UTDF code, it looks 
like it's single-column only now.  But it shouldn't be much of a stretch to add 
support for more (he says sight unseen), and it's in the spirit of the 
existing UDTF goals.

I think the LATERAL VIEW stuff is kind of orthogonal to the UTDF per se.  
Basically a way to allow using normal columns a select with UTDF because 
otherwise their compiler is too dumb to handle mixing the two.

 CQL support for compound columns
 

 Key: CASSANDRA-2474
 URL: https://issues.apache.org/jira/browse/CASSANDRA-2474
 Project: Cassandra
  Issue Type: Sub-task
  Components: API, Core
Reporter: Eric Evans
  Labels: cql
 Fix For: 1.0


 For the most part, this boils down to supporting the specification of 
 compound column names (the CQL syntax is colon-delimted terms), and then 
 teaching the decoders (drivers) to create structures from the results.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3061) Optionally skip log4j configuration

2011-08-18 Thread Aaron Morton (JIRA)
Optionally skip log4j configuration
---

 Key: CASSANDRA-3061
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3061
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.4
Reporter: Aaron Morton
Assignee: Aaron Morton
Priority: Minor


from this thread 
http://groups.google.com/group/brisk-users/browse_thread/thread/3a18f4679673bea8

When brisk accesses cassandra classes inside of a Hadoop Task JVM the 
AbstractCassandraDaemon uses a log4j PropertyConfigurator to setup cassandra 
logging. This closes all the existing appenders, including the TaskLogAppender 
for the hadoop task. They are not opened again because they are not in the 
config. 

log4j has Logger Repositories to handle multiple configs in the same process, 
but there is a bit of suck involved in making a RepositorySelector. 

Two examples...
http://www.mail-archive.com/log4j-dev@jakarta.apache.org/msg02972.html
http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.2/html/Getting_Started_Guide/logging.log4j.reposelect.html

Basically all the selector has access to thread local storage, and it looks 
like normally people get the class loader from the current thread. A thread 
will inherit it's class loader from the thread that created it, unless 
otherwise specified. 

We have code in the same thread the uses hadoop and cassandra classes, so this 
could be a dead end.  

As a work around i've added cassandra.log4j.configure JVM param and made the 
AbstractCassandraServer skip the log4j config if it's false. My job completes 
and I can see the cassandra code logging an extra message I put in into the 
Hadoop task log file...

2011-08-19 15:56:06,442 WARN org.apache.hadoop.metrics2.impl.MetricsSystemImpl: 
Metrics system not started: Cannot locate configuration: tried 
hadoop-metrics2-maptask.properties, hadoop-metrics2.properties
2011-08-19 15:56:06,776 INFO 
org.apache.cassandra.service.AbstractCassandraDaemon: Logging initialized 
externally
2011-08-19 15:56:07,332 INFO org.apache.hadoop.mapred.MapTask: numReduceTasks: 0
 
The param has to be passed to the task JVM, so need to modify Haddop 
mapred-site.xml as follows 

property
  namemapred.child.java.opts/name
  value-Xmx256m -Dcassandra.log4j.configure=false/value
  description
Tune your mapred jvm arguments for best performance. 
Also see documentation from jvm vendor.
  /description
/property

It's not pretty but it works. In my extra log4j logging I can see the second 
reset() call is gone.  


Change the to Hadoop TaskLogAppender also stops the NPE but there may also be 
some lost log messages 
https://issues.apache.org/jira/browse/HADOOP-7556

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3061) Optionally skip log4j configuration

2011-08-18 Thread Aaron Morton (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3061?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aaron Morton updated CASSANDRA-3061:


Attachment: 0001-3061.patch

 Optionally skip log4j configuration
 ---

 Key: CASSANDRA-3061
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3061
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Affects Versions: 0.8.4
Reporter: Aaron Morton
Assignee: Aaron Morton
Priority: Minor
 Attachments: 0001-3061.patch


 from this thread 
 http://groups.google.com/group/brisk-users/browse_thread/thread/3a18f4679673bea8
 When brisk accesses cassandra classes inside of a Hadoop Task JVM the 
 AbstractCassandraDaemon uses a log4j PropertyConfigurator to setup cassandra 
 logging. This closes all the existing appenders, including the 
 TaskLogAppender for the hadoop task. They are not opened again because they 
 are not in the config. 
 log4j has Logger Repositories to handle multiple configs in the same process, 
 but there is a bit of suck involved in making a RepositorySelector. 
 Two examples...
 http://www.mail-archive.com/log4j-dev@jakarta.apache.org/msg02972.html
 http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Application_Platform/4.2/html/Getting_Started_Guide/logging.log4j.reposelect.html
 Basically all the selector has access to thread local storage, and it looks 
 like normally people get the class loader from the current thread. A thread 
 will inherit it's class loader from the thread that created it, unless 
 otherwise specified. 
 We have code in the same thread the uses hadoop and cassandra classes, so 
 this could be a dead end.  
 As a work around i've added cassandra.log4j.configure JVM param and made the 
 AbstractCassandraServer skip the log4j config if it's false. My job completes 
 and I can see the cassandra code logging an extra message I put in into the 
 Hadoop task log file...
 2011-08-19 15:56:06,442 WARN 
 org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Metrics system not 
 started: Cannot locate configuration: tried 
 hadoop-metrics2-maptask.properties, hadoop-metrics2.properties
 2011-08-19 15:56:06,776 INFO 
 org.apache.cassandra.service.AbstractCassandraDaemon: Logging initialized 
 externally
 2011-08-19 15:56:07,332 INFO org.apache.hadoop.mapred.MapTask: 
 numReduceTasks: 0
  
 The param has to be passed to the task JVM, so need to modify Haddop 
 mapred-site.xml as follows 
 property
   namemapred.child.java.opts/name
   value-Xmx256m -Dcassandra.log4j.configure=false/value
   description
 Tune your mapred jvm arguments for best performance. 
 Also see documentation from jvm vendor.
   /description
 /property
 It's not pretty but it works. In my extra log4j logging I can see the second 
 reset() call is gone.  
 Change the to Hadoop TaskLogAppender also stops the NPE but there may also be 
 some lost log messages 
 https://issues.apache.org/jira/browse/HADOOP-7556

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Reopened] (CASSANDRA-3040) Refactor and optimize ColumnFamilyStore.files(...) and Descriptor.fromFilename and few other places responsible for work with SSTable files.

2011-08-18 Thread Stu Hood (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3040?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stu Hood reopened CASSANDRA-3040:
-


startsWith() is not a strong enough restriction: you'll still need an exact 
match for the CF name at some  point (or to append the '-' separate character 
to your startsWith call.)

 Refactor and optimize ColumnFamilyStore.files(...) and 
 Descriptor.fromFilename and few other places responsible for work with 
 SSTable files.
 

 Key: CASSANDRA-3040
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3040
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Pavel Yaskevich
Assignee: Pavel Yaskevich
Priority: Minor
 Fix For: 1.0

 Attachments: CASSANDRA-3040.patch


 ColumnFamilyStore.files(...) methods are not optimal in a sense of work they 
 are doing - scanning whole table directory for files and directories, but 
 it's mission is to locate CF specific files only.
 Descriptor.fromFilename could be refactored to use getParentFile and getName 
 methods instead of manual parsing of the path. Small refactorings in this 
 sense are planed for Component and SSTable classes.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (CASSANDRA-3062) [patch] make sure keystore streams get closed

2011-08-18 Thread Dave Brosius (JIRA)

 [ 
https://issues.apache.org/jira/browse/CASSANDRA-3062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dave Brosius updated CASSANDRA-3062:


Attachment: closestreams.diff

 [patch] make sure keystore streams get closed
 -

 Key: CASSANDRA-3062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3062
 Project: Cassandra
  Issue Type: Improvement
Reporter: Dave Brosius
Priority: Trivial
 Attachments: closestreams.diff


 code opens keystore streams and relies on the gc to close them. Give the GC a 
 break and just close them immediately.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3062) [patch] make sure keystore streams get closed

2011-08-18 Thread Dave Brosius (JIRA)
[patch] make sure keystore streams get closed
-

 Key: CASSANDRA-3062
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3062
 Project: Cassandra
  Issue Type: Improvement
Reporter: Dave Brosius
Priority: Trivial
 Attachments: closestreams.diff

code opens keystore streams and relies on the gc to close them. Give the GC a 
break and just close them immediately.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (CASSANDRA-3063) [patch] fix some obvious javadoc problems

2011-08-18 Thread Dave Brosius (JIRA)
[patch] fix some obvious javadoc problems
-

 Key: CASSANDRA-3063
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3063
 Project: Cassandra
  Issue Type: Improvement
Reporter: Dave Brosius
Priority: Trivial
 Attachments: javadoc.diff

bad tags, invalid parms, etc.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira