[jira] [Updated] (CASSANDRA-4965) in cqlsh, alter table with compaction_strategy_class does nothing

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4965:
--

 Priority: Trivial  (was: Major)
Affects Version/s: (was: 1.2.0 beta 2)
   (was: 1.1.6)
   0.8.1

+1

 in cqlsh, alter table with compaction_strategy_class does nothing
 -

 Key: CASSANDRA-4965
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4965
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 0.8.1
Reporter: Jeremy Hanna
Assignee: Aleksey Yeschenko
Priority: Trivial
 Fix For: 1.1.7, 1.2.0 rc1

 Attachments: 4965.txt


 The following cqlsh code appears to do nothing.
 {code}
 alter table blah with compaction_strategy_class = ‘LeveledCompactionStrategy’;
 {code}
 It completes as though it worked but when you describe the table, it's still 
 STCS.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed by jbellis for CASSANDRA-4965

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.1 dd1633ba0 - e30519f33


fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey 
Yeschenko, reviewed by jbellis for CASSANDRA-4965


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e30519f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e30519f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e30519f3

Branch: refs/heads/cassandra-1.1
Commit: e30519f333b05dd70c881ff57bd4a5ddee24aaa0
Parents: dd1633b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 11:57:11 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 11:57:11 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ed9666..ef5e43b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)
  * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java 
b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
index 4267340..ac02198 100644
--- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
@@ -161,14 +161,15 @@ public class AlterTableStatement
 
 public static void applyPropertiesToCFMetadata(CFMetaData cfm, CFPropDefs 
cfProps) throws InvalidRequestException, ConfigurationException
 {
+if (cfProps.hasProperty(CFPropDefs.KW_COMPACTION_STRATEGY_CLASS))
+cfm.compactionStrategyClass(cfProps.compactionStrategyClass);
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMPARATOR))
-{
 throw new InvalidRequestException(Can't change CF comparator 
after creation);
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMMENT))
-{
 cfm.comment(cfProps.getProperty(CFPropDefs.KW_COMMENT));
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_DEFAULTVALIDATION))
 {
 try



[jira] [Updated] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4753:
--

Attachment: 4753-v2.txt

It's valid for local writes to timeout, but we don't want to just drop them on 
the floor if they do.  v2 attached.

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0

 Attachments: 4753.txt, 4753-v2.txt


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/2] git commit: fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed by jbellis for CASSANDRA-4965

2012-11-19 Thread aleksey
fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey 
Yeschenko, reviewed by jbellis for CASSANDRA-4965


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e30519f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e30519f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e30519f3

Branch: refs/heads/cassandra-1.2.0
Commit: e30519f333b05dd70c881ff57bd4a5ddee24aaa0
Parents: dd1633b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 11:57:11 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 11:57:11 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ed9666..ef5e43b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)
  * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java 
b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
index 4267340..ac02198 100644
--- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
@@ -161,14 +161,15 @@ public class AlterTableStatement
 
 public static void applyPropertiesToCFMetadata(CFMetaData cfm, CFPropDefs 
cfProps) throws InvalidRequestException, ConfigurationException
 {
+if (cfProps.hasProperty(CFPropDefs.KW_COMPACTION_STRATEGY_CLASS))
+cfm.compactionStrategyClass(cfProps.compactionStrategyClass);
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMPARATOR))
-{
 throw new InvalidRequestException(Can't change CF comparator 
after creation);
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMMENT))
-{
 cfm.comment(cfProps.getProperty(CFPropDefs.KW_COMMENT));
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_DEFAULTVALIDATION))
 {
 try



[1/2] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2.0 c3173d475 - 4f28e6b7d


Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f28e6b7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f28e6b7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f28e6b7

Branch: refs/heads/cassandra-1.2.0
Commit: 4f28e6b7daad6b1e4040b4dd2a8eac63e97cbdb0
Parents: c3173d4 e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:09:15 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:09:15 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/CHANGES.txt
--
diff --cc CHANGES.txt
index 7f5a487,ef5e43b..69d7dc3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 +Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--



[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4874:
---

Looks pretty good to me.  Comments:

- Should document what happened to IAuth/LegacyAuth in News
- grantOption feels like premature complexity to me -- why not just a single 
GRANT permission?

Nits: 

- unrelated cqlsh cleanup should be separate.
- Not 100% sure that IResource is going to be useful in its present form (for 
e.g. functions) so I'd be inclined to just use DataResource everywhere for now, 
but it's probably okay the way it is for now.


 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[3/3] git commit: fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed by jbellis for CASSANDRA-4965

2012-11-19 Thread aleksey
fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey 
Yeschenko, reviewed by jbellis for CASSANDRA-4965


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e30519f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e30519f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e30519f3

Branch: refs/heads/cassandra-1.2
Commit: e30519f333b05dd70c881ff57bd4a5ddee24aaa0
Parents: dd1633b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 11:57:11 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 11:57:11 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ed9666..ef5e43b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)
  * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java 
b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
index 4267340..ac02198 100644
--- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
@@ -161,14 +161,15 @@ public class AlterTableStatement
 
 public static void applyPropertiesToCFMetadata(CFMetaData cfm, CFPropDefs 
cfProps) throws InvalidRequestException, ConfigurationException
 {
+if (cfProps.hasProperty(CFPropDefs.KW_COMPACTION_STRATEGY_CLASS))
+cfm.compactionStrategyClass(cfProps.compactionStrategyClass);
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMPARATOR))
-{
 throw new InvalidRequestException(Can't change CF comparator 
after creation);
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMMENT))
-{
 cfm.comment(cfProps.getProperty(CFPropDefs.KW_COMMENT));
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_DEFAULTVALIDATION))
 {
 try



[2/3] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f28e6b7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f28e6b7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f28e6b7

Branch: refs/heads/cassandra-1.2
Commit: 4f28e6b7daad6b1e4040b4dd2a8eac63e97cbdb0
Parents: c3173d4 e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:09:15 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:09:15 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/CHANGES.txt
--
diff --cc CHANGES.txt
index 7f5a487,ef5e43b..69d7dc3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 +Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--



[1/3] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 6acbc86dd - 707da4e82


Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/707da4e8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/707da4e8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/707da4e8

Branch: refs/heads/cassandra-1.2
Commit: 707da4e8283aec93cf2769462dde32e03d51e81f
Parents: 6acbc86 4f28e6b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:10:22 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:10:22 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/707da4e8/CHANGES.txt
--



[1/4] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/trunk 408b468fa - 653f74ce3


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/653f74ce
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/653f74ce
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/653f74ce

Branch: refs/heads/trunk
Commit: 653f74ce3dd83f87d99a8bcb6b50a6fcbe0604ef
Parents: 408b468 707da4e
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:11:49 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:11:49 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/653f74ce/CHANGES.txt
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/653f74ce/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--



[2/4] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/707da4e8
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/707da4e8
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/707da4e8

Branch: refs/heads/trunk
Commit: 707da4e8283aec93cf2769462dde32e03d51e81f
Parents: 6acbc86 4f28e6b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:10:22 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:10:22 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/707da4e8/CHANGES.txt
--



[4/4] git commit: fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey Yeschenko, reviewed by jbellis for CASSANDRA-4965

2012-11-19 Thread aleksey
fix CQL2 ALTER TABLE compaction_strategy_class altering; patch by Aleksey 
Yeschenko, reviewed by jbellis for CASSANDRA-4965


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e30519f3
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e30519f3
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e30519f3

Branch: refs/heads/trunk
Commit: e30519f333b05dd70c881ff57bd4a5ddee24aaa0
Parents: dd1633b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 11:57:11 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 11:57:11 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2ed9666..ef5e43b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)
  * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30519f3/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--
diff --git a/src/java/org/apache/cassandra/cql/AlterTableStatement.java 
b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
index 4267340..ac02198 100644
--- a/src/java/org/apache/cassandra/cql/AlterTableStatement.java
+++ b/src/java/org/apache/cassandra/cql/AlterTableStatement.java
@@ -161,14 +161,15 @@ public class AlterTableStatement
 
 public static void applyPropertiesToCFMetadata(CFMetaData cfm, CFPropDefs 
cfProps) throws InvalidRequestException, ConfigurationException
 {
+if (cfProps.hasProperty(CFPropDefs.KW_COMPACTION_STRATEGY_CLASS))
+cfm.compactionStrategyClass(cfProps.compactionStrategyClass);
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMPARATOR))
-{
 throw new InvalidRequestException(Can't change CF comparator 
after creation);
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_COMMENT))
-{
 cfm.comment(cfProps.getProperty(CFPropDefs.KW_COMMENT));
-}
+
 if (cfProps.hasProperty(CFPropDefs.KW_DEFAULTVALIDATION))
 {
 try



[3/4] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4f28e6b7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4f28e6b7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4f28e6b7

Branch: refs/heads/trunk
Commit: 4f28e6b7daad6b1e4040b4dd2a8eac63e97cbdb0
Parents: c3173d4 e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 13:09:15 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 13:09:15 2012 +0300

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/CHANGES.txt
--
diff --cc CHANGES.txt
index 7f5a487,ef5e43b..69d7dc3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 +Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/4f28e6b7/src/java/org/apache/cassandra/cql/AlterTableStatement.java
--



[jira] [Commented] (CASSANDRA-3378) Allow configuration of storage protocol socket buffer

2012-11-19 Thread JIRA

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

Michał Michalski commented on CASSANDRA-3378:
-

I started to investigate this task (lfh label sounds like a good point to get 
deeper into Cassandra architecture ;-) ), but as I'm new to Cassandra internal 
architecture, I'm not really sure if I understand the subject of this task. To 
be more precise - I have a problem with understanding what does storage 
protocol really refers to in this case?

At first I thought it refers to Thrift (and ThriftServer started by 
CassandraDaemon), but when I was investigating this issue (by checking how 
looking at rpc_[send,recv]_buff_size_in_bytes setting is set and where) I 
discovered that ThriftServer already uses the setting mentioned in this task. 

My second idea was native server (org.apache.cassandra.transport.Server) 
which I found in CassandraDaemon too. It uses ServerBootstrap created using 
NioServerSocketChannelFactory and it seems possible to add such setting there, 
but I wonder if this is really the service this issue tells about? Or maybe I'm 
completely wrong? Could you give me some clue? 

Sorry if it's a silly question, but I'm confused ;-)

BTW: Is there maybe a doc that tells a bit more on how Cassandra works in terms 
of internal architecture/dependencies/protocols etc.?

 Allow configuration of storage protocol socket buffer
 -

 Key: CASSANDRA-3378
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3378
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Brandon Williams
Priority: Minor
  Labels: lhf

 Similar to rpc_[send,recv]_buff_size_in_bytes, we should expose this for high 
 latency connections.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4915) CQL should prevent or warn about inefficient queries

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-4915:
--

 Reviewer: jbellis
 Priority: Major  (was: Minor)
Affects Version/s: (was: 1.2.0 beta 1)
   0.8.0
Fix Version/s: 1.2.0 rc1
 Assignee: Sylvain Lebresne

 CQL should prevent or warn about inefficient queries
 

 Key: CASSANDRA-4915
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4915
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.0
Reporter: Edward Capriolo
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 rc1


 When issuing a query like:
 {noformat}
 CREATE TABLE videos (
   videoid uuid,
   videoname varchar,
   username varchar,
   description varchar,
   tags varchar,
   upload_date timestamp,
   PRIMARY KEY (videoid,videoname)
 );
 SELECT * FROM videos WHERE videoname = 'My funny cat';
 {noformat}
 Cassandra samples some data using get_range_slice and then applies the query.
 This is very confusing to me, because as an end user am not sure if the query 
 is fast because Cassandra is performing an optimized query (over an index, or 
 using a slicePredicate) or if cassandra is simple sampling some random rows 
 and returning me some results. 
 My suggestions:
 1) force people to supply a LIMIT clause on any query that is going to
 page over get_range_slice
 2) having some type of explain support so I can establish if this
 query will work in the
 I will champion suggestion 1) because CQL has put itself in a rather unique 
 un-sql like position by applying an automatic limit clause without the user 
 asking for them. I also do not believe the CQL language should let the user 
 issue queries that will not work as intended with larger-then-auto-limit 
 size data sets.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4972) Move add a default limit logic to cqlsh

2012-11-19 Thread Jonathan Ellis (JIRA)
Jonathan Ellis created CASSANDRA-4972:
-

 Summary: Move add a default limit logic to cqlsh
 Key: CASSANDRA-4972
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4972
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.2.1




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4915) CQL should prevent or warn about inefficient queries

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4915:
---

Tagging for 1.2 so we don't break working queries later.

 CQL should prevent or warn about inefficient queries
 

 Key: CASSANDRA-4915
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4915
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.0
Reporter: Edward Capriolo
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 rc1


 When issuing a query like:
 {noformat}
 CREATE TABLE videos (
   videoid uuid,
   videoname varchar,
   username varchar,
   description varchar,
   tags varchar,
   upload_date timestamp,
   PRIMARY KEY (videoid,videoname)
 );
 SELECT * FROM videos WHERE videoname = 'My funny cat';
 {noformat}
 Cassandra samples some data using get_range_slice and then applies the query.
 This is very confusing to me, because as an end user am not sure if the query 
 is fast because Cassandra is performing an optimized query (over an index, or 
 using a slicePredicate) or if cassandra is simple sampling some random rows 
 and returning me some results. 
 My suggestions:
 1) force people to supply a LIMIT clause on any query that is going to
 page over get_range_slice
 2) having some type of explain support so I can establish if this
 query will work in the
 I will champion suggestion 1) because CQL has put itself in a rather unique 
 un-sql like position by applying an automatic limit clause without the user 
 asking for them. I also do not believe the CQL language should let the user 
 issue queries that will not work as intended with larger-then-auto-limit 
 size data sets.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4918) Remove CQL3 arbitrary select limit

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4918:
---

+1 then.  Created CASSANDRA-4972 for the cqlsh change.  (Would like to get that 
into 1.2.0 but it's not critical.)

 Remove CQL3 arbitrary select limit
 --

 Key: CASSANDRA-4918
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4918
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 rc1

 Attachments: 4918.txt


 Let it be clear however that until CASSANDRA-4415 is resolved, it will put us 
 in a situation where it will be easy to write queries that timeout (and 
 potentially OOM the server). That being said, even with the auto-limit it's 
 not too hard to write queries that timeout if you're not at least a bit 
 careful and so far we've always answer that by saying 'you have to be mindful 
 of how much data your query is asking for'. And while I'm all for adding 
 protection against OOMing the server like suggested by Jonathan on 
 CASSANDRA-4304, I think the arbitrary auto-limit is the worst possible 
 solution to this problem.
 Note that until CASSANDRA-4415 is resolved I wouldn't be totally opposed to 
 force people to provide a LIMIT to select queries if we're really thing it 
 will avoids lots of surprise, though tbh I do think it would be enough to 
 just continue to be vocal about the fact that 'you have to be mindful of how 
 much data your query is asking for' and its follow-up 'you should use an 
 explicit LIMIT if in doubt about how much data will be returned'.
 But I am *strongly opposed* in keeping the current arbitrary limit because it 
 makes very little sense imo, and the little sense it makes will completely 
 vanish once CASSANDRA-4415 is here, and I don't want to break the API and do 
 a CQL4 to be able to remove that limit later.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

Thanks.

bq. Should document what happened to IAuth/LegacyAuth in News
Will do.

bq. grantOption feels like premature complexity to me – why not just a single 
GRANT permission?
I assume having P.GRANT would give a user ability to grant and revoke any 
permission on the resource (including P.GRANT itself). This would also simplify 
grant and revoke implementations (check for P.GRANT and that's all). If so then 
I agree and I like it.

bq. unrelated cqlsh cleanup should be separate.
Sorry. Couldn't resist.

bq. Not 100% sure that IResource is going to be useful in its present form (for 
e.g. functions) so I'd be inclined to just use DataResource everywhere for now, 
but it's probably okay the way it is for now.
The idea was to avoid breaking IAuthority interface in the future. Hence the 
only assumptions were that any new resource type will be hierarchical, and 
every level will have a printable name. TBH I don't have a strong opinion on 
this point. We can just see what happens (if?) to functions/triggers/what not 
and if necessary slightly alter IAuthority in 1.3/1.4. It's YAGNI vs. not 
breaking stuff. Just using DataResource everywhere for now is fine by me. A 
second opinion maybe?

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

BTW unfortunately just replacing implements IAuthority with extends 
LegacyAuthority won't be enough if a particular implementation used 
Permission.ALL and/or Permission.NONE. They were returning (mutable) EnumSet-s 
and I had to replace them with ImmutableSet-s. I wish there was an immutable 
subclass of EnumSet, but there isn't, because Java. That's the only issue 
though.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4753:
--

You are right. There is still the option of special-casing local endpoint for 
syncWriteToBatchlog and asyncRemoveFromBatchlog. I know single-node clusters 
are not a pirority, but still. That would also make this issue go away.


 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0

 Attachments: 4753.txt, 4753-v2.txt


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread Krzysztof Cieslinski Cognitum (JIRA)

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

Krzysztof Cieslinski Cognitum commented on CASSANDRA-4927:
--

Try to insert this value without apostrophes. I have tested it on cql3 and I 
did not tried it with cassandra-cli.

 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-4753:
-

Attachment: 4753-v3.txt

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0

 Attachments: 4753.txt, 4753-v2.txt, 4753-v3.txt


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4753:
--

Something like v3.

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0

 Attachments: 4753.txt, 4753-v2.txt, 4753-v3.txt


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread JIRA

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

Michał Michalski commented on CASSANDRA-4927:
-

OK, inserting it without apostrophes fails as you stated - I got it now; using 
apostrophes was quite natural for me, so I missed your point at first. Thanks.

(BTW: in cqlsh it works with apostrophes like in cli, so it seems to be a 
workaround now ;-) )

{noformat}cqlsh:tf DESCRIBE COLUMNFAMILY test;

CREATE TABLE test (
  KEY text PRIMARY KEY,
  value_double double,
  value_float float
) WITH (...)


cqlsh:tf INSERT INTO test (key, value_float, value_double) VALUES ('D', 
'-2.6034345E+38', '-2.6034345E+38'); 
cqlsh:tf SELECT * FROM tf.test ;
 key | value_double | value_float
-+--+-
   D | -2.6e+38 |-2.6e+38
(...)
{noformat}



 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Daniel Strawson (JIRA)
Daniel Strawson created CASSANDRA-4973:
--

 Summary: Secondary Index stops returning rows
 Key: CASSANDRA-4973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4973
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.6, 1.1.2
 Environment: Centos 6.3, Java 1.6.0_35, cass. 1.1.2 upgraded to 1.1.6
Reporter: Daniel Strawson


I've been using cassandra on a project for a little while in development and 
have recently suddenly started having an issue where the secondary index stops 
working, this is happening on my new production system, we are not yet live.   
Things work ok one moment, then suddenly queries to the cf through the 
secondary index stop returning data.  I've seen it happen on 3 CFs. I've tried:

- various nodetools repair / scrub / rebuild_indexes options, none seem to make 
a difference.
- Doing a 'update column family whatever with column_metadata=[]' then 
repeating with my correct column_metadata definition.  This seems to fix the 
problem (temporarily) until it comes back.

The last time it happened I had just restarted cassandra, so it could be that 
which is causing the issue, I've got the production system ok at the moment, I 
will try restarting a bit later when its not being used and if I can get the 
issue to reoccur I will add more information.

Here is an example of the create column family I'm using for one of the CFs 
that affected:

create column family region
  with column_type = 'Standard'
  and comparator = 'UTF8Type'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'UTF8Type'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and column_metadata = [

{column_name : 'label',
validation_class : UTF8Type},

{column_name : 'countryCode',
validation_class : UTF8Type,
index_name : 'region_countryCode_idx',
index_type : 0},

]
  and compression_options = {'sstable_compression' : 
'org.apache.cassandra.io.compress.SnappyCompressor'};


I've noticed that CASSANDRA-4785 looks similar, in my case once the system has 
the problem, it doesn't go away until I fix it.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Daniel Strawson (JIRA)

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

Daniel Strawson updated CASSANDRA-4973:
---

Description: 
I've been using cassandra on a project for a little while in development and 
have recently suddenly started having an issue where the secondary index stops 
working, this is happening on my new production system, we are not yet live.   
Things work ok one moment, then suddenly queries to the cf through the 
secondary index stop returning data.  I've seen it happen on 3 CFs. I've tried:

- various nodetools repair / scrub / rebuild_indexes options, none seem to make 
a difference.
- Doing a 'update column family whatever with column_metadata=[]' then 
repeating with my correct column_metadata definition.  This seems to fix the 
problem (temporarily) until it comes back.

The last time it happened I had just restarted cassandra, so it could be that 
which is causing the issue, I've got the production system ok at the moment, I 
will try restarting a bit later when its not being used and if I can get the 
issue to reoccur I will add more information.

The problem first manifested itself in 1.1.2, so I upgraded to 1.1.6, this has 
not fixed it.

Here is an example of the create column family I'm using for one of the CFs 
that affected:

create column family region
  with column_type = 'Standard'
  and comparator = 'UTF8Type'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'UTF8Type'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and column_metadata = [

{column_name : 'label',
validation_class : UTF8Type},

{column_name : 'countryCode',
validation_class : UTF8Type,
index_name : 'region_countryCode_idx',
index_type : 0},

]
  and compression_options = {'sstable_compression' : 
'org.apache.cassandra.io.compress.SnappyCompressor'};


I've noticed that CASSANDRA-4785 looks similar, in my case once the system has 
the problem, it doesn't go away until I fix it.



  was:
I've been using cassandra on a project for a little while in development and 
have recently suddenly started having an issue where the secondary index stops 
working, this is happening on my new production system, we are not yet live.   
Things work ok one moment, then suddenly queries to the cf through the 
secondary index stop returning data.  I've seen it happen on 3 CFs. I've tried:

- various nodetools repair / scrub / rebuild_indexes options, none seem to make 
a difference.
- Doing a 'update column family whatever with column_metadata=[]' then 
repeating with my correct column_metadata definition.  This seems to fix the 
problem (temporarily) until it comes back.

The last time it happened I had just restarted cassandra, so it could be that 
which is causing the issue, I've got the production system ok at the moment, I 
will try restarting a bit later when its not being used and if I can get the 
issue to reoccur I will add more information.

Here is an example of the create column family I'm using for one of the CFs 
that affected:

create column family region
  with column_type = 'Standard'
  and comparator = 'UTF8Type'
  and default_validation_class = 'BytesType'
  and key_validation_class = 'UTF8Type'
  and read_repair_chance = 0.1
  and dclocal_read_repair_chance = 0.0
  and gc_grace = 864000
  and min_compaction_threshold = 4
  and max_compaction_threshold = 32
  and replicate_on_write = true
  and compaction_strategy = 
'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
  and caching = 'KEYS_ONLY'
  and column_metadata = [

{column_name : 'label',
validation_class : UTF8Type},

{column_name : 'countryCode',
validation_class : UTF8Type,
index_name : 'region_countryCode_idx',
index_type : 0},

]
  and compression_options = {'sstable_compression' : 
'org.apache.cassandra.io.compress.SnappyCompressor'};


I've noticed that CASSANDRA-4785 looks similar, in my case once the system has 
the problem, it doesn't go away until I fix it.




 Secondary Index stops returning rows
 

 Key: CASSANDRA-4973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4973
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2, 1.1.6
 Environment: Centos 6.3, Java 1.6.0_35, cass. 1.1.2 upgraded to 1.1.6
Reporter: Daniel Strawson

 I've been using cassandra on a project for a little while in development and 
 have recently suddenly started having an issue where the secondary index 
 stops 

[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4874:
---

bq. I assume having P.GRANT would give a user ability to grant and revoke any 
permission on the resource (including P.GRANT itself)

Right.

bq. The idea was to avoid breaking IAuthority interface in the future

That makes sense.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4430) optional pluggable o.a.c.metrics reporters

2012-11-19 Thread Chris Burroughs (JIRA)

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

Chris Burroughs commented on CASSANDRA-4430:


https://github.com/addthis/metrics-reporter-config -- library, needs 
integration

 optional pluggable o.a.c.metrics reporters
 --

 Key: CASSANDRA-4430
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4430
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Chris Burroughs
Priority: Minor

 CASSANDRA-4009  expanded the use of the metrics library which has a set of 
 reporter modules http://metrics.codahale.com/manual/core/#reporters  You can 
 report to flat files, ganglia, spit everything over http, etc.  The next step 
 is a mechanism for using those reporters with  o.a.c.metrics.  To avoid 
 bundling everything I suggest following the mx4j approach of enable only if 
 on classpath coupled with a reporter configuration file.
 Strawman file:
 {noformat}
 console:
   time: 1
   timeunit: seconds
 csv:
  - time: 1
timeunit: minutes
file: foo.csv
  - time: 10
timeunit: seconds
 file: bar.csv
 ganglia:
  - time: 30
timunit: seconds
host: server-1
port: 8649
  - time: 30
timunit: seconds
host: server-2
port: 8649
 {noformat}
  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4927:
---

I'm not sure we can do this with the antlr parser, since - and + are used in 
other productions.  Fine with wontfixing this, quoting is a reasonable 
workaround.

 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4973:
---

Are there errors in your system log?

 Secondary Index stops returning rows
 

 Key: CASSANDRA-4973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4973
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2, 1.1.6
 Environment: Centos 6.3, Java 1.6.0_35, cass. 1.1.2 upgraded to 1.1.6
Reporter: Daniel Strawson

 I've been using cassandra on a project for a little while in development and 
 have recently suddenly started having an issue where the secondary index 
 stops working, this is happening on my new production system, we are not yet 
 live.   Things work ok one moment, then suddenly queries to the cf through 
 the secondary index stop returning data.  I've seen it happen on 3 CFs. I've 
 tried:
 - various nodetools repair / scrub / rebuild_indexes options, none seem to 
 make a difference.
 - Doing a 'update column family whatever with column_metadata=[]' then 
 repeating with my correct column_metadata definition.  This seems to fix the 
 problem (temporarily) until it comes back.
 The last time it happened I had just restarted cassandra, so it could be that 
 which is causing the issue, I've got the production system ok at the moment, 
 I will try restarting a bit later when its not being used and if I can get 
 the issue to reoccur I will add more information.
 The problem first manifested itself in 1.1.2, so I upgraded to 1.1.6, this 
 has not fixed it.
 Here is an example of the create column family I'm using for one of the CFs 
 that affected:
 create column family region
   with column_type = 'Standard'
   and comparator = 'UTF8Type'
   and default_validation_class = 'BytesType'
   and key_validation_class = 'UTF8Type'
   and read_repair_chance = 0.1
   and dclocal_read_repair_chance = 0.0
   and gc_grace = 864000
   and min_compaction_threshold = 4
   and max_compaction_threshold = 32
   and replicate_on_write = true
   and compaction_strategy = 
 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy'
   and caching = 'KEYS_ONLY'
   and column_metadata = [
 
 {column_name : 'label',
 validation_class : UTF8Type},
 
 {column_name : 'countryCode',
 validation_class : UTF8Type,
 index_name : 'region_countryCode_idx',
 index_type : 0},
 
 ]
   and compression_options = {'sstable_compression' : 
 'org.apache.cassandra.io.compress.SnappyCompressor'};
 I've noticed that CASSANDRA-4785 looks similar, in my case once the system 
 has the problem, it doesn't go away until I fix it.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

Actually, that wouldn't work (a single GRANT permission).
I looked at two options, but both don't work:
1. Allow GRANT owners GRANT and REVOKE any permission on the resource (even 
those they don't have) - now we get the old FULL_ACCESS and all the associated 
problems (you have to check for GRANT and not just the requested permission 
and, secondly, REVOKE perm won't work as expected if a user still has GRANT 
permission on the resource).
2. Allow GRANT owners GRANT and REVOKE only the permissions they already have 
on the resource. This one is trickier:
2.1 Make P.GRANT non-recursive (disallow granting P.GRANT). Now you need to 
involve a superuser every time you want to allow someone grant permissions. 
This is bad since it involves superusers unnecessarily.
2.2 Make P.GRANT recursive (allow granting P.GRANT). Now we've got ourselves 
easy permission escalation. User A has every permission but P.GRANT. User B has 
P.SELECT and P.GRANT (or just P.GRANT). User B grants P.GRANT to user A. A 
grants B every permission he has. Now the two of them together have more 
permissions than the sum of their old ones. 

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

So WITH GRANT OPTION is here to stay. It's simple to understand and doesn't 
leak permissions.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

As for IResource and functions - my idea was that each resource type will have 
its own root (no common global root). DataResources start with 'data', 
FunctionResources will be represented as 'functions[/..]. So there will usually 
be at least two levels independent of the resource type. This might even allow 
user-specified resource types as long as they follow the convention and as long 
as we have a map root name - resource class.
So I vote for leaving IResource alone.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4753) Timeout reporter writes hints for the local node

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4753:
---

Hmm.  We actually have a couple problems here.

# We do allow local writes to be dropped, but
# Nobody writes hints for dropped local writes
# If local hints were attempted, they would error out (what v2 was trying to 
fix)

We actually do want to hint batchlog inserts to maintain the contract of timed 
out means it's in progress, you do not have to retry.

I'm not sure what the best way to add hinting (actually, retry-on-hint-stage) 
code for insertLocal is though.  One option would be to just make local writes 
non-droppable, but then we lose our backpressure mechanism of a full hint stage 
causing OverloadedException, and a poorly behaving client could OOM the 
coordinator with a lot of local writes.

 Timeout reporter writes hints for the local node
 

 Key: CASSANDRA-4753
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4753
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
 Fix For: 1.2.0

 Attachments: 4753.txt, 4753-v2.txt, 4753-v3.txt


 MessagingService.java:330 calls StorageProxy.scheduleLocalHint() without 
 checking if the local node is the target. This causes 
 StorageProxy.scheduleLocalHint to throw AssertionError sometimes.
 Got this error when some batches are timed out. This can happen because even 
 local batches now go through StorageProxy.sendMessages and aren't just 
 rm.apply()'d.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-4874:
---

bq. REVOKE perm won't work as expected if a user still has GRANT permission 
on the resource).

Of course you'd need to revoke GRANT as well.  Works as designed!

bq. I vote for leaving IResource alone

WFM.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[cassandra-jdbc] 5 new revisions pushed by wfs...@gmail.com on 2012-11-19 05:48 GMT

2012-11-19 Thread cassandra-jdbc . apache-extras . org

5 new revisions:

Revision: 946e3f9ce790
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:22:15 2012
Log:  Support new CQL3 Thrift calls in CassandraConnection
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=946e3f9ce790

Revision: 4bb83b3eefa2
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:30:11 2012
Log:  Fix Issue #49,  Better handling of Null in PreparedStatement  
setters...

http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=4bb83b3eefa2

Revision: c217c201eca0
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:41:37 2012
Log:  Completed Enhancement Issue #51, Support for Collections
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=c217c201eca0

Revision: 052ad46f5f4b
Author:   Palmer Cox palmer...@gmail.com
Date: Sun Nov 18 21:45:28 2012
Log:  Fixed Issue #50, JDBC Suite does not compile under JDK 7
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=052ad46f5f4b

Revision: e548427cee85
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:48:14 2012
Log:  Update project POM to use C* Beta2
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=e548427cee85

==
Revision: 946e3f9ce790
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:22:15 2012
Log:  Support new CQL3 Thrift calls in CassandraConnection
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=946e3f9ce790

Modified:
 /src/main/java/org/apache/cassandra/cql/jdbc/CassandraConnection.java

===
--- /src/main/java/org/apache/cassandra/cql/jdbc/CassandraConnection.java	 
Sun Oct 14 10:02:03 2012
+++ /src/main/java/org/apache/cassandra/cql/jdbc/CassandraConnection.java	 
Sun Nov 18 21:22:15 2012

@@ -56,7 +56,7 @@
 public static final int DB_MAJOR_VERSION = 1;
 public static final int DB_MINOR_VERSION = 2;
 public static final String DB_PRODUCT_NAME = Cassandra;
-public static final String DEFAULT_CQL_VERSION = 2.0.0;
+public static final String DEFAULT_CQL_VERSION = 3.0.0;

 public static Compression defaultCompression = Compression.GZIP;

@@ -444,7 +444,8 @@

 try
 {
-return client.execute_cql_query(Utils.compressQuery(queryStr,  
compression), compression);
+if (majorCqlVersion==3) return  
client.execute_cql3_query(Utils.compressQuery(queryStr, compression),  
compression, ConsistencyLevel.ONE);
+elsereturn  
client.execute_cql_query(Utils.compressQuery(queryStr, compression),  
compression);

 }
 catch (TException error)
 {
@@ -476,7 +477,8 @@
 {
 try
 {
-return client.execute_prepared_cql_query(itemId, values);
+if (majorCqlVersion==3) return  
client.execute_prepared_cql3_query(itemId, values, ConsistencyLevel.ONE);
+elsereturn  
client.execute_prepared_cql_query(itemId, values);

 }
 catch (TException error)
 {
@@ -490,7 +492,8 @@
 {
 try
 {
-return client.prepare_cql_query(Utils.compressQuery(queryStr,  
compression), compression);
+if (majorCqlVersion==3) return  
client.prepare_cql3_query(Utils.compressQuery(queryStr, compression),  
compression);
+elsereturn  
client.prepare_cql_query(Utils.compressQuery(queryStr, compression),  
compression);

 }
 catch (TException error)
 {

==
Revision: 4bb83b3eefa2
Author:   Rick Shaw wfs...@gmail.com
Date: Sun Nov 18 21:30:11 2012
Log:  Fix Issue #49,  Better handling of Null in PreparedStatement  
setters

o Handle nulls in value argument of setters of object types like String
  as if it was a setNull by inserting an empty ByteBuffer
http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/detail?r=4bb83b3eefa2

Modified:
  
/src/main/java/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java


===
---  
/src/main/java/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java	 
Sun Oct 14 10:02:03 2012
+++  
/src/main/java/org/apache/cassandra/cql/jdbc/CassandraPreparedStatement.java	 
Sun Nov 18 21:30:11 2012

@@ -1,23 +1,23 @@
 /*
  *
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * regarding copyright ownership. The ASF licenses this file
  * to you under the Apache License, Version 2.0 (the
  * License); you may not use this file except 

[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

bq. Of course you'd need to revoke GRANT as well. Works as designed!
I don't like this design :( P.GRANT (P.AUTHORIZE) would be an equivalent of the 
old FULL_ACCESS, but on steroids. A super-permission that includes other 
permissions.
No, permissions should not intersect.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

It's a meta-permission really (permission to grant permissions). It just 
doesn't belong there.

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4874) Possible authorizaton handling impovements

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4874:
--

Also queries like LIST ALTER PERMISSIONS ON data/ks now won't show everybody 
capable of altering data/ks. Will have to list grant permissions as well (since 
a user with P.GRANT will be able to just give P.ALTER to himself at any moment).

 Possible authorizaton handling impovements
 --

 Key: CASSANDRA-4874
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4874
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
  Labels: security
 Fix For: 1.2.0 rc1

 Attachments: 4874-4875.txt, 4874-v2.txt, 4874-v3.txt, v1-v2.diff


 I'll create another issue with my suggestions about fixing/improving 
 IAuthority interfaces. This one lists possible improvements that aren't 
 related to grant/revoke methods.
 Inconsistencies:
 - CREATE COLUMNFAMILY: P.CREATE on the KS in CQL2 vs. P.CREATE on the CF in 
 CQL3 and Thrift
 - BATCH: P.UPDATE or P.DELETE on CF in CQL2 vs. P.UPDATE in CQL3 and Thrift 
 (despite remove* in Thrift asking for P.DELETE)
 - DELETE: P.DELETE in CQL2 and Thrift vs. P.UPDATE in CQL3
 - DROP INDEX: no checks in CQL2 vs. P.ALTER on the CF in CQL3
 Other issues/suggestions
 - CQL2 DROP INDEX should require authorization
 - current permission checks are inconsistent since they are performed 
 separately by CQL2 query processor, Thrift CassandraServer and CQL3 statement 
 classes.
 We should move it to one place. SomeClassWithABetterName.authorize(Operation, 
 KS, CF, User), where operation would be a enum
 (ALTER_KEYSPACE, ALTER_TABLE, CREATE_TABLE, CREATE, USE, UPDATE etc.), CF 
 should be nullable.
 - we don't respect the hierarchy when checking for permissions, or, to be 
 more specific, we are doing it wrong. take  CQL3 INSERT as an example:
 we require P.UPDATE on the CF or FULL_ACCESS on either KS or CF. However, 
 having P.UPDATE on the KS won't allow you to perform the statement, only 
 FULL_ACCESS will do.
 I doubt this was intentional, and if it was, I say it's wrong. P.UPDATE on 
 the KS should allow you to do updates on KS's cfs.
 Examples in 
 http://www.datastax.com/dev/blog/dynamic-permission-allocation-in-cassandra-1-1
  point to it being a bug, since REVOKE UPDATE ON ks FROM omega is there.
 - currently we lack a way to set permission on cassandra/keyspaces resource. 
 I think we should be able to do it. See the following point on why.
 - currently to create a keyspace you must have a P.CREATE permission on that 
 keyspace THAT DOESN'T EVEN EXIST YET. So only a superuser can create a 
 keyspace,
 or a superuser must first grant you a permission to create it. Which doesn't 
 look right to me. P.CREATE on cassandra/keyspaces should allow you to create 
 new
 keyspaces without an explicit permission for each of them.
 - same goes for CREATE TABLE. you need P.CREATE on that not-yet-existing CF 
 of FULL_ACCESS on the whole KS. P.CREATE on the KS won't do. this is wrong.
 - since permissions don't map directly to statements, we should describe 
 clearly in the documentation what permissions are required by what cql 
 statement/thrift method.
 Full list of current permission requirements: https://gist.github.com/3978182

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-4927:
-

It's probably doable to make antlr happy with that, so I'm good doing it. Not 
considering it a priority though.

 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Daniel Strawson (JIRA)

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

Daniel Strawson commented on CASSANDRA-4973:


Sorry I should have added something about that, I did get an error, but don't 
recall how I produced it or if it was at the point of querying the sec. index, 
so was hoping to put something clearer up when the issue comes back.  At one 
point the system got into a state where queries were failing, but a restart 
fixed it.  That and the upgrade meant that I didn't really want to put up   In 
the mean time, this is the last exception in my system.log and I'm pretty sure 
would have been there  when the issue was happening or arounds abouts.

ERROR [Thrift:1] 2012-11-19 11:15:41,172 AbstractCassandraDaemon.java (line 
134) Exception in thread Thread[Thrift:1,5,main]java.io.IOError: 
java.io.EOFException
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:64)
at 
org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:66)
at 
org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:78)
at 
org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:63)
at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1331)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1193)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1123)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:144)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:113)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135)
at 
org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1440)
at 
org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:88)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:595)
at 
org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1429)
at 
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:48)
at 
org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:867)
at 
org.apache.cassandra.thrift.CassandraServer.get_indexed_slices(CassandraServer.java:811)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_indexed_slices.getResult(Cassandra.java:3056)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_indexed_slices.getResult(Cassandra.java:3044)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
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)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
at 
org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:324)
at 
org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:398)
at 
org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:380)
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:54)
... 26 more



 Secondary Index stops returning rows
 

 Key: CASSANDRA-4973
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4973
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.1.2, 1.1.6
 Environment: Centos 6.3, Java 1.6.0_35, cass. 1.1.2 upgraded to 1.1.6
Reporter: Daniel Strawson

 I've been using cassandra on a project for a little while in development and 
 have recently suddenly started having an issue where the secondary index 
 stops working, this is happening on my new production system, we are not yet 
 live.   Things work ok one moment, then suddenly queries to the cf through 
 the secondary index stop returning data.  I've seen it happen on 3 

[jira] [Comment Edited] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Daniel Strawson (JIRA)

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

Daniel Strawson edited comment on CASSANDRA-4973 at 11/19/12 4:38 PM:
--

Sorry I should have added something about that, I did get an error, but don't 
recall how I produced it or if it was at the point of querying the sec. index, 
so was hoping to put something clearer up when the issue comes back.  At one 
point the system got into a state where queries were failing, but a restart 
fixed it.  That and the upgrade meant that I didn't really want to put up   In 
the mean time, this is the last exception in my system.log and I'm pretty sure 
would have been there  when the issue was happening or arounds abouts.

{code}
ERROR [Thrift:1] 2012-11-19 11:15:41,172 AbstractCassandraDaemon.java (line 
134) Exception in thread Thread[Thrift:1,5,main]java.io.IOError: 
java.io.EOFException
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:64)
at 
org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:66)
at 
org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:78)
at 
org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:256)
at 
org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:63)
at 
org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1331)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1193)
at 
org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1123)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:144)
at 
org.apache.cassandra.db.index.keys.KeysSearcher$1.computeNext(KeysSearcher.java:113)
at 
com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:140)
at 
com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:135)
at 
org.apache.cassandra.db.ColumnFamilyStore.filter(ColumnFamilyStore.java:1440)
at 
org.apache.cassandra.db.index.keys.KeysSearcher.search(KeysSearcher.java:88)
at 
org.apache.cassandra.db.index.SecondaryIndexManager.search(SecondaryIndexManager.java:595)
at 
org.apache.cassandra.db.ColumnFamilyStore.search(ColumnFamilyStore.java:1429)
at 
org.apache.cassandra.service.RangeSliceVerbHandler.executeLocally(RangeSliceVerbHandler.java:48)
at 
org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:867)
at 
org.apache.cassandra.thrift.CassandraServer.get_indexed_slices(CassandraServer.java:811)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_indexed_slices.getResult(Cassandra.java:3056)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_indexed_slices.getResult(Cassandra.java:3044)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
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)
Caused by: java.io.EOFException
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:399)
at java.io.RandomAccessFile.readFully(RandomAccessFile.java:377)
at 
org.apache.cassandra.io.util.RandomAccessReader.readBytes(RandomAccessReader.java:324)
at 
org.apache.cassandra.utils.ByteBufferUtil.read(ByteBufferUtil.java:398)
at 
org.apache.cassandra.utils.ByteBufferUtil.readWithShortLength(ByteBufferUtil.java:380)
at 
org.apache.cassandra.db.columniterator.SSTableSliceIterator.init(SSTableSliceIterator.java:54)
... 26 more
{code}


  was (Author: dcstrawson):
Sorry I should have added something about that, I did get an error, but 
don't recall how I produced it or if it was at the point of querying the sec. 
index, so was hoping to put something clearer up when the issue comes back.  At 
one point the system got into a state where queries were failing, but a restart 
fixed it.  That and the upgrade meant that I didn't really want to put up   In 
the mean time, this is the last exception in my system.log and I'm pretty sure 
would have been there  when the issue was happening or arounds abouts.

ERROR [Thrift:1] 2012-11-19 11:15:41,172 AbstractCassandraDaemon.java (line 
134) Exception in thread Thread[Thrift:1,5,main]java.io.IOError: 

[jira] [Updated] (CASSANDRA-4915) CQL should prevent or warn about inefficient queries

2012-11-19 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-4915:


Attachment: 4915.patch

Attaching patch for the ALLOW FILTERING part. As said above, I'd rather leave 
the short-cicuiting when we've filter more than X records to a later ticket, as 
this is more involved (and we can add the support with it being a breaking 
change anyway).

 CQL should prevent or warn about inefficient queries
 

 Key: CASSANDRA-4915
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4915
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 0.8.0
Reporter: Edward Capriolo
Assignee: Sylvain Lebresne
 Fix For: 1.2.0 rc1

 Attachments: 4915.patch


 When issuing a query like:
 {noformat}
 CREATE TABLE videos (
   videoid uuid,
   videoname varchar,
   username varchar,
   description varchar,
   tags varchar,
   upload_date timestamp,
   PRIMARY KEY (videoid,videoname)
 );
 SELECT * FROM videos WHERE videoname = 'My funny cat';
 {noformat}
 Cassandra samples some data using get_range_slice and then applies the query.
 This is very confusing to me, because as an end user am not sure if the query 
 is fast because Cassandra is performing an optimized query (over an index, or 
 using a slicePredicate) or if cassandra is simple sampling some random rows 
 and returning me some results. 
 My suggestions:
 1) force people to supply a LIMIT clause on any query that is going to
 page over get_range_slice
 2) having some type of explain support so I can establish if this
 query will work in the
 I will champion suggestion 1) because CQL has put itself in a rather unique 
 un-sql like position by applying an automatic limit clause without the user 
 asking for them. I also do not believe the CQL language should let the user 
 issue queries that will not work as intended with larger-then-auto-limit 
 size data sets.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread JIRA

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

Michał Michalski updated CASSANDRA-4927:


Attachment: cassandra-4927.txt

 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1

 Attachments: cassandra-4927.txt


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4927) E notation is not implemented for floating point numbers.

2012-11-19 Thread JIRA

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

Michał Michalski commented on CASSANDRA-4927:
-

I (kind of) fixed it:

{noformat}cqlsh:test INSERT INTO Values (key, value_double, value_float) 
VALUES ( 'E', -2.6034E+38, -2.6034E+38);

cqlsh:test SELECT * from Values;

 key | value_double | value_float
-+--+-
   E |  -2.6034e+38 | -2.6034e+38
{noformat}

But now my question is - can I test it somehow? Writing valid expression is one 
thing, but I wonder if it's not going to break other statements - as Jonathan 
stated, '+' and '-' signs are being used elsewhere so I can't be sure that 
there's no conflict with the rest of the grammar? Or maybe I'm wrong and Antlr 
is able to discover (?) and report such problems somehow?

 E notation is not implemented for floating point numbers.
 -

 Key: CASSANDRA-4927
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4927
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Krzysztof Cieslinski Cognitum
Priority: Minor
 Fix For: 1.2.1

 Attachments: cassandra-4927.txt


 'E' notation is not implemented for floating point numbers.
 Inserting some float value like -2.6034345E+38 results in:
 ??Bad Request: line 1:123 mismatched input 'E' expecting ')'??

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[2/2] git commit: Remove select arbitrary limit

2012-11-19 Thread slebresne
Remove select arbitrary limit

patch by slebresne; reviewed by jbellis for CASSANDRA-4918


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f574c95d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f574c95d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f574c95d

Branch: refs/heads/cassandra-1.2.0
Commit: f574c95d363903ac315402cb58d19aabc66b7837
Parents: c3173d4
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:51:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:51:31 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f5a487..72dd52c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
  * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
  * Use Stats.db when bulk loading if present (CASSANDRA-4957)
  * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
+ * Remove select arbitrary limit (CASSANDRA-4918)
 Merged from 1.1:
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index aaa03d3..ce08e66 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -188,7 +188,7 @@ useStatement returns [UseStatement stmt]
 selectStatement returns [SelectStatement.RawStatement expr]
 @init {
 boolean isCount = false;
-int limit = 1;
+int limit = Integer.MAX_VALUE;
 MapColumnIdentifier, Boolean orderings = new 
LinkedHashMapColumnIdentifier, Boolean();
 }
 : K_SELECT ( sclause=selectClause | (K_COUNT '(' sclause=selectCountClause 
')' { isCount = true; }) )



[1/2] git commit: Merge branch 'cassandra-1.2.0' of http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0

2012-11-19 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2.0 4f28e6b7d - 83bbd7542


Merge branch 'cassandra-1.2.0' of 
http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83bbd754
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83bbd754
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83bbd754

Branch: refs/heads/cassandra-1.2.0
Commit: 83bbd7542262301fd9e35471c598e0c2f7076a3b
Parents: f574c95 4f28e6b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:53:29 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:53:29 2012 +0100

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83bbd754/CHANGES.txt
--
diff --cc CHANGES.txt
index 72dd52c,69d7dc3..e36bf01
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -15,8 -15,8 +15,9 @@@
   * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
   * Use Stats.db when bulk loading if present (CASSANDRA-4957)
   * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
  Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)



[1/3] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2 707da4e82 - ead90d2ca


Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ead90d2c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ead90d2c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ead90d2c

Branch: refs/heads/cassandra-1.2
Commit: ead90d2ca878b03cded6ebdd20153978b4393a8d
Parents: 707da4e 83bbd75
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:55:14 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:55:14 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ead90d2c/CHANGES.txt
--



[2/3] git commit: Merge branch 'cassandra-1.2.0' of http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0

2012-11-19 Thread slebresne
Merge branch 'cassandra-1.2.0' of 
http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83bbd754
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83bbd754
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83bbd754

Branch: refs/heads/cassandra-1.2
Commit: 83bbd7542262301fd9e35471c598e0c2f7076a3b
Parents: f574c95 4f28e6b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:53:29 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:53:29 2012 +0100

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83bbd754/CHANGES.txt
--
diff --cc CHANGES.txt
index 72dd52c,69d7dc3..e36bf01
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -15,8 -15,8 +15,9 @@@
   * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
   * Use Stats.db when bulk loading if present (CASSANDRA-4957)
   * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
  Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)



[3/3] git commit: Remove select arbitrary limit

2012-11-19 Thread slebresne
Remove select arbitrary limit

patch by slebresne; reviewed by jbellis for CASSANDRA-4918


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f574c95d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f574c95d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f574c95d

Branch: refs/heads/cassandra-1.2
Commit: f574c95d363903ac315402cb58d19aabc66b7837
Parents: c3173d4
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:51:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:51:31 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f5a487..72dd52c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
  * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
  * Use Stats.db when bulk loading if present (CASSANDRA-4957)
  * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
+ * Remove select arbitrary limit (CASSANDRA-4918)
 Merged from 1.1:
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index aaa03d3..ce08e66 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -188,7 +188,7 @@ useStatement returns [UseStatement stmt]
 selectStatement returns [SelectStatement.RawStatement expr]
 @init {
 boolean isCount = false;
-int limit = 1;
+int limit = Integer.MAX_VALUE;
 MapColumnIdentifier, Boolean orderings = new 
LinkedHashMapColumnIdentifier, Boolean();
 }
 : K_SELECT ( sclause=selectClause | (K_COUNT '(' sclause=selectCountClause 
')' { isCount = true; }) )



[2/4] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread slebresne
Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ead90d2c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ead90d2c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ead90d2c

Branch: refs/heads/trunk
Commit: ead90d2ca878b03cded6ebdd20153978b4393a8d
Parents: 707da4e 83bbd75
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:55:14 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:55:14 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ead90d2c/CHANGES.txt
--



[1/4] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread slebresne
Updated Branches:
  refs/heads/trunk 653f74ce3 - cedf6655c


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cedf6655
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cedf6655
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cedf6655

Branch: refs/heads/trunk
Commit: cedf6655c62b5d859b616377485b02901373f973
Parents: 653f74c ead90d2
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:56:02 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:56:02 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/cedf6655/CHANGES.txt
--



[4/4] git commit: Remove select arbitrary limit

2012-11-19 Thread slebresne
Remove select arbitrary limit

patch by slebresne; reviewed by jbellis for CASSANDRA-4918


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f574c95d
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f574c95d
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f574c95d

Branch: refs/heads/trunk
Commit: f574c95d363903ac315402cb58d19aabc66b7837
Parents: c3173d4
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:51:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:51:31 2012 +0100

--
 CHANGES.txt  |1 +
 src/java/org/apache/cassandra/cql3/Cql.g |2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 7f5a487..72dd52c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -15,6 +15,7 @@
  * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
  * Use Stats.db when bulk loading if present (CASSANDRA-4957)
  * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
+ * Remove select arbitrary limit (CASSANDRA-4918)
 Merged from 1.1:
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/f574c95d/src/java/org/apache/cassandra/cql3/Cql.g
--
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g 
b/src/java/org/apache/cassandra/cql3/Cql.g
index aaa03d3..ce08e66 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -188,7 +188,7 @@ useStatement returns [UseStatement stmt]
 selectStatement returns [SelectStatement.RawStatement expr]
 @init {
 boolean isCount = false;
-int limit = 1;
+int limit = Integer.MAX_VALUE;
 MapColumnIdentifier, Boolean orderings = new 
LinkedHashMapColumnIdentifier, Boolean();
 }
 : K_SELECT ( sclause=selectClause | (K_COUNT '(' sclause=selectCountClause 
')' { isCount = true; }) )



[3/4] git commit: Merge branch 'cassandra-1.2.0' of http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0

2012-11-19 Thread slebresne
Merge branch 'cassandra-1.2.0' of 
http://git-wip-us.apache.org/repos/asf/cassandra into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/83bbd754
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/83bbd754
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/83bbd754

Branch: refs/heads/trunk
Commit: 83bbd7542262301fd9e35471c598e0c2f7076a3b
Parents: f574c95 4f28e6b
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 17:53:29 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 17:53:29 2012 +0100

--
 CHANGES.txt|1 +
 .../apache/cassandra/cql/AlterTableStatement.java  |9 +
 2 files changed, 6 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/83bbd754/CHANGES.txt
--
diff --cc CHANGES.txt
index 72dd52c,69d7dc3..e36bf01
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -15,8 -15,8 +15,9 @@@
   * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
   * Use Stats.db when bulk loading if present (CASSANDRA-4957)
   * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
  Merged from 1.1:
+  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)
   * expunge row cache post-truncate (CASSANDRA-4940)



git commit: Document that prepared ID a server global

2012-11-19 Thread slebresne
Updated Branches:
  refs/heads/cassandra-1.2.0 83bbd7542 - 8a2fdbf93


Document that prepared ID a server global


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8a2fdbf9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8a2fdbf9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8a2fdbf9

Branch: refs/heads/cassandra-1.2.0
Commit: 8a2fdbf93c32c370f6152a591fd0db165ca27f53
Parents: 83bbd75
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 18:10:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 18:10:31 2012 +0100

--
 doc/native_protocol.spec |4 
 1 files changed, 4 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8a2fdbf9/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 4c31ca8..ab44b21 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -452,6 +452,10 @@ Table of Contents
 - id is [short bytes] representing the prepared query ID.
 - metadata is defined exactly as for a Rows RESULT (See section 4.2.5.2).
 
+  Note that prepared query ID return is global to the node on which the query
+  has been prepared. It can be used on any connection to that node and this
+  until the node is restarted (after which the query must be reprepared).
+
 4.2.5.5. Schema_change
 
   The result to a schema altering query (creation/update/drop of a



[jira] [Commented] (CASSANDRA-4973) Secondary Index stops returning rows

2012-11-19 Thread Daniel Strawson (JIRA)

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

Daniel Strawson commented on CASSANDRA-4973:


ok - I've just done the following:

1. run the query get region where countryCode=GB.  This returned 13 rows OK.
2. stopped and started cassandra (kill pid).
3. ran the same query.  This returned no rows.

At this point there are no errors in the log file -

Next I'm doing the following:

4. run update column family region with column_metadata=[];
5. run update column family region with column_metadata=[ ...] ; (see original 
schema above)
6. ran the same query, it returned 13 rows OK.

here is the log file from the point where the restart happened:

{code}
 INFO [Thread-2] 2012-11-19 17:06:07,208 CassandraDaemon.java (line 212) 
Listening for thrift clients...
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,162 Memtable.java (line 213) 
CFS(Keyspace='Twickets', ColumnFamily='tweet') liveRatio is 4.0713678844519965 
(just-counted was 4.0713678844519965).  calculation took 8ms for 103 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,164 Memtable.java (line 213) 
CFS(Keyspace='Twickets', ColumnFamily='tweet.tweet_737461747573_idx') liveRatio 
is 25.840086759341418 (just-counted was 21.256038647342994).  calculation took 
1ms for 9 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,164 Memtable.java (line 213) 
CFS(Keyspace='Twickets', ColumnFamily='tweet.tweet_status_idx') liveRatio is 
9.66183574879227 (just-counted was 9.66183574879227).  calculation took 0ms for 
9 columns
 INFO [MemoryMeter:1] 2012-11-19 17:11:59,171 Memtable.java (line 213) 
CFS(Keyspace='Twickets', ColumnFamily='tweet.tweet_tweetTwitterId_idx') 
liveRatio is 40.57971014492754 (just-counted was 40.57971014492754).  
calculation took 6ms for 9 columns
 INFO [RPC-Thread:95] 2012-11-19 17:13:06,280 MigrationManager.java (line 164) 
Update ColumnFamily 'Twickets/region' From 
org.apache.cassandra.config.CFMetaData@5922da6a[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=null,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=null,columnAliases=[],valueAlias=null,column_metadata={java.nio.HeapByteBuffer[pos=0
 lim=11 cap=11]=ColumnDefinition{name=636f756e747279436f6465, 
validator=org.apache.cassandra.db.marshal.UTF8Type, index_type=KEYS, 
index_name='region_countryCode_idx'}, java.nio.HeapByteBuffer[pos=0 lim=5 
cap=5]=ColumnDefinition{name=6c6162656c, 
validator=org.apache.cassandra.db.marshal.UTF8Type, index_type=null, 
index_name='null'}},compactionStrategyClass=class 
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=null,caching=ALL]
 To 
org.apache.cassandra.config.CFMetaData@7f3192dd[cfId=1048,ksName=Twickets,cfName=region,cfType=Standard,comparator=org.apache.cassandra.db.marshal.UTF8Type,subcolumncomparator=null,comment=,readRepairChance=0.1,dclocalReadRepairChance=0.0,replicateOnWrite=true,gcGraceSeconds=864000,defaultValidator=org.apache.cassandra.db.marshal.BytesType,keyValidator=org.apache.cassandra.db.marshal.UTF8Type,minCompactionThreshold=4,maxCompactionThreshold=32,keyAlias=null,columnAliases=[],valueAlias=null,column_metadata={},compactionStrategyClass=class
 
org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy,compactionStrategyOptions={},compressionOptions={sstable_compression=org.apache.cassandra.io.compress.SnappyCompressor},bloomFilterFpChance=null,caching=ALL]
 INFO [MigrationStage:1] 2012-11-19 17:13:06,329 ColumnFamilyStore.java (line 
659) Enqueuing flush of Memtable-schema_columnfamilies@216957991(1170/1462 
serialized/live bytes, 20 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,330 Memtable.java (line 264) Writing 
Memtable-schema_columnfamilies@216957991(1170/1462 serialized/live bytes, 20 
ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,547 Memtable.java (line 305) 
Completed flushing 
/var/lib/cassandra/data/system/schema_columnfamilies/system-schema_columnfamilies-hf-100-Data.db
 (1236 bytes) for commitlog position ReplayPosition(segmentId=1353344762859, 
position=26876)
 INFO [MigrationStage:1] 2012-11-19 17:13:06,548 ColumnFamilyStore.java (line 
659) Enqueuing flush of Memtable-schema_columns@284615223(534/667 
serialized/live bytes, 10 ops)
 INFO [FlushWriter:2] 2012-11-19 17:13:06,549 Memtable.java (line 264) Writing 
Memtable-schema_columns@284615223(534/667 serialized/live bytes, 10 ops)
 INFO [CompactionExecutor:9] 2012-11-19 17:13:06,559 CompactionTask.java (line 
109) Compacting 

[jira] [Updated] (CASSANDRA-4893) Don't throw internal exceptions over JMX

2012-11-19 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-4893:
--

Attachment: (was: 
0001-remove-cassandra-specific-exceptions-from-JMX-interf.patch)

 Don't throw internal exceptions over JMX
 

 Key: CASSANDRA-4893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4893
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Nick Bailey
Assignee: Yuki Morishita
 Fix For: 1.2.1

 Attachments: 4893-1.2.txt


 Similarly to how we don't return internal objects over JMX we shouldn't throw 
 internal exceptions over jmx as well.
 The one example I encountered was throwing ConfigurationException for the 
 move() command. We should check the rest of our jmx as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (CASSANDRA-4893) Don't throw internal exceptions over JMX

2012-11-19 Thread Yuki Morishita (JIRA)

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

Yuki Morishita updated CASSANDRA-4893:
--

Attachment: 4893-1.2.txt

Dave, thanks for review.
Updated patch not to wrap cause and instead use just error message.

 Don't throw internal exceptions over JMX
 

 Key: CASSANDRA-4893
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4893
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.1.6, 1.2.0 beta 1
Reporter: Nick Bailey
Assignee: Yuki Morishita
 Fix For: 1.2.1

 Attachments: 4893-1.2.txt


 Similarly to how we don't return internal objects over JMX we shouldn't throw 
 internal exceptions over jmx as well.
 The one example I encountered was throwing ConfigurationException for the 
 move() command. We should check the rest of our jmx as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-3974) Per-CF TTL

2012-11-19 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-3974:
-

v8 lgtm.

 Per-CF TTL
 --

 Key: CASSANDRA-3974
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3974
 Project: Cassandra
  Issue Type: New Feature
Affects Versions: 1.2.0 beta 1
Reporter: Jonathan Ellis
Assignee: Kirk True
Priority: Minor
 Fix For: 1.2.0 rc1

 Attachments: 3974-v8.txt, trunk-3974.txt, trunk-3974v2.txt, 
 trunk-3974v3.txt, trunk-3974v4.txt, trunk-3974v5.txt, trunk-3974v6.txt, 
 trunk-3974v7.txt


 Per-CF TTL would allow compaction optimizations (drop an entire sstable's 
 worth of expired data) that we can't do with per-column.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-3042) Implement authentication in Pig loadFunc

2012-11-19 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-3042:
-

+1

 Implement authentication in Pig loadFunc
 

 Key: CASSANDRA-3042
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3042
 Project: Cassandra
  Issue Type: Improvement
  Components: Hadoop
Affects Versions: 1.1.2
Reporter: Nate McCall
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: authentication, pig
 Fix For: 1.1.7, 1.2.0 rc1

 Attachments: 3042-v2.txt, 3042-v3.txt, trunk-3042.txt


 Using already existing options for authentication in ConfigHelper, and adding 
 a call to client#login just before client#set_keyspace to in 
 CassandraStorage#initSchema

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4974) Can not disable hinted handoff

2012-11-19 Thread T Jake Luciani (JIRA)
T Jake Luciani created CASSANDRA-4974:
-

 Summary: Can not disable hinted handoff
 Key: CASSANDRA-4974
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4974
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Affects Versions: 1.2.0 beta 2
Reporter: T Jake Luciani


Hinted handoff seems to run regardless of the hinted_handoff_enabled setting

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4829) Make consistency level configurable in cqlsh

2012-11-19 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4829:
-

+1

 Make consistency level configurable in cqlsh
 

 Key: CASSANDRA-4829
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4829
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.2.0 rc1

 Attachments: 4829.txt


 CASSANDRA-4734 moved consistency level to the protocol, so cqlsh needs a way 
 to change consistency level from the default (ONE).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: add basic authentication support for Pig CassandraStorage; patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.1 e30519f33 - fab61e309


add basic authentication support for Pig CassandraStorage; patch by
Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fab61e30
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fab61e30
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fab61e30

Branch: refs/heads/cassandra-1.1
Commit: fab61e309fd4ddf312f033f3458a9aa067279090
Parents: e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:37:09 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:37:57 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   86 ++-
 3 files changed, 83 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ef5e43b..a89184e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index 1646635..4b49387 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -295,16 +295,38 @@ public class ConfigHelper
 return conf.get(OUTPUT_KEYSPACE_CONFIG);
 }
 
+public static void setInputKeyspaceUserNameAndPassword(Configuration conf, 
String username, String password)
+{
+setInputKeyspaceUserName(conf, username);
+setInputKeyspacePassword(conf, password);
+}
+
+public static void setInputKeyspaceUserName(Configuration conf, String 
username)
+{
+conf.set(INPUT_KEYSPACE_USERNAME_CONFIG, username);
+}
+
 public static String getInputKeyspaceUserName(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_USERNAME_CONFIG);
 }
 
+public static void setInputKeyspacePassword(Configuration conf, String 
password)
+{
+conf.set(INPUT_KEYSPACE_PASSWD_CONFIG, password);
+}
+
 public static String getInputKeyspacePassword(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_PASSWD_CONFIG);
 }
 
+public static void setOutputKeyspaceUserNameAndPassword(Configuration 
conf, String username, String password)
+{
+setOutputKeyspaceUserName(conf, username);
+setOutputKeyspacePassword(conf, password);
+}
+
 public static void setOutputKeyspaceUserName(Configuration conf, String 
username)
 {
 conf.set(OUTPUT_KEYSPACE_USERNAME_CONFIG, username);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 8f539a9..c2f1c13 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -21,38 +21,31 @@ import java.math.BigInteger;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.BytesType;
-import org.apache.cassandra.db.marshal.IntegerType;
-import org.apache.cassandra.db.marshal.TypeParser;
-import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.Hex;
-import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.cassandra.auth.IAuthenticator;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.db.marshal.*;
 import 
org.apache.cassandra.db.marshal.AbstractCompositeType.CompositeComponent;
 import org.apache.cassandra.hadoop.*;
-import 

[2/2] git commit: add basic authentication support for Pig CassandraStorage; patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042

2012-11-19 Thread aleksey
add basic authentication support for Pig CassandraStorage; patch by
Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fab61e30
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fab61e30
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fab61e30

Branch: refs/heads/cassandra-1.2.0
Commit: fab61e309fd4ddf312f033f3458a9aa067279090
Parents: e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:37:09 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:37:57 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   86 ++-
 3 files changed, 83 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ef5e43b..a89184e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index 1646635..4b49387 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -295,16 +295,38 @@ public class ConfigHelper
 return conf.get(OUTPUT_KEYSPACE_CONFIG);
 }
 
+public static void setInputKeyspaceUserNameAndPassword(Configuration conf, 
String username, String password)
+{
+setInputKeyspaceUserName(conf, username);
+setInputKeyspacePassword(conf, password);
+}
+
+public static void setInputKeyspaceUserName(Configuration conf, String 
username)
+{
+conf.set(INPUT_KEYSPACE_USERNAME_CONFIG, username);
+}
+
 public static String getInputKeyspaceUserName(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_USERNAME_CONFIG);
 }
 
+public static void setInputKeyspacePassword(Configuration conf, String 
password)
+{
+conf.set(INPUT_KEYSPACE_PASSWD_CONFIG, password);
+}
+
 public static String getInputKeyspacePassword(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_PASSWD_CONFIG);
 }
 
+public static void setOutputKeyspaceUserNameAndPassword(Configuration 
conf, String username, String password)
+{
+setOutputKeyspaceUserName(conf, username);
+setOutputKeyspacePassword(conf, password);
+}
+
 public static void setOutputKeyspaceUserName(Configuration conf, String 
username)
 {
 conf.set(OUTPUT_KEYSPACE_USERNAME_CONFIG, username);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 8f539a9..c2f1c13 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -21,38 +21,31 @@ import java.math.BigInteger;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.BytesType;
-import org.apache.cassandra.db.marshal.IntegerType;
-import org.apache.cassandra.db.marshal.TypeParser;
-import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.Hex;
-import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.cassandra.auth.IAuthenticator;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.db.marshal.*;
 import 
org.apache.cassandra.db.marshal.AbstractCompositeType.CompositeComponent;
 import org.apache.cassandra.hadoop.*;
-import org.apache.cassandra.thrift.Mutation;
-import 

[1/2] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2.0 8a2fdbf93 - c00c6ab09


Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c00c6ab0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c00c6ab0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c00c6ab0

Branch: refs/heads/cassandra-1.2.0
Commit: c00c6ab098d8322e2a3a416f8416152c570c132c
Parents: 8a2fdbf fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:46:39 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:46:39 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 3 files changed, 82 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/CHANGES.txt
--
diff --cc CHANGES.txt
index e36bf01,a89184e..6763ba8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
 +Merged from 1.1:
+  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
   * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --cc src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 73e0fb5,c2f1c13..7c459b5
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@@ -22,19 -21,11 +22,12 @@@ import java.math.BigInteger
  import java.nio.ByteBuffer;
  import java.util.*;
  
- import org.apache.cassandra.db.marshal.AbstractType;
- import org.apache.cassandra.db.marshal.BytesType;
- import org.apache.cassandra.db.marshal.IntegerType;
- import org.apache.cassandra.db.marshal.TypeParser;
 +import org.apache.cassandra.exceptions.ConfigurationException;
 +import org.apache.cassandra.exceptions.SyntaxException;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
+ import org.apache.cassandra.auth.IAuthenticator;
 -import org.apache.cassandra.config.ConfigurationException;
  import org.apache.cassandra.db.Column;
  import org.apache.cassandra.db.IColumn;
  import org.apache.cassandra.db.marshal.*;



[1/4] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 ead90d2ca - 791affd0b


Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/791affd0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/791affd0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/791affd0

Branch: refs/heads/cassandra-1.2
Commit: 791affd0bca499d668f8e4ac413d4995bbcfceb0
Parents: ead90d2 c00c6ab
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:48:30 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:48:30 2012 +0300

--
 CHANGES.txt|1 +
 doc/native_protocol.spec   |4 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 4 files changed, 86 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/791affd0/CHANGES.txt
--



[2/4] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c00c6ab0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c00c6ab0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c00c6ab0

Branch: refs/heads/cassandra-1.2
Commit: c00c6ab098d8322e2a3a416f8416152c570c132c
Parents: 8a2fdbf fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:46:39 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:46:39 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 3 files changed, 82 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/CHANGES.txt
--
diff --cc CHANGES.txt
index e36bf01,a89184e..6763ba8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
 +Merged from 1.1:
+  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
   * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --cc src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 73e0fb5,c2f1c13..7c459b5
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@@ -22,19 -21,11 +22,12 @@@ import java.math.BigInteger
  import java.nio.ByteBuffer;
  import java.util.*;
  
- import org.apache.cassandra.db.marshal.AbstractType;
- import org.apache.cassandra.db.marshal.BytesType;
- import org.apache.cassandra.db.marshal.IntegerType;
- import org.apache.cassandra.db.marshal.TypeParser;
 +import org.apache.cassandra.exceptions.ConfigurationException;
 +import org.apache.cassandra.exceptions.SyntaxException;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
+ import org.apache.cassandra.auth.IAuthenticator;
 -import org.apache.cassandra.config.ConfigurationException;
  import org.apache.cassandra.db.Column;
  import org.apache.cassandra.db.IColumn;
  import org.apache.cassandra.db.marshal.*;



[4/4] git commit: Document that prepared ID a server global

2012-11-19 Thread aleksey
Document that prepared ID a server global


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8a2fdbf9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8a2fdbf9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8a2fdbf9

Branch: refs/heads/cassandra-1.2
Commit: 8a2fdbf93c32c370f6152a591fd0db165ca27f53
Parents: 83bbd75
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 18:10:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 18:10:31 2012 +0100

--
 doc/native_protocol.spec |4 
 1 files changed, 4 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8a2fdbf9/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 4c31ca8..ab44b21 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -452,6 +452,10 @@ Table of Contents
 - id is [short bytes] representing the prepared query ID.
 - metadata is defined exactly as for a Rows RESULT (See section 4.2.5.2).
 
+  Note that prepared query ID return is global to the node on which the query
+  has been prepared. It can be used on any connection to that node and this
+  until the node is restarted (after which the query must be reprepared).
+
 4.2.5.5. Schema_change
 
   The result to a schema altering query (creation/update/drop of a



[3/4] git commit: add basic authentication support for Pig CassandraStorage; patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042

2012-11-19 Thread aleksey
add basic authentication support for Pig CassandraStorage; patch by
Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fab61e30
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fab61e30
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fab61e30

Branch: refs/heads/cassandra-1.2
Commit: fab61e309fd4ddf312f033f3458a9aa067279090
Parents: e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:37:09 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:37:57 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   86 ++-
 3 files changed, 83 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ef5e43b..a89184e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index 1646635..4b49387 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -295,16 +295,38 @@ public class ConfigHelper
 return conf.get(OUTPUT_KEYSPACE_CONFIG);
 }
 
+public static void setInputKeyspaceUserNameAndPassword(Configuration conf, 
String username, String password)
+{
+setInputKeyspaceUserName(conf, username);
+setInputKeyspacePassword(conf, password);
+}
+
+public static void setInputKeyspaceUserName(Configuration conf, String 
username)
+{
+conf.set(INPUT_KEYSPACE_USERNAME_CONFIG, username);
+}
+
 public static String getInputKeyspaceUserName(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_USERNAME_CONFIG);
 }
 
+public static void setInputKeyspacePassword(Configuration conf, String 
password)
+{
+conf.set(INPUT_KEYSPACE_PASSWD_CONFIG, password);
+}
+
 public static String getInputKeyspacePassword(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_PASSWD_CONFIG);
 }
 
+public static void setOutputKeyspaceUserNameAndPassword(Configuration 
conf, String username, String password)
+{
+setOutputKeyspaceUserName(conf, username);
+setOutputKeyspacePassword(conf, password);
+}
+
 public static void setOutputKeyspaceUserName(Configuration conf, String 
username)
 {
 conf.set(OUTPUT_KEYSPACE_USERNAME_CONFIG, username);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 8f539a9..c2f1c13 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -21,38 +21,31 @@ import java.math.BigInteger;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.BytesType;
-import org.apache.cassandra.db.marshal.IntegerType;
-import org.apache.cassandra.db.marshal.TypeParser;
-import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.Hex;
-import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.cassandra.auth.IAuthenticator;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.db.marshal.*;
 import 
org.apache.cassandra.db.marshal.AbstractCompositeType.CompositeComponent;
 import org.apache.cassandra.hadoop.*;
-import org.apache.cassandra.thrift.Mutation;
-import 

[1/5] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/trunk cedf6655c - f02ee5412


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f02ee541
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f02ee541
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f02ee541

Branch: refs/heads/trunk
Commit: f02ee541248450090e02ec0da694f53c30be983d
Parents: cedf665 791affd
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:49:38 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:49:38 2012 +0300

--
 CHANGES.txt|1 +
 doc/native_protocol.spec   |4 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 4 files changed, 86 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f02ee541/CHANGES.txt
--



[2/5] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/791affd0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/791affd0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/791affd0

Branch: refs/heads/trunk
Commit: 791affd0bca499d668f8e4ac413d4995bbcfceb0
Parents: ead90d2 c00c6ab
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:48:30 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:48:30 2012 +0300

--
 CHANGES.txt|1 +
 doc/native_protocol.spec   |4 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 4 files changed, 86 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/791affd0/CHANGES.txt
--



[3/5] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0

Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c00c6ab0
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c00c6ab0
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c00c6ab0

Branch: refs/heads/trunk
Commit: c00c6ab098d8322e2a3a416f8416152c570c132c
Parents: 8a2fdbf fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:46:39 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:46:39 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   83 ++
 3 files changed, 82 insertions(+), 24 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/CHANGES.txt
--
diff --cc CHANGES.txt
index e36bf01,a89184e..6763ba8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,5 +1,23 @@@
 -1.1.7
 +1.2-rc1
 + * fix cqlsh rendering of blob fields (CASSANDRA-4970)
 + * fix cqlsh DESCRIBE command (CASSANDRA-4913)
 + * save truncation position in system table (CASSANDRA-4906)
 + * Move CompressionMetadata off-heap (CASSANDRA-4937)
 + * allow CLI to GET cql3 columnfamily data (CASSANDRA-4924)
 + * Fix rare race condition in getExpireTimeForEndpoint (CASSANDRA-4402)
 + * acquire references to overlapping sstables during compaction so bloom 
filter
 +   doesn't get free'd prematurely (CASSANDRA-4934)
 + * Don't share slice query filter in CQL3 SelectStatement (CASSANDRA-4928)
 + * Separate tracing from Log4J (CASSANDRA-4861)
 + * Exclude gcable tombstones from merkle-tree computation (CASSANDRA-4905)
 + * Better printing of AbstractBounds for tracing (CASSANDRA-4931)
 + * Optimize mostRecentTomstone check in CC.collectAllData (CASSANDRA-4883)
 + * Change stream session ID to UUID to avoid collision from same node 
(CASSANDRA-4813)
 + * Use Stats.db when bulk loading if present (CASSANDRA-4957)
 + * Skip repair on system_trace and keyspaces with RF=1 (CASSANDRA-4956)
 + * Remove select arbitrary limit (CASSANDRA-4918)
 +Merged from 1.1:
+  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
   * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
   * reset getRangeSlice filter after finishing a row for get_paged_slice
 (CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c00c6ab0/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --cc src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 73e0fb5,c2f1c13..7c459b5
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@@ -22,19 -21,11 +22,12 @@@ import java.math.BigInteger
  import java.nio.ByteBuffer;
  import java.util.*;
  
- import org.apache.cassandra.db.marshal.AbstractType;
- import org.apache.cassandra.db.marshal.BytesType;
- import org.apache.cassandra.db.marshal.IntegerType;
- import org.apache.cassandra.db.marshal.TypeParser;
 +import org.apache.cassandra.exceptions.ConfigurationException;
 +import org.apache.cassandra.exceptions.SyntaxException;
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  
+ import org.apache.cassandra.auth.IAuthenticator;
 -import org.apache.cassandra.config.ConfigurationException;
  import org.apache.cassandra.db.Column;
  import org.apache.cassandra.db.IColumn;
  import org.apache.cassandra.db.marshal.*;



[4/5] git commit: add basic authentication support for Pig CassandraStorage; patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042

2012-11-19 Thread aleksey
add basic authentication support for Pig CassandraStorage; patch by
Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-3042


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/fab61e30
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/fab61e30
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/fab61e30

Branch: refs/heads/trunk
Commit: fab61e309fd4ddf312f033f3458a9aa067279090
Parents: e30519f
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:37:09 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:37:57 2012 +0300

--
 CHANGES.txt|1 +
 .../org/apache/cassandra/hadoop/ConfigHelper.java  |   22 
 .../cassandra/hadoop/pig/CassandraStorage.java |   86 ++-
 3 files changed, 83 insertions(+), 26 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index ef5e43b..a89184e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice
(CASSANDRA-4919)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java 
b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
index 1646635..4b49387 100644
--- a/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
+++ b/src/java/org/apache/cassandra/hadoop/ConfigHelper.java
@@ -295,16 +295,38 @@ public class ConfigHelper
 return conf.get(OUTPUT_KEYSPACE_CONFIG);
 }
 
+public static void setInputKeyspaceUserNameAndPassword(Configuration conf, 
String username, String password)
+{
+setInputKeyspaceUserName(conf, username);
+setInputKeyspacePassword(conf, password);
+}
+
+public static void setInputKeyspaceUserName(Configuration conf, String 
username)
+{
+conf.set(INPUT_KEYSPACE_USERNAME_CONFIG, username);
+}
+
 public static String getInputKeyspaceUserName(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_USERNAME_CONFIG);
 }
 
+public static void setInputKeyspacePassword(Configuration conf, String 
password)
+{
+conf.set(INPUT_KEYSPACE_PASSWD_CONFIG, password);
+}
+
 public static String getInputKeyspacePassword(Configuration conf)
 {
return conf.get(INPUT_KEYSPACE_PASSWD_CONFIG);
 }
 
+public static void setOutputKeyspaceUserNameAndPassword(Configuration 
conf, String username, String password)
+{
+setOutputKeyspaceUserName(conf, username);
+setOutputKeyspacePassword(conf, password);
+}
+
 public static void setOutputKeyspaceUserName(Configuration conf, String 
username)
 {
 conf.set(OUTPUT_KEYSPACE_USERNAME_CONFIG, username);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fab61e30/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index 8f539a9..c2f1c13 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -21,38 +21,31 @@ import java.math.BigInteger;
 import java.nio.ByteBuffer;
 import java.util.*;
 
-import org.apache.cassandra.config.ConfigurationException;
-import org.apache.cassandra.db.marshal.AbstractType;
-import org.apache.cassandra.db.marshal.BytesType;
-import org.apache.cassandra.db.marshal.IntegerType;
-import org.apache.cassandra.db.marshal.TypeParser;
-import org.apache.cassandra.thrift.*;
-import org.apache.cassandra.utils.FBUtilities;
-import org.apache.cassandra.utils.Hex;
-import org.apache.cassandra.utils.UUIDGen;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import org.apache.cassandra.auth.IAuthenticator;
+import org.apache.cassandra.config.ConfigurationException;
 import org.apache.cassandra.db.Column;
 import org.apache.cassandra.db.IColumn;
 import org.apache.cassandra.db.marshal.*;
 import 
org.apache.cassandra.db.marshal.AbstractCompositeType.CompositeComponent;
 import org.apache.cassandra.hadoop.*;
-import org.apache.cassandra.thrift.Mutation;
-import 

[5/5] git commit: Document that prepared ID a server global

2012-11-19 Thread aleksey
Document that prepared ID a server global


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8a2fdbf9
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8a2fdbf9
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8a2fdbf9

Branch: refs/heads/trunk
Commit: 8a2fdbf93c32c370f6152a591fd0db165ca27f53
Parents: 83bbd75
Author: Sylvain Lebresne sylv...@datastax.com
Authored: Mon Nov 19 18:10:31 2012 +0100
Committer: Sylvain Lebresne sylv...@datastax.com
Committed: Mon Nov 19 18:10:31 2012 +0100

--
 doc/native_protocol.spec |4 
 1 files changed, 4 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8a2fdbf9/doc/native_protocol.spec
--
diff --git a/doc/native_protocol.spec b/doc/native_protocol.spec
index 4c31ca8..ab44b21 100644
--- a/doc/native_protocol.spec
+++ b/doc/native_protocol.spec
@@ -452,6 +452,10 @@ Table of Contents
 - id is [short bytes] representing the prepared query ID.
 - metadata is defined exactly as for a Rows RESULT (See section 4.2.5.2).
 
+  Note that prepared query ID return is global to the node on which the query
+  has been prepared. It can be used on any connection to that node and this
+  until the node is restarted (after which the query must be reprepared).
+
 4.2.5.5. Schema_change
 
   The result to a schema altering query (creation/update/drop of a



git commit: cqlsh: make consistency level configurable; patch by Aleksey Yeschenko, reviewed by Brandon Williams

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2.0 c00c6ab09 - 9db882790


cqlsh: make consistency level configurable; patch by Aleksey Yeschenko,
reviewed by Brandon Williams


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9db88279
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9db88279
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9db88279

Branch: refs/heads/cassandra-1.2.0
Commit: 9db882790f1b1a37a590d3b32dcef9ce14dad6ae
Parents: c00c6ab
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:54:18 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:54:18 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6763ba8..e63350b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2-rc1
+ * make consistency level configurable in cqlsh (CASSANDRA-4829)
  * fix cqlsh rendering of blob fields (CASSANDRA-4970)
  * fix cqlsh DESCRIBE command (CASSANDRA-4913)
  * save truncation position in system table (CASSANDRA-4906)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 142b036..611f6af 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -172,6 +172,7 @@ SYSTEM_KEYSPACES = ('system', 'system_traces')
 my_commands_ending_with_newline = (
 'help',
 '?',
+'consistency',
 'describe',
 'desc',
 'show',
@@ -195,7 +196,9 @@ cqlsh_extra_syntax_rules = r'''
 cqlshCommand ::= CQL_Statement
  | specialCommand ( ; | \n )
  ;
+
 specialCommand ::= describeCommand
+   | consistencyCommand
| showCommand
| assumeCommand
| sourceCommand
@@ -215,6 +218,19 @@ cqlsh_extra_syntax_rules = r'''
   | CLUSTER )
 ;
 
+consistencyCommand ::= CONSISTENCY ( level=consistencyLevel )?
+   ;
+
+consistencyLevel ::= ANY
+ | ONE
+ | TWO
+ | THREE
+ | QUORUM
+ | ALL
+ | LOCAL_QUORUM
+ | EACH_QUORUM
+ ;
+
 showCommand ::= SHOW what=( VERSION | HOST | ASSUMPTIONS )
 ;
 
@@ -1855,6 +1871,36 @@ class Shell(cmd.Cmd):
 self.tracing_enabled = False
 print 'Disabled tracing.'
 
+def do_consistency(self, parsed):
+
+CONSISTENCY [cqlsh with CQL3 only]
+
+   Overrides default consistency level (default level is ONE).
+
+CONSISTENCY level
+
+   Sets consistency level for future requests.
+
+   Valid consistency levels:
+
+   ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM and EACH_QUORUM.
+
+CONSISTENCY
+
+   CONSISTENCY with no arguments shows the current consistency level.
+
+if not self.cqlver_atleast(3):
+self.printerr('CONSISTENCY requires CQL version 3.0.0 or higher.')
+return
+
+level = parsed.get_binding('level')
+if level is None:
+print 'Current consistency level is %s.' % 
(self.cursor.consistency_level,)
+return
+
+self.cursor.consistency_level = level.upper()
+print 'Consistency level set to %s.' % (level.upper(),)
+
 def do_exit(self, parsed=None):
 
 EXIT/QUIT [cqlsh only]



[1/2] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 791affd0b - 6875c3bf8


Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6875c3bf
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6875c3bf
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6875c3bf

Branch: refs/heads/cassandra-1.2
Commit: 6875c3bf85f0662be1b910c157aed0ba1e721214
Parents: 791affd 9db8827
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:55:57 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:55:57 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6875c3bf/CHANGES.txt
--
diff --cc CHANGES.txt
index 7c61ec5,e63350b..c14a0d8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,5 +1,13 @@@
 +1.2.1
 + * pool [Compressed]RandomAccessReader objects on the partitioned read path
 +   (CASSANDRA-4942)
 + * Add debug logging to list filenames processed by Directories.migrateFile 
 +   method (CASSANDRA-4939)
 + * Expose black-listed directories via JMX (CASSANDRA-4848)
 +
 +
  1.2-rc1
+  * make consistency level configurable in cqlsh (CASSANDRA-4829)
   * fix cqlsh rendering of blob fields (CASSANDRA-4970)
   * fix cqlsh DESCRIBE command (CASSANDRA-4913)
   * save truncation position in system table (CASSANDRA-4906)



[2/2] git commit: cqlsh: make consistency level configurable; patch by Aleksey Yeschenko, reviewed by Brandon Williams

2012-11-19 Thread aleksey
cqlsh: make consistency level configurable; patch by Aleksey Yeschenko,
reviewed by Brandon Williams


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9db88279
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9db88279
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9db88279

Branch: refs/heads/cassandra-1.2
Commit: 9db882790f1b1a37a590d3b32dcef9ce14dad6ae
Parents: c00c6ab
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:54:18 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:54:18 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6763ba8..e63350b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2-rc1
+ * make consistency level configurable in cqlsh (CASSANDRA-4829)
  * fix cqlsh rendering of blob fields (CASSANDRA-4970)
  * fix cqlsh DESCRIBE command (CASSANDRA-4913)
  * save truncation position in system table (CASSANDRA-4906)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 142b036..611f6af 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -172,6 +172,7 @@ SYSTEM_KEYSPACES = ('system', 'system_traces')
 my_commands_ending_with_newline = (
 'help',
 '?',
+'consistency',
 'describe',
 'desc',
 'show',
@@ -195,7 +196,9 @@ cqlsh_extra_syntax_rules = r'''
 cqlshCommand ::= CQL_Statement
  | specialCommand ( ; | \n )
  ;
+
 specialCommand ::= describeCommand
+   | consistencyCommand
| showCommand
| assumeCommand
| sourceCommand
@@ -215,6 +218,19 @@ cqlsh_extra_syntax_rules = r'''
   | CLUSTER )
 ;
 
+consistencyCommand ::= CONSISTENCY ( level=consistencyLevel )?
+   ;
+
+consistencyLevel ::= ANY
+ | ONE
+ | TWO
+ | THREE
+ | QUORUM
+ | ALL
+ | LOCAL_QUORUM
+ | EACH_QUORUM
+ ;
+
 showCommand ::= SHOW what=( VERSION | HOST | ASSUMPTIONS )
 ;
 
@@ -1855,6 +1871,36 @@ class Shell(cmd.Cmd):
 self.tracing_enabled = False
 print 'Disabled tracing.'
 
+def do_consistency(self, parsed):
+
+CONSISTENCY [cqlsh with CQL3 only]
+
+   Overrides default consistency level (default level is ONE).
+
+CONSISTENCY level
+
+   Sets consistency level for future requests.
+
+   Valid consistency levels:
+
+   ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM and EACH_QUORUM.
+
+CONSISTENCY
+
+   CONSISTENCY with no arguments shows the current consistency level.
+
+if not self.cqlver_atleast(3):
+self.printerr('CONSISTENCY requires CQL version 3.0.0 or higher.')
+return
+
+level = parsed.get_binding('level')
+if level is None:
+print 'Current consistency level is %s.' % 
(self.cursor.consistency_level,)
+return
+
+self.cursor.consistency_level = level.upper()
+print 'Consistency level set to %s.' % (level.upper(),)
+
 def do_exit(self, parsed=None):
 
 EXIT/QUIT [cqlsh only]



[2/3] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6875c3bf
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6875c3bf
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6875c3bf

Branch: refs/heads/trunk
Commit: 6875c3bf85f0662be1b910c157aed0ba1e721214
Parents: 791affd 9db8827
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:55:57 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:55:57 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6875c3bf/CHANGES.txt
--
diff --cc CHANGES.txt
index 7c61ec5,e63350b..c14a0d8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,12 -1,5 +1,13 @@@
 +1.2.1
 + * pool [Compressed]RandomAccessReader objects on the partitioned read path
 +   (CASSANDRA-4942)
 + * Add debug logging to list filenames processed by Directories.migrateFile 
 +   method (CASSANDRA-4939)
 + * Expose black-listed directories via JMX (CASSANDRA-4848)
 +
 +
  1.2-rc1
+  * make consistency level configurable in cqlsh (CASSANDRA-4829)
   * fix cqlsh rendering of blob fields (CASSANDRA-4970)
   * fix cqlsh DESCRIBE command (CASSANDRA-4913)
   * save truncation position in system table (CASSANDRA-4906)



[1/3] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/trunk f02ee5412 - 8d4825402


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/8d482540
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/8d482540
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/8d482540

Branch: refs/heads/trunk
Commit: 8d482540280ab520ae284e3a17c31d8bc9dd5f05
Parents: f02ee54 6875c3b
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:56:59 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:56:59 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8d482540/CHANGES.txt
--



[3/3] git commit: cqlsh: make consistency level configurable; patch by Aleksey Yeschenko, reviewed by Brandon Williams

2012-11-19 Thread aleksey
cqlsh: make consistency level configurable; patch by Aleksey Yeschenko,
reviewed by Brandon Williams


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9db88279
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9db88279
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9db88279

Branch: refs/heads/trunk
Commit: 9db882790f1b1a37a590d3b32dcef9ce14dad6ae
Parents: c00c6ab
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 21:54:18 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 21:54:18 2012 +0300

--
 CHANGES.txt |1 +
 bin/cqlsh   |   46 ++
 2 files changed, 47 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 6763ba8..e63350b 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2-rc1
+ * make consistency level configurable in cqlsh (CASSANDRA-4829)
  * fix cqlsh rendering of blob fields (CASSANDRA-4970)
  * fix cqlsh DESCRIBE command (CASSANDRA-4913)
  * save truncation position in system table (CASSANDRA-4906)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9db88279/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 142b036..611f6af 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -172,6 +172,7 @@ SYSTEM_KEYSPACES = ('system', 'system_traces')
 my_commands_ending_with_newline = (
 'help',
 '?',
+'consistency',
 'describe',
 'desc',
 'show',
@@ -195,7 +196,9 @@ cqlsh_extra_syntax_rules = r'''
 cqlshCommand ::= CQL_Statement
  | specialCommand ( ; | \n )
  ;
+
 specialCommand ::= describeCommand
+   | consistencyCommand
| showCommand
| assumeCommand
| sourceCommand
@@ -215,6 +218,19 @@ cqlsh_extra_syntax_rules = r'''
   | CLUSTER )
 ;
 
+consistencyCommand ::= CONSISTENCY ( level=consistencyLevel )?
+   ;
+
+consistencyLevel ::= ANY
+ | ONE
+ | TWO
+ | THREE
+ | QUORUM
+ | ALL
+ | LOCAL_QUORUM
+ | EACH_QUORUM
+ ;
+
 showCommand ::= SHOW what=( VERSION | HOST | ASSUMPTIONS )
 ;
 
@@ -1855,6 +1871,36 @@ class Shell(cmd.Cmd):
 self.tracing_enabled = False
 print 'Disabled tracing.'
 
+def do_consistency(self, parsed):
+
+CONSISTENCY [cqlsh with CQL3 only]
+
+   Overrides default consistency level (default level is ONE).
+
+CONSISTENCY level
+
+   Sets consistency level for future requests.
+
+   Valid consistency levels:
+
+   ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM and EACH_QUORUM.
+
+CONSISTENCY
+
+   CONSISTENCY with no arguments shows the current consistency level.
+
+if not self.cqlver_atleast(3):
+self.printerr('CONSISTENCY requires CQL version 3.0.0 or higher.')
+return
+
+level = parsed.get_binding('level')
+if level is None:
+print 'Current consistency level is %s.' % 
(self.cursor.consistency_level,)
+return
+
+self.cursor.consistency_level = level.upper()
+print 'Consistency level set to %s.' % (level.upper(),)
+
 def do_exit(self, parsed=None):
 
 EXIT/QUIT [cqlsh only]



[jira] [Commented] (CASSANDRA-4829) Make consistency level configurable in cqlsh

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4829:
--

Thanks. Committed.

 Make consistency level configurable in cqlsh
 

 Key: CASSANDRA-4829
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4829
 Project: Cassandra
  Issue Type: Improvement
Affects Versions: 1.2.0 beta 1
Reporter: Aleksey Yeschenko
Assignee: Aleksey Yeschenko
Priority: Minor
  Labels: cqlsh
 Fix For: 1.2.0 rc1

 Attachments: 4829.txt


 CASSANDRA-4734 moved consistency level to the protocol, so cqlsh needs a way 
 to change consistency level from the default (ONE).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-4921) improve cqlsh COPY FROM performance

2012-11-19 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-4921:
-

+1

 improve cqlsh COPY FROM performance
 ---

 Key: CASSANDRA-4921
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4921
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.1.2
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.1.7

 Attachments: 4921.txt


 Profiling shows that prepare_inline takes the vast majority of cqlsh COPY 
 FROM time, particularly on csv rows with many columns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (CASSANDRA-3378) Allow configuration of storage protocol socket buffer

2012-11-19 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-3378:
-

storage protocol is the internode communication protocol Cassandra uses, 
which is completely custom (ie, not thrift-based or anything like that.)  
OutboundTcpConnection is the class you need to modify to set the socket buffer.

 Allow configuration of storage protocol socket buffer
 -

 Key: CASSANDRA-3378
 URL: https://issues.apache.org/jira/browse/CASSANDRA-3378
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Brandon Williams
Priority: Minor
  Labels: lhf

 Similar to rpc_[send,recv]_buff_size_in_bytes, we should expose this for high 
 latency connections.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


git commit: cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-4921

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.1 fab61e309 - 7cfdb14ef


cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko,
reviewed by Brandon Williams for CASSANDRA-4921


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7cfdb14e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7cfdb14e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7cfdb14e

Branch: refs/heads/cassandra-1.1
Commit: 7cfdb14efb065cfb9a76a8ae3ec25d35f2fded15
Parents: fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:08:43 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:08:43 2012 +0300

--
 CHANGES.txt  |1 +
 bin/cqlsh|2 ++
 lib/cql-internal-only-1.0.10.zip |  Bin 68142 - 0 bytes
 lib/cql-internal-only-1.4.0.zip  |  Bin 0 - 91855 bytes
 4 files changed, 3 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a89184e..b32b3b6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * cqlsh: improve COPY FROM performance (CASSANDRA-4921)
  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 5728240..ac9e167 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1237,6 +1237,8 @@ class Shell(cmd.Cmd):
 self.prompt = prompt
 
 def cql_protect_name(self, name):
+if isinstance(name, unicode):
+name = name.encode('utf8')
 return cqlruleset.maybe_escape_name(name)
 
 def cql_protect_value(self, value):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.0.10.zip
--
diff --git a/lib/cql-internal-only-1.0.10.zip b/lib/cql-internal-only-1.0.10.zip
deleted file mode 100644
index c4ca8f2..000
Binary files a/lib/cql-internal-only-1.0.10.zip and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.4.0.zip
--
diff --git a/lib/cql-internal-only-1.4.0.zip b/lib/cql-internal-only-1.4.0.zip
new file mode 100644
index 000..10dfeaf
Binary files /dev/null and b/lib/cql-internal-only-1.4.0.zip differ



[2/2] git commit: cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-4921

2012-11-19 Thread aleksey
cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko,
reviewed by Brandon Williams for CASSANDRA-4921


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7cfdb14e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7cfdb14e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7cfdb14e

Branch: refs/heads/cassandra-1.2.0
Commit: 7cfdb14efb065cfb9a76a8ae3ec25d35f2fded15
Parents: fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:08:43 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:08:43 2012 +0300

--
 CHANGES.txt  |1 +
 bin/cqlsh|2 ++
 lib/cql-internal-only-1.0.10.zip |  Bin 68142 - 0 bytes
 lib/cql-internal-only-1.4.0.zip  |  Bin 0 - 91855 bytes
 4 files changed, 3 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a89184e..b32b3b6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * cqlsh: improve COPY FROM performance (CASSANDRA-4921)
  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 5728240..ac9e167 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1237,6 +1237,8 @@ class Shell(cmd.Cmd):
 self.prompt = prompt
 
 def cql_protect_name(self, name):
+if isinstance(name, unicode):
+name = name.encode('utf8')
 return cqlruleset.maybe_escape_name(name)
 
 def cql_protect_value(self, value):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.0.10.zip
--
diff --git a/lib/cql-internal-only-1.0.10.zip b/lib/cql-internal-only-1.0.10.zip
deleted file mode 100644
index c4ca8f2..000
Binary files a/lib/cql-internal-only-1.0.10.zip and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.4.0.zip
--
diff --git a/lib/cql-internal-only-1.4.0.zip b/lib/cql-internal-only-1.4.0.zip
new file mode 100644
index 000..10dfeaf
Binary files /dev/null and b/lib/cql-internal-only-1.4.0.zip differ



[1/2] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2.0 9db882790 - 3957df175


Merge branch 'cassandra-1.1' into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3957df17
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3957df17
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3957df17

Branch: refs/heads/cassandra-1.2.0
Commit: 3957df175d3a27737ea2e84607076cf9df3acd86
Parents: 9db8827 7cfdb14
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:12:33 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:12:33 2012 +0300

--

--




[1/3] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 6875c3bf8 - e329c3078


Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e329c307
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e329c307
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e329c307

Branch: refs/heads/cassandra-1.2
Commit: e329c3078c22111e648af5b91da6bbe3b4f25c76
Parents: 6875c3b 3957df1
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:15:21 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:15:21 2012 +0300

--

--




[2/3] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3957df17
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3957df17
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3957df17

Branch: refs/heads/cassandra-1.2
Commit: 3957df175d3a27737ea2e84607076cf9df3acd86
Parents: 9db8827 7cfdb14
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:12:33 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:12:33 2012 +0300

--

--




[3/3] git commit: cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-4921

2012-11-19 Thread aleksey
cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko,
reviewed by Brandon Williams for CASSANDRA-4921


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7cfdb14e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7cfdb14e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7cfdb14e

Branch: refs/heads/cassandra-1.2
Commit: 7cfdb14efb065cfb9a76a8ae3ec25d35f2fded15
Parents: fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:08:43 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:08:43 2012 +0300

--
 CHANGES.txt  |1 +
 bin/cqlsh|2 ++
 lib/cql-internal-only-1.0.10.zip |  Bin 68142 - 0 bytes
 lib/cql-internal-only-1.4.0.zip  |  Bin 0 - 91855 bytes
 4 files changed, 3 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a89184e..b32b3b6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * cqlsh: improve COPY FROM performance (CASSANDRA-4921)
  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 5728240..ac9e167 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1237,6 +1237,8 @@ class Shell(cmd.Cmd):
 self.prompt = prompt
 
 def cql_protect_name(self, name):
+if isinstance(name, unicode):
+name = name.encode('utf8')
 return cqlruleset.maybe_escape_name(name)
 
 def cql_protect_value(self, value):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.0.10.zip
--
diff --git a/lib/cql-internal-only-1.0.10.zip b/lib/cql-internal-only-1.0.10.zip
deleted file mode 100644
index c4ca8f2..000
Binary files a/lib/cql-internal-only-1.0.10.zip and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.4.0.zip
--
diff --git a/lib/cql-internal-only-1.4.0.zip b/lib/cql-internal-only-1.4.0.zip
new file mode 100644
index 000..10dfeaf
Binary files /dev/null and b/lib/cql-internal-only-1.4.0.zip differ



[2/4] git commit: Merge branch 'cassandra-1.2.0' into cassandra-1.2

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.2.0' into cassandra-1.2


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e329c307
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e329c307
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e329c307

Branch: refs/heads/trunk
Commit: e329c3078c22111e648af5b91da6bbe3b4f25c76
Parents: 6875c3b 3957df1
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:15:21 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:15:21 2012 +0300

--

--




[3/4] git commit: Merge branch 'cassandra-1.1' into cassandra-1.2.0

2012-11-19 Thread aleksey
Merge branch 'cassandra-1.1' into cassandra-1.2.0


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3957df17
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3957df17
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3957df17

Branch: refs/heads/trunk
Commit: 3957df175d3a27737ea2e84607076cf9df3acd86
Parents: 9db8827 7cfdb14
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:12:33 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:12:33 2012 +0300

--

--




[4/4] git commit: cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko, reviewed by Brandon Williams for CASSANDRA-4921

2012-11-19 Thread aleksey
cqlsh: improve COPY FROM performance; Patch by Aleksey Yeschenko,
reviewed by Brandon Williams for CASSANDRA-4921


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7cfdb14e
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7cfdb14e
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7cfdb14e

Branch: refs/heads/trunk
Commit: 7cfdb14efb065cfb9a76a8ae3ec25d35f2fded15
Parents: fab61e3
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:08:43 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:08:43 2012 +0300

--
 CHANGES.txt  |1 +
 bin/cqlsh|2 ++
 lib/cql-internal-only-1.0.10.zip |  Bin 68142 - 0 bytes
 lib/cql-internal-only-1.4.0.zip  |  Bin 0 - 91855 bytes
 4 files changed, 3 insertions(+), 0 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index a89184e..b32b3b6 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.1.7
+ * cqlsh: improve COPY FROM performance (CASSANDRA-4921)
  * add basic authentication support for Pig CassandraStorage (CASSANDRA-3042)
  * fix CQL2 ALTER TABLE compaction_strategy_class altering (CASSANDRA-4965)
  * reset getRangeSlice filter after finishing a row for get_paged_slice

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/bin/cqlsh
--
diff --git a/bin/cqlsh b/bin/cqlsh
index 5728240..ac9e167 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -1237,6 +1237,8 @@ class Shell(cmd.Cmd):
 self.prompt = prompt
 
 def cql_protect_name(self, name):
+if isinstance(name, unicode):
+name = name.encode('utf8')
 return cqlruleset.maybe_escape_name(name)
 
 def cql_protect_value(self, value):

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.0.10.zip
--
diff --git a/lib/cql-internal-only-1.0.10.zip b/lib/cql-internal-only-1.0.10.zip
deleted file mode 100644
index c4ca8f2..000
Binary files a/lib/cql-internal-only-1.0.10.zip and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7cfdb14e/lib/cql-internal-only-1.4.0.zip
--
diff --git a/lib/cql-internal-only-1.4.0.zip b/lib/cql-internal-only-1.4.0.zip
new file mode 100644
index 000..10dfeaf
Binary files /dev/null and b/lib/cql-internal-only-1.4.0.zip differ



[1/4] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread aleksey
Updated Branches:
  refs/heads/trunk 8d4825402 - 1a0bc5991


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1a0bc599
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1a0bc599
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1a0bc599

Branch: refs/heads/trunk
Commit: 1a0bc5991ba16b1147deeb797b75a4a8a6b8a136
Parents: 8d48254 e329c30
Author: Aleksey Yeschenko alek...@apache.org
Authored: Mon Nov 19 22:16:15 2012 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Mon Nov 19 22:16:15 2012 +0300

--

--




[jira] [Commented] (CASSANDRA-4921) improve cqlsh COPY FROM performance

2012-11-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-4921:
--

Thanks. Committed.

 improve cqlsh COPY FROM performance
 ---

 Key: CASSANDRA-4921
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4921
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Affects Versions: 1.1.2
Reporter: Jonathan Ellis
Assignee: Aleksey Yeschenko
Priority: Minor
 Fix For: 1.1.7

 Attachments: 4921.txt


 Profiling shows that prepare_inline takes the vast majority of cqlsh COPY 
 FROM time, particularly on csv rows with many columns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (CASSANDRA-4975) AE in Bounds when running word count

2012-11-19 Thread Brandon Williams (JIRA)
Brandon Williams created CASSANDRA-4975:
---

 Summary: AE in Bounds when running word count
 Key: CASSANDRA-4975
 URL: https://issues.apache.org/jira/browse/CASSANDRA-4975
 Project: Cassandra
  Issue Type: Bug
Affects Versions: 1.2.0 beta 2
Reporter: Brandon Williams
 Fix For: 1.2.0 rc1


Just run the word count in examples:

{noformat}
ERROR 20:01:24,693 Exception in thread Thread[Thrift:16,5,main]
java.lang.AssertionError: [DecoratedKey(663380155395974698, 
6b6579333137),max(-8100212023555812159)]
at org.apache.cassandra.dht.Bounds.init(Bounds.java:41)
at org.apache.cassandra.dht.Bounds.init(Bounds.java:34)
at 
org.apache.cassandra.thrift.CassandraServer.get_paged_slice(CassandraServer.java:1041)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_paged_slice.getResult(Cassandra.java:3478)
at 
org.apache.cassandra.thrift.Cassandra$Processor$get_paged_slice.getResult(Cassandra.java:3466)
at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
at 
org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:199)
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)
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[1/6] git commit: Merge branch 'cassandra-1.2' into trunk

2012-11-19 Thread brandonwilliams
Updated Branches:
  refs/heads/cassandra-1.2 e329c3078 - efded0046
  refs/heads/cassandra-1.2.0 3957df175 - edf63d8a5
  refs/heads/trunk 1a0bc5991 - 633dbbd7a


Merge branch 'cassandra-1.2' into trunk


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/633dbbd7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/633dbbd7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/633dbbd7

Branch: refs/heads/trunk
Commit: 633dbbd7a156e91460817ec8bdb460aa2cdcfb11
Parents: 1a0bc59 efded00
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Nov 19 14:26:49 2012 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Nov 19 14:26:49 2012 -0600

--
 .../apache/cassandra/hadoop/BulkOutputFormat.java  |4 ++--
 .../apache/cassandra/hadoop/BulkRecordWriter.java  |   15 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)
--




[4/6] git commit: Support multiple outputs in BOF Patch by Michael Kjellman, reviewed by brandonwilliams for CASSANDRA-4912

2012-11-19 Thread brandonwilliams
Support multiple outputs in BOF
Patch by Michael Kjellman, reviewed by brandonwilliams for
CASSANDRA-4912


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/edf63d8a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/edf63d8a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/edf63d8a

Branch: refs/heads/trunk
Commit: edf63d8a51101efa708343d1dce071d031cd
Parents: 3957df1
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Nov 19 14:25:41 2012 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Nov 19 14:25:41 2012 -0600

--
 .../apache/cassandra/hadoop/BulkOutputFormat.java  |4 ++--
 .../apache/cassandra/hadoop/BulkRecordWriter.java  |   15 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java 
b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
index 7a6a1d7..f1c5f39 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
@@ -37,9 +37,9 @@ public class BulkOutputFormat extends 
OutputFormatByteBuffer,ListMutation
 
 private void checkOutputSpecs(Configuration conf)
 {
-if (ConfigHelper.getOutputKeyspace(conf) == null || 
ConfigHelper.getOutputColumnFamily(conf) == null)
+if (ConfigHelper.getOutputKeyspace(conf) == null)
 {
-throw new UnsupportedOperationException(you must set the keyspace 
and columnfamily with setColumnFamily());
+throw new UnsupportedOperationException(you must set the keyspace 
with setColumnFamily());
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
index 4883743..3f70ca5 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
@@ -60,7 +60,7 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 private final Logger logger = 
LoggerFactory.getLogger(BulkRecordWriter.class);
 private SSTableSimpleUnsortedWriter writer;
 private SSTableLoader loader;
-private final File outputdir;
+private File outputdir;
 private Progressable progress;
 private int maxFailures;
 
@@ -99,9 +99,6 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 this.conf = conf;
 
DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS,
 0)));
 maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, 0));
-String keyspace = ConfigHelper.getOutputKeyspace(conf);
-outputdir = new File(getOutputLocation() + File.separator + keyspace + 
File.separator + ConfigHelper.getOutputColumnFamily(conf)); //dir must be named 
by ks/cf for the loader
-outputdir.mkdirs();
 }
 
 private String getOutputLocation() throws IOException
@@ -127,8 +124,16 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
}
 }
 
-private void prepareWriter()
+private void prepareWriter() throws IOException
 {
+if (outputdir == null)
+{
+String keyspace = ConfigHelper.getOutputKeyspace(conf);
+//dir must be named by ks/cf for the loader
+outputdir = new File(getOutputLocation() + File.separator + 
keyspace + File.separator + ConfigHelper.getOutputColumnFamily(conf));
+outputdir.mkdirs();
+}
+
 if (writer == null)
 {
 AbstractType? subcomparator = null;



[6/6] git commit: Support multiple outputs in BOF Patch by Michael Kjellman, reviewed by brandonwilliams for CASSANDRA-4912

2012-11-19 Thread brandonwilliams
Support multiple outputs in BOF
Patch by Michael Kjellman, reviewed by brandonwilliams for
CASSANDRA-4912


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/edf63d8a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/edf63d8a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/edf63d8a

Branch: refs/heads/cassandra-1.2
Commit: edf63d8a51101efa708343d1dce071d031cd
Parents: 3957df1
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Nov 19 14:25:41 2012 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Nov 19 14:25:41 2012 -0600

--
 .../apache/cassandra/hadoop/BulkOutputFormat.java  |4 ++--
 .../apache/cassandra/hadoop/BulkRecordWriter.java  |   15 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java 
b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
index 7a6a1d7..f1c5f39 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
@@ -37,9 +37,9 @@ public class BulkOutputFormat extends 
OutputFormatByteBuffer,ListMutation
 
 private void checkOutputSpecs(Configuration conf)
 {
-if (ConfigHelper.getOutputKeyspace(conf) == null || 
ConfigHelper.getOutputColumnFamily(conf) == null)
+if (ConfigHelper.getOutputKeyspace(conf) == null)
 {
-throw new UnsupportedOperationException(you must set the keyspace 
and columnfamily with setColumnFamily());
+throw new UnsupportedOperationException(you must set the keyspace 
with setColumnFamily());
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
index 4883743..3f70ca5 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
@@ -60,7 +60,7 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 private final Logger logger = 
LoggerFactory.getLogger(BulkRecordWriter.class);
 private SSTableSimpleUnsortedWriter writer;
 private SSTableLoader loader;
-private final File outputdir;
+private File outputdir;
 private Progressable progress;
 private int maxFailures;
 
@@ -99,9 +99,6 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 this.conf = conf;
 
DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS,
 0)));
 maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, 0));
-String keyspace = ConfigHelper.getOutputKeyspace(conf);
-outputdir = new File(getOutputLocation() + File.separator + keyspace + 
File.separator + ConfigHelper.getOutputColumnFamily(conf)); //dir must be named 
by ks/cf for the loader
-outputdir.mkdirs();
 }
 
 private String getOutputLocation() throws IOException
@@ -127,8 +124,16 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
}
 }
 
-private void prepareWriter()
+private void prepareWriter() throws IOException
 {
+if (outputdir == null)
+{
+String keyspace = ConfigHelper.getOutputKeyspace(conf);
+//dir must be named by ks/cf for the loader
+outputdir = new File(getOutputLocation() + File.separator + 
keyspace + File.separator + ConfigHelper.getOutputColumnFamily(conf));
+outputdir.mkdirs();
+}
+
 if (writer == null)
 {
 AbstractType? subcomparator = null;



[5/6] git commit: Support multiple outputs in BOF Patch by Michael Kjellman, reviewed by brandonwilliams for CASSANDRA-4912

2012-11-19 Thread brandonwilliams
Support multiple outputs in BOF
Patch by Michael Kjellman, reviewed by brandonwilliams for
CASSANDRA-4912


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/edf63d8a
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/edf63d8a
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/edf63d8a

Branch: refs/heads/cassandra-1.2.0
Commit: edf63d8a51101efa708343d1dce071d031cd
Parents: 3957df1
Author: Brandon Williams brandonwilli...@apache.org
Authored: Mon Nov 19 14:25:41 2012 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Mon Nov 19 14:25:41 2012 -0600

--
 .../apache/cassandra/hadoop/BulkOutputFormat.java  |4 ++--
 .../apache/cassandra/hadoop/BulkRecordWriter.java  |   15 ++-
 2 files changed, 12 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java 
b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
index 7a6a1d7..f1c5f39 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkOutputFormat.java
@@ -37,9 +37,9 @@ public class BulkOutputFormat extends 
OutputFormatByteBuffer,ListMutation
 
 private void checkOutputSpecs(Configuration conf)
 {
-if (ConfigHelper.getOutputKeyspace(conf) == null || 
ConfigHelper.getOutputColumnFamily(conf) == null)
+if (ConfigHelper.getOutputKeyspace(conf) == null)
 {
-throw new UnsupportedOperationException(you must set the keyspace 
and columnfamily with setColumnFamily());
+throw new UnsupportedOperationException(you must set the keyspace 
with setColumnFamily());
 }
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf63d8a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java 
b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
index 4883743..3f70ca5 100644
--- a/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/BulkRecordWriter.java
@@ -60,7 +60,7 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 private final Logger logger = 
LoggerFactory.getLogger(BulkRecordWriter.class);
 private SSTableSimpleUnsortedWriter writer;
 private SSTableLoader loader;
-private final File outputdir;
+private File outputdir;
 private Progressable progress;
 private int maxFailures;
 
@@ -99,9 +99,6 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
 this.conf = conf;
 
DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS,
 0)));
 maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, 0));
-String keyspace = ConfigHelper.getOutputKeyspace(conf);
-outputdir = new File(getOutputLocation() + File.separator + keyspace + 
File.separator + ConfigHelper.getOutputColumnFamily(conf)); //dir must be named 
by ks/cf for the loader
-outputdir.mkdirs();
 }
 
 private String getOutputLocation() throws IOException
@@ -127,8 +124,16 @@ implements 
org.apache.hadoop.mapred.RecordWriterByteBuffer,ListMutation
}
 }
 
-private void prepareWriter()
+private void prepareWriter() throws IOException
 {
+if (outputdir == null)
+{
+String keyspace = ConfigHelper.getOutputKeyspace(conf);
+//dir must be named by ks/cf for the loader
+outputdir = new File(getOutputLocation() + File.separator + 
keyspace + File.separator + ConfigHelper.getOutputColumnFamily(conf));
+outputdir.mkdirs();
+}
+
 if (writer == null)
 {
 AbstractType? subcomparator = null;



  1   2   >