[jira] [Created] (CASSANDRA-6891) nodetool status always does dns lookups, even if you didn't pass --resolve-ip

2014-03-19 Thread Jeremiah Jordan (JIRA)
Jeremiah Jordan created CASSANDRA-6891:
--

 Summary: nodetool status always does dns lookups, even if you 
didn't pass --resolve-ip
 Key: CASSANDRA-6891
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6891
 Project: Cassandra
  Issue Type: Bug
Reporter: Jeremiah Jordan


nodetool status always does dns lookups, even if you didn't pass --resolve-ip.

So if your dns is slow or messed up, status takes forever to run.  It should 
only do the dns lookup if the user passed -r/--resolve-ip



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-6168) nodetool status should issue a warning when no keyspace is specified

2014-03-19 Thread Brandon Williams (JIRA)

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

Brandon Williams reassigned CASSANDRA-6168:
---

Assignee: Vijay

Care to take a stab, Vijay?

> nodetool status should issue a warning when no keyspace is specified
> 
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Assignee: Vijay
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Comment Edited] (CASSANDRA-6168) nodetool status reports 05 ownership when no keyspace is spacified

2014-03-19 Thread Jeremiah Jordan (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941395#comment-13941395
 ] 

Jeremiah Jordan edited comment on CASSANDRA-6168 at 3/20/14 5:08 AM:
-

we actually don't for status, we need to make it act like ring


was (Author: jjordan):
we actually don't for status

> nodetool status reports 05 ownership when no keyspace is spacified
> --
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6168) nodetool status should issue a warning when no keyspace is spacified

2014-03-19 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan updated CASSANDRA-6168:
---

Labels: lhf  (was: )

> nodetool status should issue a warning when no keyspace is spacified
> 
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6168) nodetool status should issue a warning when no keyspace is specified

2014-03-19 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan updated CASSANDRA-6168:
---

Summary: nodetool status should issue a warning when no keyspace is 
specified  (was: nodetool status should issue a warning when no keyspace is 
spacified)

> nodetool status should issue a warning when no keyspace is specified
> 
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6168) nodetool status reports 05 ownership when no keyspace is spacified

2014-03-19 Thread Jeremiah Jordan (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941395#comment-13941395
 ] 

Jeremiah Jordan commented on CASSANDRA-6168:


we actually don't for status

> nodetool status reports 05 ownership when no keyspace is spacified
> --
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6168) nodetool status should issue a warning when no keyspace is spacified

2014-03-19 Thread Jeremiah Jordan (JIRA)

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

Jeremiah Jordan updated CASSANDRA-6168:
---

Summary: nodetool status should issue a warning when no keyspace is 
spacified  (was: nodetool status reports 05 ownership when no keyspace is 
spacified)

> nodetool status should issue a warning when no keyspace is spacified
> 
>
> Key: CASSANDRA-6168
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6168
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Patricio Echague
>Priority: Minor
>  Labels: lhf
>
> Seen in 1.2.10.
> Apologies if this is expected behavior. Nodetool status reports 0% ownership 
> unless I add a keyspace name.
> nodetool help docs says:
> ..." status - Print cluster information (state, load, IDs, 
> ...)"...
> output without keyspace name
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.146  81.96 GB   256 0.0%   
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.63   95.32 GB   256 0.0%   
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.184  89.54 GB   256 0.1%   
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.190  79.68 GB   256 0.0%   
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.168  93.44 GB   256 0.7%   
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.132  84.4 GB256 0.0%   
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns   Host ID
>Rack
> UN  10.x.x.62   56.09 GB   256 32.4%  
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> UN  10.x.x.131  60.11 GB   256 32.8%  
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.0%  
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> {code}
> and with keyspace. Example: nodetool status MYKSPS
> {code}
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.184  89.51 GB   256 50.0% 
> cd86c420-55e2-4d99-8ed9-d9ee8d6a9d9c  r1
> UN  10.x.x.146  81.96 GB   256 50.0% 
> a70c59b3-a667-4d76-ba5b-ba849ad672da  r1
> UN  10.x.x.168  93.44 GB   256 50.0% 
> 33be316f-1276-475d-90cf-2667950d3a2c  r1
> UN  10.x.x.63   95.32 GB   256 50.0% 
> f8cb7b10-4ebe-484a-a1c0-6cb2d053901b  r1
> UN  10.x.x.190  79.68 GB   256 50.0% 
> 544c3906-bc02-400d-9fd2-1e39ecadd6ff  r1
> UN  10.x.x.132  84.4 GB256 50.0% 
> b327d9f1-cab0-4583-8e5e-95c50b4074fd  r1
> Datacenter: DCOFFLINE
> =
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  Address  Load   Tokens  Owns (effective)  Host ID 
>   Rack
> UN  10.x.x.131  60.11 GB   256 32.8% 
> 0b9d3314-039e-4f88-8ba6-d0f2885d9a30  r1
> UN  10.x.x.167  56.45 GB   256 34.7% 
> ba76f4fe-4250-4839-a37d-c1a7c24e585d  r1
> UN  10.x.x.62   56.09 GB   256 32.5% 
> c8994d27-767b-431f-bdc2-9196eeeb6f44  r1
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6870) Transform operation

2014-03-19 Thread Edward Capriolo (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941391#comment-13941391
 ] 

Edward Capriolo commented on CASSANDRA-6870:


I have made a few more commits on my branch.

Transform now supports two operations can apply two different approaches.
1) The original operator performed an operation on the entire ColumnFamily
2) We can now specify 0 or more column transforms these look like this

{code}
ColumnTransform incrementColumnA = new ColumnTransform();
  incrementColumnA.setFunction_name("increment");
  
incrementColumnA.setInput_columns(Arrays.asList(ByteBufferUtil.bytes("a")));
  incrementColumnA.setOutput_column(ByteBufferUtil.bytes("a"));
{code}

This class also supports 

{code}
concatAandB.setPersist(false);
{code}
Which is used to chain the results of transforms together without saying them 
to the final result set.

UDF for increment and udf for conat is provided inside this patch.

If you check out the FuncTest you can see us implementing something similar to

{code}
update standard1 set a = increment(increment(a)) , set yy = 
concat(concat(a,b),a) where rowkey = "row5"
{code}

This can be done because the ColumnTranforms are executed in order and can use 
the results from other transforms.
{code}
  TransformRequest request = new TransformRequest();
  request.setColumn_family("Standard1");  
  request.setKey(ByteBufferUtil.bytes(rowkey));
  request.setPredicate(new SlicePredicate());
  
request.getPredicate().setColumn_names(Arrays.asList(ByteBufferUtil.bytes("a"),ByteBufferUtil.bytes("b")));
  
  ColumnTransform incrementColumnA = new ColumnTransform();
  incrementColumnA.setFunction_name("increment");
  
incrementColumnA.setInput_columns(Arrays.asList(ByteBufferUtil.bytes("a")));
  incrementColumnA.setOutput_column(ByteBufferUtil.bytes("a"));
  ...
  request.setColumn_transform(Arrays.asList(incrementColumnA, 
incrementColumnA, concatAandB, concatZZandA));
{code}

> Transform operation
> ---
>
> Key: CASSANDRA-6870
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6870
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Edward Capriolo
>Assignee: Edward Capriolo
>Priority: Minor
>
> Compare and swap uses paxos to only update a value only if some criteria is 
> met. If I understand correctly we should be able to use this feature to 
> provide a wider variety of server side operations. 
> For example inside a paxos transaction performing a slice and then using a 
> function to manipulate the slice. You could accomplish features like append 
> and increment this way without user needing to know the current value.
> I took a stab at doing this. I **think** I did it correctly. Comments welcome.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.

2014-03-19 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov updated CASSANDRA-6821:
--

Attachment: trunk-6821_v2.patch

Attaching v2 with the System.out's removed, thanks Nick!

> Cassandra can't delete snapshots for keyspaces that no longer exist.
> 
>
> Key: CASSANDRA-6821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6821
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Nick Bailey
>Assignee: Lyuben Todorov
>  Labels: nodetool
> Fix For: 2.1 beta2
>
> Attachments: trunk-6821_v2.patch
>
>
> If you drop a keyspace  you can no longer clean up the snapshots for that 
> keyspace without resorting to the command line. It would be nice to be able 
> clean up those via jmx, especially for external tools.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.

2014-03-19 Thread Lyuben Todorov (JIRA)

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

Lyuben Todorov updated CASSANDRA-6821:
--

Attachment: (was: trunk-6821.patch)

> Cassandra can't delete snapshots for keyspaces that no longer exist.
> 
>
> Key: CASSANDRA-6821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6821
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Nick Bailey
>Assignee: Lyuben Todorov
>  Labels: nodetool
> Fix For: 2.1 beta2
>
>
> If you drop a keyspace  you can no longer clean up the snapshots for that 
> keyspace without resorting to the command line. It would be nice to be able 
> clean up those via jmx, especially for external tools.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6879) ConcurrentModificationException while doing range slice query.

2014-03-19 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-6879:
---

Attachment: cassandra-2.0-6879.patch

The trivial patch to address ConcurrentModificatioException

> ConcurrentModificationException while doing range slice query.
> --
>
> Key: CASSANDRA-6879
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6879
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
> Environment: 2.0.4
>Reporter: Shao-Chuan Wang
>Assignee: Mikhail Stepura
> Fix For: 2.0.7
>
> Attachments: cassandra-2.0-6879.patch
>
>
> The paging read request (either from thrift or native) would sporadically 
> fail due to a race condition between read repair and requesting thread 
> waiting for read repair results list. The READ_REPAIR is queued in 
> ReadCallback.maybeResolveForRepair(), and it does not seem to have guarantee 
> that its resolve() method (which internally create 
> RangeSliceResponseResolver.Reducer and doing repairResults.addAll inside 
> RangeSliceResponseResolver.Reducer) would be invoked before the requesting 
> thread starts waiting on resolver.repairResults. So, there is a small window 
> that the list is partially populated, while requesting thread starts waiting 
> on repairResults. I believe for the most of the time, the requesting thread 
> is either wait for the entire repair results or not waiting for repair 
> results at all. The original intent here seems to be waiting for repair 
> results always (if the repair is triggered by repair chance).
> {code}
> ERROR [Native-Transport-Requests:70827] 2014-03-18 05:00:12,774 
> ErrorMessage.java (line 222) Unexpected exception during request
> java.util.ConcurrentModificationException
> at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
> at java.util.ArrayList$Itr.next(ArrayList.java:831)
> at 
> org.apache.cassandra.utils.FBUtilities.waitOnFutures(FBUtilities.java:423)
> at 
> org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:1583)
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:188)
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:163)
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:58)
> at 
> org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:188)
> at 
> org.apache.cassandra.cql3.QueryProcessor.processPrepared(QueryProcessor.java:358)
> at 
> org.apache.cassandra.transport.messages.ExecuteMessage.execute(ExecuteMessage.java:131)
> at 
> org.apache.cassandra.transport.Message$Dispatcher.messageReceived(Message.java:304)
> at 
> org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
> at 
> org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
> at 
> org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
> at 
> org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43)
> at 
> org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> {code}
> {code}
> ERROR [Thrift:1] 2014-03-18 07:18:02,434 CustomTThreadPoolServer.java (line 
> 212) Error occurred during processing of message.
> java.util.ConcurrentModificationException
> at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859)
> at java.util.ArrayList$Itr.next(ArrayList.java:831)
> at 
> org.apache.cassandra.utils.FBUtilities.waitOnFutures(FBUtilities.java:423)
> at 
> org.apache.cassandra.service.StorageProxy.getRangeSlice(StorageProxy.java:1583)
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.queryNextPage(RangeSliceQueryPager.java:85)
> at 
> org.apache.cassandra.service.pager.AbstractQueryPager.fetchPage(AbstractQueryPager.java:71)
> at 
> org.apache.cassandra.service.pager.RangeSliceQueryPager.fetchPage(RangeSliceQueryPager.java:36)
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.pageCountQuery(SelectStatement.java:202)
> at 
> org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:169)
> at 
> org.apache.cassandra.cql3.statements.SelectSta

[jira] [Commented] (CASSANDRA-6818) SSTable references not released if stream session fails before it starts

2014-03-19 Thread Richard Low (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941087#comment-13941087
 ] 

Richard Low commented on CASSANDRA-6818:


I reproduced the original problem in the same way, and the patch fixed it.

But I'm concerned about moving the reference release to 
StreamTransferTask.complete(). This is only called when the receiver sends a 
completed message, which may never occur. In this case I think the streaming 
session hangs, so we would never release the reference. However, the original 
behavior was also wrong because a retry could be requested after a successful 
transfer. The reference will have been released so the file may have been 
removed.

We could add a timeout to catch the case when the completed message gets lost. 
If the node requests a retry after this time, there may be no reference so the 
stream would fail. That's probably OK in this rare case though.

> SSTable references not released if stream session fails before it starts
> 
>
> Key: CASSANDRA-6818
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6818
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Richard Low
>Assignee: Yuki Morishita
> Fix For: 1.2.16, 2.0.7, 2.1 beta2
>
> Attachments: 6818-1.2.txt, 6818-2.0.txt
>
>
> I observed a large number of 'orphan' SSTables - SSTables that are in the 
> data directory but not loaded by Cassandra - on a 1.1.12 node that had a 
> large stream fail before it started. These orphan files are particularly 
> dangerous because if the node is restarted and picks up these SSTables it 
> could bring data back to life if tombstones have been GCed. To confirm the 
> SSTables are orphan, I created a snapshot and it didn't contain these files. 
> I can see in the logs that they have been compacted so should have been 
> deleted.
> The log entries for the stream are:
> {{INFO [StreamStage:1] 2014-02-21 19:41:48,742 StreamOut.java (line 115) 
> Beginning transfer to /10.0.0.1}}
> {{INFO [StreamStage:1] 2014-02-21 19:41:48,743 StreamOut.java (line 96) 
> Flushing memtables for [CFS(Keyspace='ks', ColumnFamily='cf1'), 
> CFS(Keyspace='ks', ColumnFamily='cf2')]...}}
> {{ERROR [GossipTasks:1] 2014-02-21 19:41:49,239 AbstractStreamSession.java 
> (line 113) Stream failed because /10.0.0.1 died or was restarted/removed 
> (streams may still be active in background, but further streams won't be 
> started)}}
> {{INFO [StreamStage:1] 2014-02-21 19:41:51,783 StreamOut.java (line 161) 
> Stream context metadata [...] 2267 sstables.}}
> {{INFO [StreamStage:1] 2014-02-21 19:41:51,789 StreamOutSession.java (line 
> 182) Streaming to /10.0.0.1}}
> {{INFO [Streaming to /10.0.0.1:1] 2014-02-21 19:42:02,218 FileStreamTask.java 
> (line 99) Found no stream out session at end of file stream task - this is 
> expected if the receiver went down}}
> After digging in the code, here's what I think the issue is:
> 1. StreamOutSession.transferRanges() creates a streaming session, which is 
> registered with the failure detector in AbstractStreamSession's constructor.
> 2. Memtables are flushed, potentially taking a long time.
> 3. The remote node fails, convict() is called and the StreamOutSession is 
> closed. However, at this time StreamOutSession.files is empty because it's 
> still waiting for the memtables to flush.
> 4. Memtables finish flusing, references are obtained to SSTables to be 
> streamed and the PendingFiles are added to StreamOutSession.files.
> 5. The first stream fails but the StreamOutSession isn't found so is never 
> closed and the references are never released.
> This code is more or less the same on 1.2 so I would expect it to reproduce 
> there. I looked at 2.0 and can't even see where SSTable references are 
> released when the stream fails.
> Some possible fixes for 1.1/1.2:
> 1. Don't register with the failure detector until after the PendingFiles are 
> set up. I think this is the behaviour in 2.0 but I don't know if it was done 
> like this to avoid this issue.
> 2. Detect the above case in (e.g.) StreamOutSession.begin() by noticing the 
> session has been closed with care to avoid double frees.
> 3. Add some synchronization so closeInternal() doesn't race with setting up 
> the session.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6666) Avoid accumulating tombstones after partial hint replay

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941048#comment-13941048
 ] 

Jonathan Ellis commented on CASSANDRA-:
---

So, most of it got compacted away, but the rest did not and even survived 
another compaction.

Can you attach the surviving sstable?  If you're worried about exposing 
sensitive data I can arrange a private location.

> Avoid accumulating tombstones after partial hint replay
> ---
>
> Key: CASSANDRA-
> URL: https://issues.apache.org/jira/browse/CASSANDRA-
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Jonathan Ellis
>Priority: Minor
>  Labels: hintedhandoff
> Fix For: 1.2.16, 2.0.6
>
> Attachments: .txt, cassandra_system.log.debug.gz
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-4050) Unable to remove snapshot files on Windows while original sstables are live

2014-03-19 Thread Joshua McKenzie (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13941010#comment-13941010
 ] 

Joshua McKenzie commented on CASSANDRA-4050:


Fair enough.  RAR is only the root of all our file i/o, after all.  ;)  We 
should probably pursue either making snapshot deletion a quiet failure rather 
than deleteWithConfirm or disabling snapshot-based repair on Windows in 2.0.x.  
I'm inclined to go with the latter since I'd rather not disrupt the *nix 
ecosystem based on Windows file-system eccentricities in our current 
stabilization-phase.

> Unable to remove snapshot files on Windows while original sstables are live
> ---
>
> Key: CASSANDRA-4050
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4050
> Project: Cassandra
>  Issue Type: Bug
> Environment: Windows 7
>Reporter: Jim Newsham
>Assignee: Joshua McKenzie
>Priority: Minor
>
> I'm using Cassandra 1.0.8, on Windows 7.  When I take a snapshot of the 
> database, I find that I am unable to delete the snapshot directory (i.e., dir 
> named "{datadir}\{keyspacename}\snapshots\{snapshottag}") while Cassandra is 
> running:  "The action can't be completed because the folder or a file in it 
> is open in another program.  Close the folder or file and try again" [in 
> Windows Explorer].  If I terminate Cassandra, then I can delete the directory 
> with no problem.
> I expect to be able to move or delete the snapshotted files while Cassandra 
> is running, as this should not affect the runtime operation of Cassandra.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6689) Partially Off Heap Memtables

2014-03-19 Thread Pavel Yaskevich (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940983#comment-13940983
 ] 

Pavel Yaskevich commented on CASSANDRA-6689:


[~benedict] So what is the branch to look at for #1? 
https://github.com/belliottsmith/cassandra/tree/iss-6689-1 still has DataGroup 
inside, which should have been removed after Marcus's review, shouldn't it?

> Partially Off Heap Memtables
> 
>
> Key: CASSANDRA-6689
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6689
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
>  Labels: performance
> Fix For: 2.1 beta2
>
> Attachments: CASSANDRA-6689-small-changes.patch
>
>
> Move the contents of ByteBuffers off-heap for records written to a memtable.
> (See comments for details)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-4050) Unable to remove snapshot files on Windows while original sstables are live

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940981#comment-13940981
 ] 

Jonathan Ellis commented on CASSANDRA-4050:
---

Rewriting to nio2 is the same scope as removing mmap.  Probably riskier 
actually.  So 3.0 for both.

> Unable to remove snapshot files on Windows while original sstables are live
> ---
>
> Key: CASSANDRA-4050
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4050
> Project: Cassandra
>  Issue Type: Bug
> Environment: Windows 7
>Reporter: Jim Newsham
>Assignee: Joshua McKenzie
>Priority: Minor
>
> I'm using Cassandra 1.0.8, on Windows 7.  When I take a snapshot of the 
> database, I find that I am unable to delete the snapshot directory (i.e., dir 
> named "{datadir}\{keyspacename}\snapshots\{snapshottag}") while Cassandra is 
> running:  "The action can't be completed because the folder or a file in it 
> is open in another program.  Close the folder or file and try again" [in 
> Windows Explorer].  If I terminate Cassandra, then I can delete the directory 
> with no problem.
> I expect to be able to move or delete the snapshotted files while Cassandra 
> is running, as this should not affect the runtime operation of Cassandra.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-6890) Remove mmap'ed i/o from read path

2014-03-19 Thread Joshua McKenzie (JIRA)
Joshua McKenzie created CASSANDRA-6890:
--

 Summary: Remove mmap'ed i/o from read path
 Key: CASSANDRA-6890
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6890
 Project: Cassandra
  Issue Type: Improvement
Reporter: Joshua McKenzie
Assignee: Joshua McKenzie
Priority: Minor
 Fix For: 3.0


Since we actively unmap unreferenced SSTR's and also copy data out of those 
readers on the read path, the current memory mapped i/o is a lot of complexity 
for very little payoff.  Clean out the mmapp'ed i/o on the read path.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-4050) Unable to remove snapshot files on Windows while original sstables are live

2014-03-19 Thread Joshua McKenzie (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-4050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940941#comment-13940941
 ] 

Joshua McKenzie commented on CASSANDRA-4050:


Makes sense - it would require pushing some things pretty far back in the stack 
to hold a ref on a memory mapped segment on the read path.

If we're thinking 3.X release for removing mmap I can throw a workaround on 
this ticket to always return a BufferedPoolingSegmentedFile from 
SegmentedFile's getBuilder if the platform is Windows.  That + nio.2 should get 
us working snapshots and less weird file handle behaviors on Windows in 2.0.X 
without having to wait on clean-up of the old mmap code.

> Unable to remove snapshot files on Windows while original sstables are live
> ---
>
> Key: CASSANDRA-4050
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4050
> Project: Cassandra
>  Issue Type: Bug
> Environment: Windows 7
>Reporter: Jim Newsham
>Assignee: Joshua McKenzie
>Priority: Minor
>
> I'm using Cassandra 1.0.8, on Windows 7.  When I take a snapshot of the 
> database, I find that I am unable to delete the snapshot directory (i.e., dir 
> named "{datadir}\{keyspacename}\snapshots\{snapshottag}") while Cassandra is 
> running:  "The action can't be completed because the folder or a file in it 
> is open in another program.  Close the folder or file and try again" [in 
> Windows Explorer].  If I terminate Cassandra, then I can delete the directory 
> with no problem.
> I expect to be able to move or delete the snapshotted files while Cassandra 
> is running, as this should not affect the runtime operation of Cassandra.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6889:
--

Issue Type: New Feature  (was: Improvement)

> Add the ability to use a url as the input to the --file parameter of cqlsh
> --
>
> Key: CASSANDRA-6889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Darla Baker
>Priority: Minor
>  Labels: lhf
>
> Customer request to use a gist or similar url pointing to a cqlsh script 
> rather than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-6889:
--

Component/s: Tools

> Add the ability to use a url as the input to the --file parameter of cqlsh
> --
>
> Key: CASSANDRA-6889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Tools
>Reporter: Darla Baker
>Priority: Minor
>  Labels: lhf
>
> Customer request to use a gist or similar url pointing to a cqlsh script 
> rather than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Mikhail Stepura (JIRA)

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

Mikhail Stepura updated CASSANDRA-6889:
---

Labels: lhf  (was: )

> Add the ability to use a url as the input to the --file parameter of cqlsh
> --
>
> Key: CASSANDRA-6889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Darla Baker
>Priority: Minor
>  Labels: lhf
>
> Customer request to use a gist or similar url pointing to a cqlsh script 
> rather than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Mikhail Stepura (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940921#comment-13940921
 ] 

Mikhail Stepura commented on CASSANDRA-6889:


It looks doable by replacing current {{open(fname, 'r')}} with 
{{urllib.urlopen()}}

> Add the ability to use a url as the input to the --file parameter of cqlsh
> --
>
> Key: CASSANDRA-6889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Darla Baker
>Priority: Minor
>  Labels: lhf
>
> Customer request to use a gist or similar url pointing to a cqlsh script 
> rather than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6876) Improve PerRowSecondaryIndex performance by removing O(N) complexity when computing indexes for a column

2014-03-19 Thread Sergio Bossa (JIRA)

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

Sergio Bossa updated CASSANDRA-6876:


Attachment: CASSANDRA-6876-3.patch
CASSANDRA-6876-3.2.1.patch

Attached patches.

> Improve PerRowSecondaryIndex performance by removing O(N) complexity when 
> computing indexes for a column
> 
>
> Key: CASSANDRA-6876
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6876
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Sergio Bossa
>Assignee: Sergio Bossa
>Priority: Minor
> Fix For: 2.0.7, 2.1 beta2
>
> Attachments: CASSANDRA-6876-2.patch, CASSANDRA-6876-3.2.1.patch, 
> CASSANDRA-6876-3.patch, CASSANDRA-6876.2.1.patch, CASSANDRA-6876.patch
>
>
> Currently, given SecondaryIndexManager tracks all per-column and per-row 
> secondary indexes in a by-column map, when computing indexes for a given 
> column it has to scan all indexes for *all* columns, meaning that it will 
> scan the *same* per-row index N times, where N is the number of columns it is 
> associated with, raising the complexity of what could be an O(1) operation to 
> O(N).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Reopened] (CASSANDRA-6876) Improve PerRowSecondaryIndex performance by removing O(N) complexity when computing indexes for a column

2014-03-19 Thread Sergio Bossa (JIRA)

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

Sergio Bossa reopened CASSANDRA-6876:
-


Reopened, as removal of a field causes removal of the related secondary index 
from the "all indexes" map, even if such index is still used.

> Improve PerRowSecondaryIndex performance by removing O(N) complexity when 
> computing indexes for a column
> 
>
> Key: CASSANDRA-6876
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6876
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Sergio Bossa
>Assignee: Sergio Bossa
>Priority: Minor
> Fix For: 2.0.7, 2.1 beta2
>
> Attachments: CASSANDRA-6876-2.patch, CASSANDRA-6876.2.1.patch, 
> CASSANDRA-6876.patch
>
>
> Currently, given SecondaryIndexManager tracks all per-column and per-row 
> secondary indexes in a by-column map, when computing indexes for a given 
> column it has to scan all indexes for *all* columns, meaning that it will 
> scan the *same* per-row index N times, where N is the number of columns it is 
> associated with, raising the complexity of what could be an O(1) operation to 
> O(N).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Brandon Williams (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940877#comment-13940877
 ] 

Brandon Williams commented on CASSANDRA-6889:
-

Can't you just pipe wget or curl to it?

> Add the ability to use a url as the input to the --file parameter of cqlsh
> --
>
> Key: CASSANDRA-6889
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Darla Baker
>Priority: Minor
>
> Customer request to use a gist or similar url pointing to a cqlsh script 
> rather than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6473) Add CQL function to generate random UUID

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940645#comment-13940645
 ] 

Jonathan Ellis commented on CASSANDRA-6473:
---

Added a brief mention to CQL.textile and committed; thanks!

> Add CQL function to generate random UUID
> 
>
> Key: CASSANDRA-6473
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6473
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
>Reporter: Mikhail Mazursky
>Assignee: Carl Yeksigian
>Priority: Minor
>  Labels: lhf
> Fix For: 2.0.7
>
>
> There is timeuuid() function but no function to generate a random (type 4) 
> UUID . For example it can be usefull when client code at the moment of 
> insertion of data do not care for exact value of UUID.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[13/16] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread jbellis
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 6e366e3b260615df05eea8bc5533f719df8343fe
Parents: 350657c dd276eb
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:59 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:59 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e366e3b/interface/cassandra.thrift
--



[jira] [Created] (CASSANDRA-6889) Add the ability to use a url as the input to the --file parameter of cqlsh

2014-03-19 Thread Darla Baker (JIRA)
Darla Baker created CASSANDRA-6889:
--

 Summary: Add the ability to use a url as the input to the --file 
parameter of cqlsh
 Key: CASSANDRA-6889
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6889
 Project: Cassandra
  Issue Type: Improvement
Reporter: Darla Baker
Priority: Minor


Customer request to use a gist or similar url pointing to a cqlsh script rather 
than a local file.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.

2014-03-19 Thread Nick Bailey (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940811#comment-13940811
 ] 

Nick Bailey commented on CASSANDRA-6821:


besides that it looks good.

> Cassandra can't delete snapshots for keyspaces that no longer exist.
> 
>
> Key: CASSANDRA-6821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6821
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Nick Bailey
>Assignee: Lyuben Todorov
>  Labels: nodetool
> Fix For: 2.1 beta2
>
> Attachments: trunk-6821.patch
>
>
> If you drop a keyspace  you can no longer clean up the snapshots for that 
> keyspace without resorting to the command line. It would be nice to be able 
> clean up those via jmx, especially for external tools.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6821) Cassandra can't delete snapshots for keyspaces that no longer exist.

2014-03-19 Thread Nick Bailey (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940778#comment-13940778
 ] 

Nick Bailey commented on CASSANDRA-6821:


It seems like you left some system.out debugging in the patch.

> Cassandra can't delete snapshots for keyspaces that no longer exist.
> 
>
> Key: CASSANDRA-6821
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6821
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Nick Bailey
>Assignee: Lyuben Todorov
>  Labels: nodetool
> Fix For: 2.1 beta2
>
> Attachments: trunk-6821.patch
>
>
> If you drop a keyspace  you can no longer clean up the snapshots for that 
> keyspace without resorting to the command line. It would be nice to be able 
> clean up those via jmx, especially for external tools.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6666) Avoid accumulating tombstones after partial hint replay

2014-03-19 Thread Anne Sullivan (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940757#comment-13940757
 ] 

Anne Sullivan commented on CASSANDRA-:
--

Attached debug logs (cassandra_system.log.debug.gz)
- two node cluster, RF=2 (node A / node B)
- bring node B down for 30 minutes, back online @ 2014-03-19 10:15:00
- hinted handoff starts @  2014-03-19 10:18:00
- hinted handoff finishes successfully @ 2014-03-19 10:59:04:

INFO [HintedHandoff:1] 2014-03-19 10:59:04,434 HintedHandOffManager.java (line 
378) Finished hinted handoff of 1903040 rows to endpoint /###.###.###.###

- @ 2014-03-19 10:59:16,428 user defined compaction compacts down to one 
sstable (expected result = no sstables / empty set):

INFO [CompactionExecutor:3421] 2014-03-19 10:59:16,428 CompactionTask.java 
(line 275) Compacted 4 sstables to 
[/path/to/db/data/system/hints/system-hints-jb-49,].  172,043,512 bytes to 
6,365,114 (~3% of original) in 11,991ms = 0.506233MB/s.  4 total partitions 
merged to 1.  Partition merge counts were {4:1, }

- @ 2014-03-19 11:08:08 another hinted handoff starts (presumably because the 
hints table isn't empty, and it's checking every 10 minutes) and reports 0 live 
cells:

WARN [HintedHandoff:2] 2014-03-19 11:08:08,639 SliceQueryFilter.java (line 210) 
Read 0 live and 75750 tombstoned cells in system.hints (see 
tombstone_warn_threshold)
 INFO [HintedHandoff:2] 2014-03-19 11:08:08,639 HintedHandOffManager.java (line 
378) Finished hinted handoff of 0 rows to endpoint /###.###.###.###

- user defined compaction again leaves behind a single sstable:

 INFO [CompactionExecutor:3438] 2014-03-19 11:08:08,963 CompactionTask.java 
(line 275) Compacted 1 sstables to 
[/path/to/db/data/system/hints/system-hints-jb-50,].  6,365,114 bytes to 
6,365,114 (~100% of original) in 322ms = 18.851695MB/s.  1 total partitions 
merged to 1.  Partition merge counts were {1:1, }


Partial output from running "cqlsh> describe keyspace system", to confirm that 
gc_grace_seconds=0, so expecting tombstones to be removed on compaction:

CREATE TABLE hints (
  target_id uuid,
  hint_id timeuuid,
  message_version int,
  mutation blob,
  PRIMARY KEY (target_id, hint_id, message_version)
) WITH COMPACT STORAGE AND
  bloom_filter_fp_chance=0.01 AND
  caching='KEYS_ONLY' AND
  comment='hints awaiting delivery' AND
  dclocal_read_repair_chance=0.00 AND
  gc_grace_seconds=0 AND
  index_interval=128 AND
  read_repair_chance=0.00 AND
  replicate_on_write='true' AND
  populate_io_cache_on_flush='false' AND
  default_time_to_live=0 AND
  speculative_retry='99.0PERCENTILE' AND
  memtable_flush_period_in_ms=360 AND
  compaction={'enabled': 'false', 'class': 'SizeTieredCompactionStrategy'} AND
  compression={'sstable_compression': 'LZ4Compressor'};





> Avoid accumulating tombstones after partial hint replay
> ---
>
> Key: CASSANDRA-
> URL: https://issues.apache.org/jira/browse/CASSANDRA-
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Jonathan Ellis
>Priority: Minor
>  Labels: hintedhandoff
> Fix For: 1.2.16, 2.0.6
>
> Attachments: .txt, cassandra_system.log.debug.gz
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6854) TServerArgs have unsed reference

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6854?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940653#comment-13940653
 ] 

Jonathan Ellis commented on CASSANDRA-6854:
---

LGTM, committed

> TServerArgs have unsed reference
> 
>
> Key: CASSANDRA-6854
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6854
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Edward Capriolo
>Assignee: Edward Capriolo
>Priority: Minor
> Fix For: 2.1 beta2
>
> Attachments: args_reference_unused.diff, cassandra-6870.1.patch
>
>
> The TServer.Args class has a member far CassandraServer ref. This reference 
> is unneeded because the Factory works off Protocol



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[15/16] git commit: Merge remote-tracking branch 'origin/trunk' into trunk

2014-03-19 Thread jbellis
Merge remote-tracking branch 'origin/trunk' into trunk


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

Branch: refs/heads/trunk
Commit: e13b11d46d7ae836a039bff5fb8cdb650d9dcb94
Parents: f0227a6 9f05783
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:12:06 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:12:06 2014 -0500

--
 CHANGES.txt |   5 +-
 doc/cql3/CQL.textile|  19 +-
 .../apache/cassandra/cache/AutoSavingCache.java |   3 +-
 .../cache/SerializingCacheProvider.java |   4 +-
 .../apache/cassandra/db/BatchlogManager.java|  12 +-
 .../cassandra/db/ColumnFamilySerializer.java|   7 +-
 .../org/apache/cassandra/db/ColumnIndex.java|   6 +-
 .../apache/cassandra/db/ColumnSerializer.java   |   4 +-
 .../apache/cassandra/db/CounterMutation.java|   3 +-
 .../org/apache/cassandra/db/DeletionInfo.java   |   4 +-
 .../org/apache/cassandra/db/DeletionTime.java   |   4 +-
 src/java/org/apache/cassandra/db/Mutation.java  |   4 +-
 .../org/apache/cassandra/db/OnDiskAtom.java |   3 +-
 .../apache/cassandra/db/PagedRangeCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceReply.java|   4 +-
 .../org/apache/cassandra/db/RangeTombstone.java |   5 +-
 .../apache/cassandra/db/RangeTombstoneList.java |   4 +-
 .../org/apache/cassandra/db/ReadCommand.java|   4 +-
 .../org/apache/cassandra/db/ReadResponse.java   |   5 +-
 src/java/org/apache/cassandra/db/Row.java   |   3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java  |   4 +-
 .../org/apache/cassandra/db/RowPosition.java|   4 +-
 .../cassandra/db/SliceByNamesReadCommand.java   |   3 +-
 .../cassandra/db/SliceFromReadCommand.java  |   4 +-
 .../apache/cassandra/db/SnapshotCommand.java|   4 +-
 .../apache/cassandra/db/TruncateResponse.java   |   4 +-
 .../org/apache/cassandra/db/Truncation.java |   4 +-
 .../org/apache/cassandra/db/WriteResponse.java  |   4 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../cassandra/db/commitlog/ReplayPosition.java  |   4 +-
 .../db/compaction/AbstractCompactedRow.java |   3 +-
 .../db/compaction/LazilyCompactedRow.java   |   3 +-
 .../cassandra/db/composites/AbstractCType.java  |   4 +-
 .../db/composites/AbstractCellNameType.java |   4 +-
 .../apache/cassandra/db/filter/ColumnSlice.java |   4 +-
 .../cassandra/db/filter/IDiskAtomFilter.java|   5 +-
 .../cassandra/db/filter/NamesQueryFilter.java   |   4 +-
 .../cassandra/db/filter/SliceQueryFilter.java   |   4 +-
 .../apache/cassandra/dht/AbstractBounds.java|   3 +-
 .../org/apache/cassandra/dht/BootStrapper.java  |   4 +-
 src/java/org/apache/cassandra/dht/Token.java|   4 +-
 .../org/apache/cassandra/gms/EchoMessage.java   |   4 +-
 .../org/apache/cassandra/gms/EndpointState.java |   3 +-
 .../org/apache/cassandra/gms/GossipDigest.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestAck.java   |   4 +-
 .../apache/cassandra/gms/GossipDigestAck2.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestSyn.java   |   5 +-
 .../apache/cassandra/gms/HeartBeatState.java|   3 +-
 .../apache/cassandra/gms/VersionedValue.java|   3 +-
 .../apache/cassandra/io/ISSTableSerializer.java |   5 +-
 .../org/apache/cassandra/io/ISerializer.java|   6 +-
 .../cassandra/io/IVersionedSerializer.java  |   6 +-
 .../io/compress/CompressionMetadata.java|   3 +-
 .../io/compress/CompressionParameters.java  |   4 +-
 .../cassandra/io/sstable/IndexHelper.java   |   3 +-
 .../cassandra/io/sstable/IndexSummary.java  |   7 +-
 .../cassandra/io/sstable/SSTableReader.java |   4 +-
 .../cassandra/io/sstable/SSTableWriter.java |   4 +-
 .../io/sstable/metadata/CompactionMetadata.java |   4 +-
 .../metadata/IMetadataComponentSerializer.java  |   5 +-
 .../sstable/metadata/IMetadataSerializer.java   |   6 +-
 .../metadata/LegacyMetadataSerializer.java  |   3 +-
 .../io/sstable/metadata/MetadataSerializer.java |   6 +-
 .../io/sstable/metadata/StatsMetadata.java  |   4 +-
 .../io/sstable/metadata/ValidationMetadata.java |   4 +-
 .../cassandra/io/util/AbstractDataOutput.java   |  43 +-
 .../io/util/ByteBufferOutputStream.java |  46 --
 .../io/util/ChecksummedOutputStream.java|  56 ---
 .../cassandra/io/util/DataOutputBuffer.java |  23 +-
 .../cassandra/io/util/DataOutputByteBuffer.java |  59 +++
 .../cassandra/io/util/DataOutputPlus.java   |  32 ++
 .../io/util/DataOutputStreamAndChannel.java |  55 +++
 .../cassandra/io/util/DataOutputStreamPlus.java |  57 +++
 .../io/util/FastByteArrayOutputStream.java  |  11 +
 .../org/

[07/16] git commit: comment CqlRow for #6807

2014-03-19 Thread jbellis
comment CqlRow for #6807


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

Branch: refs/heads/cassandra-1.2
Commit: 73a3eeb6f679adeb6982229ad730437177a0430d
Parents: 7e87001
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:10:52 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:10:52 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift
--
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 1fc7201..4eda4f8 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -496,7 +496,14 @@ enum CqlResultType {
 INT = 3
 }
 
-/** Row returned from a CQL query */
+/** 
+  Row returned from a CQL query.
+
+  This struct is used for both CQL2 and CQL3 queries.  For CQL2, the partition 
key
+  is special-cased and is always returned.  For CQL3, it is not special cased;
+  it will be included in the columns list if it was included in the SELECT and
+  the key field is always null.
+*/
 struct CqlRow {
 1: required binary key,
 2: required list columns



[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells

2014-03-19 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940643#comment-13940643
 ] 

Aleksey Yeschenko commented on CASSANDRA-6506:
--

bq. I'm also uncomfortable with originalType() (and enableCounters() to some 
extend). It feels pretty error prone as you need to think hard about whether 
you you call that first before calling some other method or not. It feels to me 
that again, we shouldn't need anything special with CellNameType for counters: 
thrift/CQL should convert things to/from the "internal" format, but as far as 
CellName/CellNameType are concerned, we shouldn't need anything special casing 
at all (I do understand that we probably need to start storing whether the 
table is dense or not in the system table for thrift to convert things 
properly, but it's high time we do that anyway).

Mostly, they are there indeed to be able to distinguish between the original 
comparator being CompositeType(UTF8Type) and just UTF8Type, for example. With 
CASSANDRA-6717 this should become a non-issue, but that's 3.0, and we can 
always get rid of originalType() and enableCounters() later.

bq. Also, tbh, I'm starting to wonder if 2.1 is such a reasonable target for 
this at this point. Especially given we can't get rid of CounterCell right now 
(I think we should seriously consider getting rid of local/remote shard for 
3.0) this feels like a lot of changes to push at the last minute, and it 
doesn't felt like it brings so much to the table that it can't wait 3.0. 
Especially since in 3.0 it might be achievable to get rid of CounterCell once 
and for all (and we wouldn't have to care about CQL2).

Maybe. I wanted this in 2.1 to sweeten the upgrade to new counters by improving 
performance where we can (see the last set two sets of graphs in 
CASSANDRA-6553, where 6556 writes are a lot smoother than writes w/out them). 
That and getting rid of CASSANDRA-6405 for good. Current reconcile code should 
die, really.

bq. I think we should seriously consider getting rid of local/remote shard for 
3.0

We should, but I seriously don't see how this could be accomplished - hence not 
holding my breath for implementing counters as maps, for example.

bq. I believe disallowing the drop of columns for CQL3 counter tables is a 
regression. Not sure why the patch does it tbh.

That's because using the timestamp field for the logical clock breaks the 
re-adding of previously dropped counter cells.

> counters++ split counter context shards into separate cells
> ---
>
> Key: CASSANDRA-6506
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6506
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 2.1 beta2
>
>
> This change is related to, but somewhat orthogonal to CASSANDRA-6504.
> Currently all the shard tuples for a given counter cell are packed, in sorted 
> order, in one binary blob. Thus reconciling N counter cells requires 
> allocating a new byte buffer capable of holding the union of the two 
> context's shards N-1 times.
> For writes, in post CASSANDRA-6504 world, it also means reading more data 
> than we have to (the complete context, when all we need is the local node's 
> global shard).
> Splitting the context into separate cells, one cell per shard, will help to 
> improve this. We did a similar thing with super columns for CASSANDRA-3237. 
> Incidentally, doing this split is now possible thanks to CASSANDRA-3237.
> Doing this would also simplify counter reconciliation logic. Getting rid of 
> old contexts altogether can be done trivially with upgradesstables.
> In fact, we should be able to put the logical clock into the cell's 
> timestamp, and use regular Cell-s and regular Cell reconcile() logic for the 
> shards, especially once we get rid of the local/remote shards some time in 
> the future (until then we still have to differentiate between 
> global/remote/local shards and their priority rules).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6666) Avoid accumulating tombstones after partial hint replay

2014-03-19 Thread Anne Sullivan (JIRA)

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

Anne Sullivan updated CASSANDRA-:
-

Attachment: cassandra_system.log.debug.gz

> Avoid accumulating tombstones after partial hint replay
> ---
>
> Key: CASSANDRA-
> URL: https://issues.apache.org/jira/browse/CASSANDRA-
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Jonathan Ellis
>Priority: Minor
>  Labels: hintedhandoff
> Fix For: 1.2.16, 2.0.6
>
> Attachments: .txt, cassandra_system.log.debug.gz
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Assigned] (CASSANDRA-6888) Store whether a counter sstable still use some local/remote shards in the sstable metadata

2014-03-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko reassigned CASSANDRA-6888:


Assignee: Aleksey Yeschenko

> Store whether a counter sstable still use some local/remote shards in the 
> sstable metadata
> --
>
> Key: CASSANDRA-6888
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6888
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Aleksey Yeschenko
> Fix For: 2.1
>
>
> CASSANDRA-6504 has made so we don't distinguish different type of shard in 
> counters. Yet, even though we don't generate those local/remote type of 
> shards, those won't disappear just by running upgradesstable, they need to be 
> compacted away (and even then, they really only disappear if there has been a 
> new update on the counter post-6504).
> But we want to get rid of those ultimately, since they make things like 
> CASSANDRA-6506 less optimal. Now, even though the final step of that remain 
> to be discussed, the first step is probably to keep track of whether such 
> shard still exist in the system or not. That part is simple, we can just 
> store a boolean in the SSTableMetadata to say whether or not said sstable 
> still has at least one Cell using such old shard type. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells

2014-03-19 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940736#comment-13940736
 ] 

Sylvain Lebresne commented on CASSANDRA-6506:
-

bq. With CASSANDRA-6717 this should become a non-issue, but that's 3.0

Well, that's one more reason why rushing this in 2.1 is possibly not the best 
option. But truly, I'm not sure we absolutely need CASSANDRA-6717 for this if 
we really don't want to. It's simple enough to have a boolean flag to 
distinguish between dense and non-dense in 2.1 if we really want to. Even if 
that flag get replaced by something else in CASSANDRA-6717, that's still feel 
cleaner to me that having specific CellNameType implementation, originalType(), 
etc... 

bq. (see the last set two sets of graphs in CASSANDRA-6553, where 6556 writes 
are a lot smoother than writes w/out them). That and getting rid of 
CASSANDRA-6405 for good.

Fair enough, I'm not saying the end goal is wrong. But tbh, it feels like the 
patch currently add more complexity than it removes, and I'm really bugged 
about having special cellName and cellNameType implementations for counters. We 
also already have done lots of changes to counter in 2.1, I'm just not sure 
adding another (definitively-not-small) layer of changes on top of that a short 
time before release is the best strategy to minimize the change of breaking 
things. Let's say that my gut feeling is that we leave that for 3.0, and use 
that opportunity to try to simplify that further (CASSANDRA-6717, maybe getting 
rid of local/remote).

bq. but I seriously don't see how this could be accomplished

I think the first step is CASSANDRA-6888. If we have that, then in 3.0 we can 
at least detect if there is remaining local/remote shard in the system. If 
there is, one idea could be to ask (force really) people to run some offline 
upgrade tool. Or run it for them at startup really. I know it's not ideal but 
well, this is just to say that it's possible, and this may be worth the effort 
truly.

bq. hence not holding my breath for implementing counters as maps

That's not related to the local/remote shards, is it? Seems to me that we could 
do that even if we still have CounterCell.

bq. That's because using the timestamp field for the logical clock breaks the 
re-adding of previously dropped counter cells

Good point, but that's kind of not a detail imo. But now that we do 
read-modify-write, we could really use the current time for the timestamp can't 
we? We'd just have to make sure the times assigned by a local node never go 
back in time, and add +1 here and there, but that's not too hard. This could 
also help make writeTime() work with counters, which I believe work currently 
and is broken by this patch.

> counters++ split counter context shards into separate cells
> ---
>
> Key: CASSANDRA-6506
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6506
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 2.1 beta2
>
>
> This change is related to, but somewhat orthogonal to CASSANDRA-6504.
> Currently all the shard tuples for a given counter cell are packed, in sorted 
> order, in one binary blob. Thus reconciling N counter cells requires 
> allocating a new byte buffer capable of holding the union of the two 
> context's shards N-1 times.
> For writes, in post CASSANDRA-6504 world, it also means reading more data 
> than we have to (the complete context, when all we need is the local node's 
> global shard).
> Splitting the context into separate cells, one cell per shard, will help to 
> improve this. We did a similar thing with super columns for CASSANDRA-3237. 
> Incidentally, doing this split is now possible thanks to CASSANDRA-3237.
> Doing this would also simplify counter reconciliation logic. Getting rid of 
> old contexts altogether can be done trivially with upgradesstables.
> In fact, we should be able to put the logical clock into the cell's 
> timestamp, and use regular Cell-s and regular Cell reconcile() logic for the 
> shards, especially once we get rid of the local/remote shards some time in 
> the future (until then we still have to differentiate between 
> global/remote/local shards and their priority rules).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[08/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread jbellis
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/trunk
Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4
Parents: c80f61b 73a3eeb
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:02 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:02 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift
--



[01/16] git commit: r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854

2014-03-19 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 7e870018d -> 73a3eeb6f
  refs/heads/cassandra-2.0 c80f61b68 -> dd276ebb5
  refs/heads/cassandra-2.1 75508ec89 -> 6e366e3b2
  refs/heads/trunk 9f057832e -> 335aa9f1f


r/m unused code from ThriftServer/TServerFactory
patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854


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

Branch: refs/heads/cassandra-2.1
Commit: 9ef3eeec13b1cd30b35780def9cc35923193dfe9
Parents: a45fea8
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:46:20 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:46:20 2014 -0500

--
 src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 -
 src/java/org/apache/cassandra/thrift/ThriftServer.java   | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/TServerFactory.java
--
diff --git a/src/java/org/apache/cassandra/thrift/TServerFactory.java 
b/src/java/org/apache/cassandra/thrift/TServerFactory.java
index ec3d61b..09014ce 100644
--- a/src/java/org/apache/cassandra/thrift/TServerFactory.java
+++ b/src/java/org/apache/cassandra/thrift/TServerFactory.java
@@ -33,7 +33,6 @@ public interface TServerFactory
 {
 public InetSocketAddress addr;
 public Integer listenBacklog;
-public CassandraServer cassandraServer;
 public TProcessor processor;
 public TProtocolFactory tProtocolFactory;
 public TTransportFactory inTransportFactory;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/ThriftServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/ThriftServer.java 
b/src/java/org/apache/cassandra/thrift/ThriftServer.java
index d233850..2aef2e3 100644
--- a/src/java/org/apache/cassandra/thrift/ThriftServer.java
+++ b/src/java/org/apache/cassandra/thrift/ThriftServer.java
@@ -55,7 +55,7 @@ public class ThriftServer implements CassandraDaemon.Server
 if (server == null)
 {
 CassandraServer iface = getCassandraServer();
-server = new ThriftServerThread(address, port, backlog, iface, 
getProcessor(iface), getTransportFactory());
+server = new ThriftServerThread(address, port, backlog, 
getProcessor(iface), getTransportFactory());
 server.start();
 }
 }
@@ -112,7 +112,6 @@ public class ThriftServer implements CassandraDaemon.Server
 public ThriftServerThread(InetAddress listenAddr,
   int listenPort,
   int listenBacklog,
-  CassandraServer server,
   TProcessor processor,
   TTransportFactory transportFactory)
 {
@@ -123,7 +122,6 @@ public class ThriftServer implements CassandraDaemon.Server
 args.tProtocolFactory = new TBinaryProtocol.Factory(true, true);
 args.addr = new InetSocketAddress(listenAddr, listenPort);
 args.listenBacklog = listenBacklog;
-args.cassandraServer = server;
 args.processor = processor;
 args.keepAlive = DatabaseDescriptor.getRpcKeepAlive();
 args.sendBufferSize = DatabaseDescriptor.getRpcSendBufferSize();



[10/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread jbellis
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/cassandra-2.0
Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4
Parents: c80f61b 73a3eeb
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:02 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:02 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift
--



[jira] [Commented] (CASSANDRA-6807) Thrift with CQL3 doesn't return key

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940700#comment-13940700
 ] 

Jonathan Ellis commented on CASSANDRA-6807:
---

added a note to the cassandra.thrift IDL instead.  thanks!

> Thrift with CQL3 doesn't return key
> ---
>
> Key: CASSANDRA-6807
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6807
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
> Environment: windows 7 64bit, jdk 1.7, cassandra 2.0.5
>Reporter: Peter
>  Labels: javadoc
> Fix For: 2.0.7
>
> Attachments: thrift-missing-key.png
>
>
> I'm working on adding support for CQL3 to Hector and came across an odd 
> issue. I explicitly include the key in the statement, but the key isn't 
> returned. I've attached a screenshot. Hector's CqlQuery class is doing the 
> following to issue the cql3 call. I'm hoping it's a simple configuration 
> detail I'm missing or parameter I need to set.
> result = cassandra.execute_cql3_query(query, useCompression ? 
> Compression.GZIP : Compression.NONE, getConsistency());
> Looking at org.apache.cassandra.thrift.Cassandra.Client, I don't see anything 
> obvious that would tell me how to tell Cassandra to return the key in the 
> CqlResult or CqlRow. The queries I tried look like this
> select key from myColFamily;



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6783) Collections should have a proper compare() method for UDT

2014-03-19 Thread Tyler Hobbs (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940701#comment-13940701
 ] 

Tyler Hobbs commented on CASSANDRA-6783:


+1 with a minor nit: the {{java.util.*}} import is unused in CollectionTypeTest

> Collections should have a proper compare() method for UDT
> -
>
> Key: CASSANDRA-6783
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6783
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 2.1 beta2
>
> Attachments: 6783-2.txt, 6783.txt
>
>
> So far, ListType, SetType and MapType don't have a proper implementation of 
> compare() (they throw UnsupportedOperationException) because we haven't need 
> one since as far as the cell comparator is concenred, only parts of a 
> collection ends up in the comparator and need to be compared, but the full 
> collection itself does not.
> But with UDT can nest a collection and that sometimes require to be able to 
> compare them. Typically, I pushed a dtest 
> [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f]
>  that ends up throwing:
> {noformat}
> java.lang.UnsupportedOperationException: CollectionType should not be use 
> directly as a comparator
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
>  ~[main/:na]
> at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45]
> at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45]
> at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45]
> at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) 
> ~[main/:na]
> at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201)
>  ~[main/:na]
> ...
> {noformat}
> Note that this stack doesn't involve cell name comparison at all, it's just 
> that CQL3 sometimes uses a SortedSet underneath to deal with set literals 
> (since internal sets are sorted by their value), and so when a set contains 
> UDT that has set themselves, we need the collection comparison. That being 
> said, for some cases like having a UDT as a map key, we do would need 
> collections to be comparable for the purpose of cell name comparison.
> Attaching relatively simple patch. The patch is a bit bigger than it should 
> be because while adding the 3 simple compare() method, I realized that we had 
> methods to read a short length (2 unsigned short) from a ByteBuffer 
> duplicated all over the place and that it was time to consolidate that in 
> ByteBufferUtil where it should have been from day one (thus removing the 
> duplication). I can separate that trivial refactor in a separate patch if we 
> really need to, but really, the new stuff is the compare() method 
> implementation in ListType, SetType and MapType and the rest is a bit of 
> trivial cleanup. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[11/16] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1

2014-03-19 Thread jbellis
Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 350657c64d4caee378ec310b1b19fb1e7427b9ef
Parents: 9ef3eee 75508ec
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:12 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:12 2014 -0500

--
 CHANGES.txt |   5 +-
 doc/cql3/CQL.textile|  19 +-
 .../apache/cassandra/cache/AutoSavingCache.java |   3 +-
 .../cache/SerializingCacheProvider.java |   4 +-
 .../apache/cassandra/db/BatchlogManager.java|  12 +-
 .../cassandra/db/ColumnFamilySerializer.java|   7 +-
 .../org/apache/cassandra/db/ColumnIndex.java|   6 +-
 .../apache/cassandra/db/ColumnSerializer.java   |   4 +-
 .../apache/cassandra/db/CounterMutation.java|   3 +-
 .../org/apache/cassandra/db/DeletionInfo.java   |   4 +-
 .../org/apache/cassandra/db/DeletionTime.java   |   4 +-
 src/java/org/apache/cassandra/db/Mutation.java  |   4 +-
 .../org/apache/cassandra/db/OnDiskAtom.java |   3 +-
 .../apache/cassandra/db/PagedRangeCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceReply.java|   4 +-
 .../org/apache/cassandra/db/RangeTombstone.java |   5 +-
 .../apache/cassandra/db/RangeTombstoneList.java |   4 +-
 .../org/apache/cassandra/db/ReadCommand.java|   4 +-
 .../org/apache/cassandra/db/ReadResponse.java   |   5 +-
 src/java/org/apache/cassandra/db/Row.java   |   3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java  |   4 +-
 .../org/apache/cassandra/db/RowPosition.java|   4 +-
 .../cassandra/db/SliceByNamesReadCommand.java   |   3 +-
 .../cassandra/db/SliceFromReadCommand.java  |   4 +-
 .../apache/cassandra/db/SnapshotCommand.java|   4 +-
 .../apache/cassandra/db/TruncateResponse.java   |   4 +-
 .../org/apache/cassandra/db/Truncation.java |   4 +-
 .../org/apache/cassandra/db/WriteResponse.java  |   4 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../cassandra/db/commitlog/ReplayPosition.java  |   4 +-
 .../db/compaction/AbstractCompactedRow.java |   3 +-
 .../db/compaction/LazilyCompactedRow.java   |   3 +-
 .../cassandra/db/composites/AbstractCType.java  |   4 +-
 .../db/composites/AbstractCellNameType.java |   4 +-
 .../apache/cassandra/db/filter/ColumnSlice.java |   4 +-
 .../cassandra/db/filter/IDiskAtomFilter.java|   5 +-
 .../cassandra/db/filter/NamesQueryFilter.java   |   4 +-
 .../cassandra/db/filter/SliceQueryFilter.java   |   4 +-
 .../apache/cassandra/dht/AbstractBounds.java|   3 +-
 .../org/apache/cassandra/dht/BootStrapper.java  |   4 +-
 src/java/org/apache/cassandra/dht/Token.java|   4 +-
 .../org/apache/cassandra/gms/EchoMessage.java   |   4 +-
 .../org/apache/cassandra/gms/EndpointState.java |   3 +-
 .../org/apache/cassandra/gms/GossipDigest.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestAck.java   |   4 +-
 .../apache/cassandra/gms/GossipDigestAck2.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestSyn.java   |   5 +-
 .../apache/cassandra/gms/HeartBeatState.java|   3 +-
 .../apache/cassandra/gms/VersionedValue.java|   3 +-
 .../apache/cassandra/io/ISSTableSerializer.java |   5 +-
 .../org/apache/cassandra/io/ISerializer.java|   6 +-
 .../cassandra/io/IVersionedSerializer.java  |   6 +-
 .../io/compress/CompressionMetadata.java|   3 +-
 .../io/compress/CompressionParameters.java  |   4 +-
 .../cassandra/io/sstable/IndexHelper.java   |   3 +-
 .../cassandra/io/sstable/IndexSummary.java  |   7 +-
 .../cassandra/io/sstable/SSTableReader.java |   4 +-
 .../cassandra/io/sstable/SSTableWriter.java |   4 +-
 .../io/sstable/metadata/CompactionMetadata.java |   4 +-
 .../metadata/IMetadataComponentSerializer.java  |   5 +-
 .../sstable/metadata/IMetadataSerializer.java   |   6 +-
 .../metadata/LegacyMetadataSerializer.java  |   3 +-
 .../io/sstable/metadata/MetadataSerializer.java |   6 +-
 .../io/sstable/metadata/StatsMetadata.java  |   4 +-
 .../io/sstable/metadata/ValidationMetadata.java |   4 +-
 .../cassandra/io/util/AbstractDataOutput.java   |  43 +-
 .../io/util/ByteBufferOutputStream.java |  46 --
 .../io/util/ChecksummedOutputStream.java|  56 ---
 .../cassandra/io/util/DataOutputBuffer.java |  23 +-
 .../cassandra/io/util/DataOutputByteBuffer.java |  59 +++
 .../cassandra/io/util/DataOutputPlus.java   |  32 ++
 .../io/util/DataOutputStreamAndChannel.java |  55 +++
 .../cassandra/io/util/DataOutputStreamPlus.java |  57 +++
 .../io/util/FastByteArrayOutputStream.java  |

[14/16] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread jbellis
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 6e366e3b260615df05eea8bc5533f719df8343fe
Parents: 350657c dd276eb
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:59 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:59 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6e366e3b/interface/cassandra.thrift
--



[1/4] git commit: Add UNLOGGED, COUNTER options to BATCH docs

2014-03-19 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/trunk 96b55cecc -> 00317fc8f


Add UNLOGGED, COUNTER options to BATCH docs

patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816


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

Branch: refs/heads/trunk
Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47
Parents: 3008532
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:37:09 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:37:09 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f88345d..960b0e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.16
+ * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
  * add extra SSL cipher suites (CASSANDRA-6613)
  * fix nodetool getsstables for blob PK (CASSANDRA-6803)
  * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ecd3b7e..91e2625 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -536,7 +536,7 @@ h3(#batchStmt). BATCH
 __Syntax:__
 
 bc(syntax).. 
- ::= BEGIN BATCH
+ ::= BEGIN ( UNLOGGED | COUNTER ) BATCH
  ( USING  ( AND  )* )?
  ( ';'  )*
  APPLY BATCH
@@ -557,11 +557,22 @@ BEGIN BATCH
   DELETE name FROM users WHERE userid = 'user1';
 APPLY BATCH;
 
-The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It mainly serves 
two purposes:
-# it saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
-# all updates in a @BATCH@ belonging to a given partition key are performed 
atomically and in isolation
+The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It serves several 
purposes:
+# It saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
+# All updates in a @BATCH@ belonging to a given partition key are performed in 
isolation.
+# By default, all operations in the batch are performed atomically.  See the 
notes on "@UNLOGGED@":#unloggedBatch for more details.
 Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and 
@DELETE@ statements and is _not_ a full analogue for SQL transactions.
 
+h4(#unloggedBatch). @UNLOGGED@
+
+By default, Cassandra uses a batch log to ensure all operations in a batch are 
applied atomically. (Note that the operations are still only isolated within a 
single partition.)
+
+There is a performance penalty for batch atomicity when a batch spans multiple 
partitions. If you do not want to incur this penalty, you can tell Cassandra to 
skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, 
operations are only atomic within a single partition.
+
+h4(#counterBatch). @COUNTER@
+
+Use the @COUNTER@ option for batched counter updates.  Unlike other updates in 
Cassandra, counter updates are not idempotent.
+
 h4(#batchOptions). @@
 
 @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one 
described in the "@UPDATE@":#updateOptions statement (the timestamp applies to 
all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* 
be used in the statements within the batch.



[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells

2014-03-19 Thread Aleksey Yeschenko (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940695#comment-13940695
 ] 

Aleksey Yeschenko commented on CASSANDRA-6506:
--

Once we have CASSANDRA-6717, I pinky-promise to get rid of most of the stuff 
that's bothering you in 3.0 (all new CellName methods, originalType() and 
enableCounters()). (I can kill the new CellName methods right now, really).

I honestly have no clue wrt getting rid of local and remote shards, which is 
why I'm fine with this current approach in general. I would love to, really, to 
just stick to maps, but I just don't see how we can get rid of those.

> counters++ split counter context shards into separate cells
> ---
>
> Key: CASSANDRA-6506
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6506
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 2.1 beta2
>
>
> This change is related to, but somewhat orthogonal to CASSANDRA-6504.
> Currently all the shard tuples for a given counter cell are packed, in sorted 
> order, in one binary blob. Thus reconciling N counter cells requires 
> allocating a new byte buffer capable of holding the union of the two 
> context's shards N-1 times.
> For writes, in post CASSANDRA-6504 world, it also means reading more data 
> than we have to (the complete context, when all we need is the local node's 
> global shard).
> Splitting the context into separate cells, one cell per shard, will help to 
> improve this. We did a similar thing with super columns for CASSANDRA-3237. 
> Incidentally, doing this split is now possible thanks to CASSANDRA-3237.
> Doing this would also simplify counter reconciliation logic. Getting rid of 
> old contexts altogether can be done trivially with upgradesstables.
> In fact, we should be able to put the logical clock into the cell's 
> timestamp, and use regular Cell-s and regular Cell reconcile() logic for the 
> shards, especially once we get rid of the local/remote shards some time in 
> the future (until then we still have to differentiate between 
> global/remote/local shards and their priority rules).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[09/16] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread jbellis
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/cassandra-2.1
Commit: dd276ebb5dc96fbc487c4cde1ff8b5f9d3a019a4
Parents: c80f61b 73a3eeb
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:02 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:02 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dd276ebb/interface/cassandra.thrift
--



[12/16] git commit: Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1

2014-03-19 Thread jbellis
Merge remote-tracking branch 'origin/cassandra-2.1' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 350657c64d4caee378ec310b1b19fb1e7427b9ef
Parents: 9ef3eee 75508ec
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:11:12 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:11:12 2014 -0500

--
 CHANGES.txt |   5 +-
 doc/cql3/CQL.textile|  19 +-
 .../apache/cassandra/cache/AutoSavingCache.java |   3 +-
 .../cache/SerializingCacheProvider.java |   4 +-
 .../apache/cassandra/db/BatchlogManager.java|  12 +-
 .../cassandra/db/ColumnFamilySerializer.java|   7 +-
 .../org/apache/cassandra/db/ColumnIndex.java|   6 +-
 .../apache/cassandra/db/ColumnSerializer.java   |   4 +-
 .../apache/cassandra/db/CounterMutation.java|   3 +-
 .../org/apache/cassandra/db/DeletionInfo.java   |   4 +-
 .../org/apache/cassandra/db/DeletionTime.java   |   4 +-
 src/java/org/apache/cassandra/db/Mutation.java  |   4 +-
 .../org/apache/cassandra/db/OnDiskAtom.java |   3 +-
 .../apache/cassandra/db/PagedRangeCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceReply.java|   4 +-
 .../org/apache/cassandra/db/RangeTombstone.java |   5 +-
 .../apache/cassandra/db/RangeTombstoneList.java |   4 +-
 .../org/apache/cassandra/db/ReadCommand.java|   4 +-
 .../org/apache/cassandra/db/ReadResponse.java   |   5 +-
 src/java/org/apache/cassandra/db/Row.java   |   3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java  |   4 +-
 .../org/apache/cassandra/db/RowPosition.java|   4 +-
 .../cassandra/db/SliceByNamesReadCommand.java   |   3 +-
 .../cassandra/db/SliceFromReadCommand.java  |   4 +-
 .../apache/cassandra/db/SnapshotCommand.java|   4 +-
 .../apache/cassandra/db/TruncateResponse.java   |   4 +-
 .../org/apache/cassandra/db/Truncation.java |   4 +-
 .../org/apache/cassandra/db/WriteResponse.java  |   4 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../cassandra/db/commitlog/ReplayPosition.java  |   4 +-
 .../db/compaction/AbstractCompactedRow.java |   3 +-
 .../db/compaction/LazilyCompactedRow.java   |   3 +-
 .../cassandra/db/composites/AbstractCType.java  |   4 +-
 .../db/composites/AbstractCellNameType.java |   4 +-
 .../apache/cassandra/db/filter/ColumnSlice.java |   4 +-
 .../cassandra/db/filter/IDiskAtomFilter.java|   5 +-
 .../cassandra/db/filter/NamesQueryFilter.java   |   4 +-
 .../cassandra/db/filter/SliceQueryFilter.java   |   4 +-
 .../apache/cassandra/dht/AbstractBounds.java|   3 +-
 .../org/apache/cassandra/dht/BootStrapper.java  |   4 +-
 src/java/org/apache/cassandra/dht/Token.java|   4 +-
 .../org/apache/cassandra/gms/EchoMessage.java   |   4 +-
 .../org/apache/cassandra/gms/EndpointState.java |   3 +-
 .../org/apache/cassandra/gms/GossipDigest.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestAck.java   |   4 +-
 .../apache/cassandra/gms/GossipDigestAck2.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestSyn.java   |   5 +-
 .../apache/cassandra/gms/HeartBeatState.java|   3 +-
 .../apache/cassandra/gms/VersionedValue.java|   3 +-
 .../apache/cassandra/io/ISSTableSerializer.java |   5 +-
 .../org/apache/cassandra/io/ISerializer.java|   6 +-
 .../cassandra/io/IVersionedSerializer.java  |   6 +-
 .../io/compress/CompressionMetadata.java|   3 +-
 .../io/compress/CompressionParameters.java  |   4 +-
 .../cassandra/io/sstable/IndexHelper.java   |   3 +-
 .../cassandra/io/sstable/IndexSummary.java  |   7 +-
 .../cassandra/io/sstable/SSTableReader.java |   4 +-
 .../cassandra/io/sstable/SSTableWriter.java |   4 +-
 .../io/sstable/metadata/CompactionMetadata.java |   4 +-
 .../metadata/IMetadataComponentSerializer.java  |   5 +-
 .../sstable/metadata/IMetadataSerializer.java   |   6 +-
 .../metadata/LegacyMetadataSerializer.java  |   3 +-
 .../io/sstable/metadata/MetadataSerializer.java |   6 +-
 .../io/sstable/metadata/StatsMetadata.java  |   4 +-
 .../io/sstable/metadata/ValidationMetadata.java |   4 +-
 .../cassandra/io/util/AbstractDataOutput.java   |  43 +-
 .../io/util/ByteBufferOutputStream.java |  46 --
 .../io/util/ChecksummedOutputStream.java|  56 ---
 .../cassandra/io/util/DataOutputBuffer.java |  23 +-
 .../cassandra/io/util/DataOutputByteBuffer.java |  59 +++
 .../cassandra/io/util/DataOutputPlus.java   |  32 ++
 .../io/util/DataOutputStreamAndChannel.java |  55 +++
 .../cassandra/io/util/DataOutputStreamPlus.java |  57 +++
 .../io/util/FastByteArrayOutputStream.jav

[16/16] git commit: Merge branch 'cassandra-2.1' into trunk

2014-03-19 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 335aa9f1f6cd25be6990f8df2e5839b7806edac6
Parents: e13b11d 6e366e3
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:12:11 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:12:11 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/335aa9f1/interface/cassandra.thrift
--



[04/16] git commit: comment CqlRow for #6807

2014-03-19 Thread jbellis
comment CqlRow for #6807


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

Branch: refs/heads/cassandra-2.0
Commit: 73a3eeb6f679adeb6982229ad730437177a0430d
Parents: 7e87001
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:10:52 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:10:52 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift
--
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 1fc7201..4eda4f8 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -496,7 +496,14 @@ enum CqlResultType {
 INT = 3
 }
 
-/** Row returned from a CQL query */
+/** 
+  Row returned from a CQL query.
+
+  This struct is used for both CQL2 and CQL3 queries.  For CQL2, the partition 
key
+  is special-cased and is always returned.  For CQL3, it is not special cased;
+  it will be included in the columns list if it was included in the SELECT and
+  the key field is always null.
+*/
 struct CqlRow {
 1: required binary key,
 2: required list columns



[06/16] git commit: comment CqlRow for #6807

2014-03-19 Thread jbellis
comment CqlRow for #6807


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

Branch: refs/heads/cassandra-2.1
Commit: 73a3eeb6f679adeb6982229ad730437177a0430d
Parents: 7e87001
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:10:52 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:10:52 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift
--
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 1fc7201..4eda4f8 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -496,7 +496,14 @@ enum CqlResultType {
 INT = 3
 }
 
-/** Row returned from a CQL query */
+/** 
+  Row returned from a CQL query.
+
+  This struct is used for both CQL2 and CQL3 queries.  For CQL2, the partition 
key
+  is special-cased and is always returned.  For CQL3, it is not special cased;
+  it will be included in the columns list if it was included in the SELECT and
+  the key field is always null.
+*/
 struct CqlRow {
 1: required binary key,
 2: required list columns



[05/16] git commit: comment CqlRow for #6807

2014-03-19 Thread jbellis
comment CqlRow for #6807


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

Branch: refs/heads/trunk
Commit: 73a3eeb6f679adeb6982229ad730437177a0430d
Parents: 7e87001
Author: Jonathan Ellis 
Authored: Wed Mar 19 12:10:52 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 12:10:52 2014 -0500

--
 interface/cassandra.thrift | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/73a3eeb6/interface/cassandra.thrift
--
diff --git a/interface/cassandra.thrift b/interface/cassandra.thrift
index 1fc7201..4eda4f8 100644
--- a/interface/cassandra.thrift
+++ b/interface/cassandra.thrift
@@ -496,7 +496,14 @@ enum CqlResultType {
 INT = 3
 }
 
-/** Row returned from a CQL query */
+/** 
+  Row returned from a CQL query.
+
+  This struct is used for both CQL2 and CQL3 queries.  For CQL2, the partition 
key
+  is special-cased and is always returned.  For CQL3, it is not special cased;
+  it will be included in the columns list if it was included in the SELECT and
+  the key field is always null.
+*/
 struct CqlRow {
 1: required binary key,
 2: required list columns



[02/16] git commit: r/m unused code from ThriftServer/TServerFactory patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854

2014-03-19 Thread jbellis
r/m unused code from ThriftServer/TServerFactory
patch by Ed Capriolo; reviewed by jbellis for CASSANDRA-6854


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

Branch: refs/heads/trunk
Commit: 9ef3eeec13b1cd30b35780def9cc35923193dfe9
Parents: a45fea8
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:46:20 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:46:20 2014 -0500

--
 src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 -
 src/java/org/apache/cassandra/thrift/ThriftServer.java   | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/TServerFactory.java
--
diff --git a/src/java/org/apache/cassandra/thrift/TServerFactory.java 
b/src/java/org/apache/cassandra/thrift/TServerFactory.java
index ec3d61b..09014ce 100644
--- a/src/java/org/apache/cassandra/thrift/TServerFactory.java
+++ b/src/java/org/apache/cassandra/thrift/TServerFactory.java
@@ -33,7 +33,6 @@ public interface TServerFactory
 {
 public InetSocketAddress addr;
 public Integer listenBacklog;
-public CassandraServer cassandraServer;
 public TProcessor processor;
 public TProtocolFactory tProtocolFactory;
 public TTransportFactory inTransportFactory;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9ef3eeec/src/java/org/apache/cassandra/thrift/ThriftServer.java
--
diff --git a/src/java/org/apache/cassandra/thrift/ThriftServer.java 
b/src/java/org/apache/cassandra/thrift/ThriftServer.java
index d233850..2aef2e3 100644
--- a/src/java/org/apache/cassandra/thrift/ThriftServer.java
+++ b/src/java/org/apache/cassandra/thrift/ThriftServer.java
@@ -55,7 +55,7 @@ public class ThriftServer implements CassandraDaemon.Server
 if (server == null)
 {
 CassandraServer iface = getCassandraServer();
-server = new ThriftServerThread(address, port, backlog, iface, 
getProcessor(iface), getTransportFactory());
+server = new ThriftServerThread(address, port, backlog, 
getProcessor(iface), getTransportFactory());
 server.start();
 }
 }
@@ -112,7 +112,6 @@ public class ThriftServer implements CassandraDaemon.Server
 public ThriftServerThread(InetAddress listenAddr,
   int listenPort,
   int listenBacklog,
-  CassandraServer server,
   TProcessor processor,
   TTransportFactory transportFactory)
 {
@@ -123,7 +122,6 @@ public class ThriftServer implements CassandraDaemon.Server
 args.tProtocolFactory = new TBinaryProtocol.Factory(true, true);
 args.addr = new InetSocketAddress(listenAddr, listenPort);
 args.listenBacklog = listenBacklog;
-args.cassandraServer = server;
 args.processor = processor;
 args.keepAlive = DatabaseDescriptor.getRpcKeepAlive();
 args.sendBufferSize = DatabaseDescriptor.getRpcSendBufferSize();



[03/16] git commit: Merge branch 'cassandra-2.1' into trunk

2014-03-19 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: f0227a6c1ca8dab34c1b8cfe095ce8e0a2dde28e
Parents: 96b55ce 9ef3eee
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:46:27 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:46:27 2014 -0500

--
 src/java/org/apache/cassandra/thrift/TServerFactory.java | 1 -
 src/java/org/apache/cassandra/thrift/ThriftServer.java   | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)
--




[1/5] ByteBuffer write() methods for serializing sstables

2014-03-19 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/trunk 00317fc8f -> 9f057832e


http://git-wip-us.apache.org/repos/asf/cassandra/blob/75508ec8/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
--
diff --git a/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java 
b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
new file mode 100644
index 000..4f6d652
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * 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 in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.utils;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Random;
+
+import org.junit.Test;
+
+public class FastByteOperationsTest
+{
+
+private static final FastByteOperations.PureJavaOperations PJO = new 
FastByteOperations.PureJavaOperations();
+private static final FastByteOperations.UnsafeOperations UO = new 
FastByteOperations.UnsafeOperations();
+private static final Random rand = new Random(0);
+private static final ByteBuffer dbuf1 = ByteBuffer.allocateDirect(150);
+private static final ByteBuffer dbuf2 = ByteBuffer.allocateDirect(150);
+private static final ByteBuffer hbuf1 = ByteBuffer.allocate(150);
+private static final ByteBuffer hbuf2 = ByteBuffer.allocate(150);
+
+@Test
+public void testFastByteCopy()
+{
+byte[] bytes1 = new byte[128];
+byte[] empty = new byte[128];
+rand.nextBytes(bytes1);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), PJO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), PJO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), PJO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), PJO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), UO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), UO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), UO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), UO);
+}
+
+private void testCopy(byte[] canon, ByteBuffer src, ByteBuffer trg, 
FastByteOperations.ByteOperations ops)
+{
+byte[] result = new byte[src.remaining()];
+ops.copy(src, src.position(), trg, trg.position(), src.remaining());
+ops.copy(trg, trg.position(), result, 0, trg.remaining());
+assert firstdiff(canon, result) < 0;
+}
+
+private static int firstdiff(byte[] canon, byte[] test)
+{
+for (int i = 0 ; i < canon.length ; i++)
+if (canon[i] != test[i])
+return i;
+return -1;
+}
+
+@Test
+public void testFastByteComparisons()
+{
+byte[] bytes1 = new byte[128];
+for (int i = 0 ; i < 1000 ; i++)
+{
+rand.nextBytes(bytes1);
+for (int j = 0 ; j < 16 ; j++)
+{
+byte[] bytes2 = Arrays.copyOf(bytes1, bytes1.length - j);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, -1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, -1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 128);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 128);
+}
+}
+}
+
+private void testTwiddleOneByteComparisons(byte[] bytes1, byte[] bytes2, 
int count, boolean start, int inc)
+{
+for (int j = 0 ; j < count ; j++)
+{
+int index = start ? j : bytes2.length - (j + 1);
+bytes2[index] += inc;
+testComparisons(bytes1, bytes2);
+bytes2[index] -= inc;
+}
+}
+
+private static ByteBuffer wrap1(byte[] bytes, boolean direct)
+{
+return slice(bytes, direct ? dbuf1 : hbuf1);
+}
+
+private static ByteBuffer wrap2(byte[] bytes, boolean direct)
+{
+return slice(bytes, direct ? dbuf2 : hbuf2);
+}
+
+   

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

2014-03-19 Thread marcuse
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 9f057832e3796635eb4fc1f6d757dffed0d47c4e
Parents: 00317fc 75508ec
Author: Marcus Eriksson 
Authored: Wed Mar 19 18:01:48 2014 +0100
Committer: Marcus Eriksson 
Committed: Wed Mar 19 18:01:48 2014 +0100

--
 CHANGES.txt |   1 +
 .../apache/cassandra/cache/AutoSavingCache.java |   3 +-
 .../cache/SerializingCacheProvider.java |   4 +-
 .../apache/cassandra/db/BatchlogManager.java|  12 +-
 .../cassandra/db/ColumnFamilySerializer.java|   7 +-
 .../org/apache/cassandra/db/ColumnIndex.java|   6 +-
 .../apache/cassandra/db/ColumnSerializer.java   |   4 +-
 .../apache/cassandra/db/CounterMutation.java|   3 +-
 .../org/apache/cassandra/db/DeletionInfo.java   |   4 +-
 .../org/apache/cassandra/db/DeletionTime.java   |   4 +-
 src/java/org/apache/cassandra/db/Mutation.java  |   4 +-
 .../org/apache/cassandra/db/OnDiskAtom.java |   3 +-
 .../apache/cassandra/db/PagedRangeCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceCommand.java  |   4 +-
 .../apache/cassandra/db/RangeSliceReply.java|   4 +-
 .../org/apache/cassandra/db/RangeTombstone.java |   5 +-
 .../apache/cassandra/db/RangeTombstoneList.java |   4 +-
 .../org/apache/cassandra/db/ReadCommand.java|   4 +-
 .../org/apache/cassandra/db/ReadResponse.java   |   5 +-
 src/java/org/apache/cassandra/db/Row.java   |   3 +-
 .../org/apache/cassandra/db/RowIndexEntry.java  |   4 +-
 .../org/apache/cassandra/db/RowPosition.java|   4 +-
 .../cassandra/db/SliceByNamesReadCommand.java   |   3 +-
 .../cassandra/db/SliceFromReadCommand.java  |   4 +-
 .../apache/cassandra/db/SnapshotCommand.java|   4 +-
 .../apache/cassandra/db/TruncateResponse.java   |   4 +-
 .../org/apache/cassandra/db/Truncation.java |   4 +-
 .../org/apache/cassandra/db/WriteResponse.java  |   4 +-
 .../cassandra/db/commitlog/CommitLog.java   |   8 +-
 .../cassandra/db/commitlog/ReplayPosition.java  |   4 +-
 .../db/compaction/AbstractCompactedRow.java |   3 +-
 .../db/compaction/LazilyCompactedRow.java   |   3 +-
 .../cassandra/db/composites/AbstractCType.java  |   4 +-
 .../db/composites/AbstractCellNameType.java |   4 +-
 .../apache/cassandra/db/filter/ColumnSlice.java |   4 +-
 .../cassandra/db/filter/IDiskAtomFilter.java|   5 +-
 .../cassandra/db/filter/NamesQueryFilter.java   |   4 +-
 .../cassandra/db/filter/SliceQueryFilter.java   |   4 +-
 .../apache/cassandra/dht/AbstractBounds.java|   3 +-
 .../org/apache/cassandra/dht/BootStrapper.java  |   4 +-
 src/java/org/apache/cassandra/dht/Token.java|   4 +-
 .../org/apache/cassandra/gms/EchoMessage.java   |   4 +-
 .../org/apache/cassandra/gms/EndpointState.java |   3 +-
 .../org/apache/cassandra/gms/GossipDigest.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestAck.java   |   4 +-
 .../apache/cassandra/gms/GossipDigestAck2.java  |   3 +-
 .../apache/cassandra/gms/GossipDigestSyn.java   |   5 +-
 .../apache/cassandra/gms/HeartBeatState.java|   3 +-
 .../apache/cassandra/gms/VersionedValue.java|   3 +-
 .../apache/cassandra/io/ISSTableSerializer.java |   5 +-
 .../org/apache/cassandra/io/ISerializer.java|   6 +-
 .../cassandra/io/IVersionedSerializer.java  |   6 +-
 .../io/compress/CompressionMetadata.java|   3 +-
 .../io/compress/CompressionParameters.java  |   4 +-
 .../cassandra/io/sstable/IndexHelper.java   |   3 +-
 .../cassandra/io/sstable/IndexSummary.java  |   7 +-
 .../cassandra/io/sstable/SSTableReader.java |   4 +-
 .../cassandra/io/sstable/SSTableWriter.java |   4 +-
 .../io/sstable/metadata/CompactionMetadata.java |   4 +-
 .../metadata/IMetadataComponentSerializer.java  |   5 +-
 .../sstable/metadata/IMetadataSerializer.java   |   6 +-
 .../metadata/LegacyMetadataSerializer.java  |   3 +-
 .../io/sstable/metadata/MetadataSerializer.java |   6 +-
 .../io/sstable/metadata/StatsMetadata.java  |   4 +-
 .../io/sstable/metadata/ValidationMetadata.java |   4 +-
 .../cassandra/io/util/AbstractDataOutput.java   |  43 +-
 .../io/util/ByteBufferOutputStream.java |  46 --
 .../io/util/ChecksummedOutputStream.java|  56 ---
 .../cassandra/io/util/DataOutputBuffer.java |  23 +-
 .../cassandra/io/util/DataOutputByteBuffer.java |  59 +++
 .../cassandra/io/util/DataOutputPlus.java   |  32 ++
 .../io/util/DataOutputStreamAndChannel.java |  55 +++
 .../cassandra/io/util/DataOutputStreamPlus.java |  57 +++
 .../io/util/FastByteArrayOutputStream.java  |  11 +
 .../org/apache/cassandra/io/util/Memory.java|  21 +-
 .../cassandra/io/util/

[1/4] ByteBuffer write() methods for serializing sstables

2014-03-19 Thread marcuse
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 2a2141ce6 -> 75508ec89


http://git-wip-us.apache.org/repos/asf/cassandra/blob/75508ec8/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
--
diff --git a/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java 
b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
new file mode 100644
index 000..4f6d652
--- /dev/null
+++ b/test/unit/org/apache/cassandra/utils/FastByteOperationsTest.java
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * 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 in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.utils;
+
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.Random;
+
+import org.junit.Test;
+
+public class FastByteOperationsTest
+{
+
+private static final FastByteOperations.PureJavaOperations PJO = new 
FastByteOperations.PureJavaOperations();
+private static final FastByteOperations.UnsafeOperations UO = new 
FastByteOperations.UnsafeOperations();
+private static final Random rand = new Random(0);
+private static final ByteBuffer dbuf1 = ByteBuffer.allocateDirect(150);
+private static final ByteBuffer dbuf2 = ByteBuffer.allocateDirect(150);
+private static final ByteBuffer hbuf1 = ByteBuffer.allocate(150);
+private static final ByteBuffer hbuf2 = ByteBuffer.allocate(150);
+
+@Test
+public void testFastByteCopy()
+{
+byte[] bytes1 = new byte[128];
+byte[] empty = new byte[128];
+rand.nextBytes(bytes1);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), PJO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), PJO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), PJO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), PJO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, true), UO);
+testCopy(bytes1, wrap1(bytes1, true), wrap2(empty, false), UO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, true), UO);
+testCopy(bytes1, wrap1(bytes1, false), wrap2(empty, false), UO);
+}
+
+private void testCopy(byte[] canon, ByteBuffer src, ByteBuffer trg, 
FastByteOperations.ByteOperations ops)
+{
+byte[] result = new byte[src.remaining()];
+ops.copy(src, src.position(), trg, trg.position(), src.remaining());
+ops.copy(trg, trg.position(), result, 0, trg.remaining());
+assert firstdiff(canon, result) < 0;
+}
+
+private static int firstdiff(byte[] canon, byte[] test)
+{
+for (int i = 0 ; i < canon.length ; i++)
+if (canon[i] != test[i])
+return i;
+return -1;
+}
+
+@Test
+public void testFastByteComparisons()
+{
+byte[] bytes1 = new byte[128];
+for (int i = 0 ; i < 1000 ; i++)
+{
+rand.nextBytes(bytes1);
+for (int j = 0 ; j < 16 ; j++)
+{
+byte[] bytes2 = Arrays.copyOf(bytes1, bytes1.length - j);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, -1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, -1);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, true, 128);
+testTwiddleOneByteComparisons(bytes1, bytes2, 16, false, 128);
+}
+}
+}
+
+private void testTwiddleOneByteComparisons(byte[] bytes1, byte[] bytes2, 
int count, boolean start, int inc)
+{
+for (int j = 0 ; j < count ; j++)
+{
+int index = start ? j : bytes2.length - (j + 1);
+bytes2[index] += inc;
+testComparisons(bytes1, bytes2);
+bytes2[index] -= inc;
+}
+}
+
+private static ByteBuffer wrap1(byte[] bytes, boolean direct)
+{
+return slice(bytes, direct ? dbuf1 : hbuf1);
+}
+
+private static ByteBuffer wrap2(byte[] bytes, boolean direct)
+{
+return slice(bytes, direct ? dbuf2 : hbuf2);
+

[jira] [Commented] (CASSANDRA-6836) WriteTimeoutException always reports that the serial CL is "SERIAL"

2014-03-19 Thread Irfan Nagoo (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940683#comment-13940683
 ] 

Irfan Nagoo commented on CASSANDRA-6836:


Sure, they look relevant.Thanks Jonathan! 

> WriteTimeoutException always reports that the serial CL is "SERIAL"
> ---
>
> Key: CASSANDRA-6836
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6836
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Nicolas Favre-Felix
>Assignee: Irfan Nagoo
>Priority: Minor
>  Labels: lhf
> Attachments: trunk-6836.txt
>
>
> In StorageProxy.proposePaxos, the WriteTimeoutException is thrown with 
> information about the consistency level. This CL is hardcoded to 
> ConsistencyLevel.SERIAL, which might be wrong when LOCAL_SERIAL is used:
> {code}
> if (timeoutIfPartial && !callback.isFullyRefused())
> throw new WriteTimeoutException(WriteType.CAS, 
> ConsistencyLevel.SERIAL, callback.getAcceptCount(), requiredParticipants);
> {code}
> Suggested fix: pass consistencyForPaxos as a parameter to proposePaxos().



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[3/4] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1

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/2a2141ce
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a2141ce
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a2141ce

Branch: refs/heads/trunk
Commit: 2a2141ce6505187347613d50e854a6c13af01ceb
Parents: a45fea8 c80f61b
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:42:45 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:42:45 2014 -0500

--
 CHANGES.txt  |  4 +++-
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 18 insertions(+), 5 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/doc/cql3/CQL.textile
--



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

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 00317fc8f33f146ece0b1bb4376e548e26c5df8e
Parents: 96b55ce 2a2141c
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:43:36 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:43:36 2014 -0500

--
 CHANGES.txt  |  4 +++-
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 18 insertions(+), 5 deletions(-)
--


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



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

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-1.2' into cassandra-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/c80f61b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c80f61b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c80f61b6

Branch: refs/heads/trunk
Commit: c80f61b682e4528b5d6f58b2ec0260138799da53
Parents: 32c15c2 7e87001
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:40:40 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:40:40 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c80f61b6/CHANGES.txt
--
diff --cc CHANGES.txt
index 41ec1d7,960b0e9..f3f16e8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,76 -1,11 +1,77 @@@
 -1.2.16
 +2.0.7
 + * Add uuid() function (CASSANDRA-6473)
 + * Omit tombstones from schema digests (CASSANDRA-6862)
 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
 + * Lower chances for losing new SSTables during nodetool refresh and
 +   ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514)
 + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708)
 + * Update hadoop_cql3_word_count example (CASSANDRA-6793)
 + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788)
 + * Log more information when exceeding tombstone_warn_threshold 
(CASSANDRA-6865)
 + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864)
 + * Fix schema concurrency exceptions (CASSANDRA-6841)
 + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832)
 + * Fix saving triggers to schema (CASSANDRA-6789)
 + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
 + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
 + * Fix static counter columns (CASSANDRA-6827)
 + * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
 + * Fix CompactionManager.needsCleanup (CASSANDRA-6845)
 + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779)
 + * Read message id as string from earlier versions (CASSANDRA-6840)
 + * Properly use the Paxos consistency for (non-protocol) batch 
(CASSANDRA-6837)
 + * Add paranoid disk failure option (CASSANDRA-6646)
 + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876)
 + * Extend triggers to support CAS updates (CASSANDRA-6882)
 + * Static columns with IF NOT EXISTS don't always work as expected 
(CASSANDRA-6873)
 +Merged from 1.2:
+  * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
   * add extra SSL cipher suites (CASSANDRA-6613)
   * fix nodetool getsstables for blob PK (CASSANDRA-6803)
 +
 +
 +2.0.6
 + * Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797)
 + * Pool CqlRecordWriter clients by inetaddress rather than Range 
 +   (CASSANDRA-6665)
 + * Fix compaction_history timestamps (CASSANDRA-6784)
 + * Compare scores of full replica ordering in DES (CASSANDRA-6883)
 + * fix CME in SessionInfo updateProgress affecting netstats (CASSANDRA-6577)
 + * Allow repairing between specific replicas (CASSANDRA-6440)
 + * Allow per-dc enabling of hints (CASSANDRA-6157)
 + * Add compatibility for Hadoop 0.2.x (CASSANDRA-5201)
 + * Fix EstimatedHistogram races (CASSANDRA-6682)
 + * Failure detector correctly converts initial value to nanos (CASSANDRA-6658)
 + * Add nodetool taketoken to relocate vnodes (CASSANDRA-4445)
 + * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645)
 + * Improve nodetool cfhistograms formatting (CASSANDRA-6360)
 + * Expose bulk loading progress over JMX (CASSANDRA-4757)
 + * Correctly handle null with IF conditions and TTL (CASSANDRA-6623)
 + * Account for range/row tombstones in tombstone drop
 +   time histogram (CASSANDRA-6522)
 + * Stop CommitLogSegment.close() from calling sync() (CASSANDRA-6652)
 + * Make commitlog failure handling configurable (CASSANDRA-6364)
 + * Avoid overlaps in LCS (CASSANDRA-6688)
 + * Improve support for paginating over composites (CASSANDRA-4851)
 + * Fix count(*) queries in a mixed cluster (CASSANDRA-6707)
 + * Improve repair tasks(snapshot, differencing) concurrency (CASSANDRA-6566)
 + * Fix replaying pre-2.0 commit logs (CASSANDRA-6714)
 + * Add static columns to CQL3 (CASSANDRA-6561)
 + * Optimize single partition batch statements (CASSANDRA-6737)
 + * Disallow post-query re-ordering when paging (CASSANDRA-6722)
 + * Fix potential paging bug with deleted columns (CASSANDRA-6748)
 + * Fix NPE on BulkLoader caused by losing StreamEvent (CASSANDRA-6636)
 + * Fix truncating compression metadata (CASSANDRA-6791)
 + * Fix UPDATE updating PRIMARY KEY columns im

[jira] [Commented] (CASSANDRA-6506) counters++ split counter context shards into separate cells

2014-03-19 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6506?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940608#comment-13940608
 ] 

Sylvain Lebresne commented on CASSANDRA-6506:
-

To me, the main interest of doing this is to as much of special casing of 
counters at the storage engine layer as possible, to basically make counters 
just a bunch of normal cells. In that regard, I'm not convinced it's worth 
having special cellname implementations: the 3 methods added could easily be 
static methods of say CounterColumns, thus removing a bunch of code, and making 
it clear counters are just an encoding on top of the storage engine.

I'm also uncomfortable with originalType() (and enableCounters() to some 
extend). It feels pretty error prone as you need to think hard about whether 
you you call that first before calling some other method or not. It feels to me 
that again, we shouldn't need anything special with CellNameType for counters: 
thrift/CQL should convert things to/from the "internal" format, but as far as 
CellName/CellNameType are concerned, we shouldn't need anything special casing 
at all (I do understand that we probably need to start storing whether the 
table is dense or not in the system table for thrift to convert things 
properly, but it's high time we do that anyway).

In fact, I'm starting to think that the best way to do this would be to 
internally deal with counters as (CQL) maps of shard id -> count. This would 
allow reuse of the existing as often as possible (we wouldn't need modification 
of CQL3RowOfSparse for instance). One obstacle to that is that collections only 
work with true CQL3 table, and we need to deal with thrift CF of counters, but 
honestly, I think I'd be fine encoding those as true CQL3 tables under the hood 
having just one CQL column (that could have an empty name). With compression 
and since counters table will be composite under the hood anyway, I'm not sure 
the overhead would be noticeable and it would definitively simplify matters.

Also, tbh, I'm starting to wonder if 2.1 is such a reasonable target for this 
at this point. Especially given we can't get rid of CounterCell right now (I 
think we should seriously consider getting rid of local/remote shard for 3.0) 
this feels like a lot of changes to push at the last minute, and it doesn't 
felt like it brings so much to the table that it can't wait 3.0. Especially 
since in 3.0 it might be achievable to get rid of CounterCell once and for all 
(and we wouldn't have to care about CQL2).

Outside of those general comments, a few minor remarks/nits gathered from 
reading the patch:
* isSameCQL3RowAs should use the comparator, not equals().
* I believe disallowing the drop of columns for CQL3 counter tables is a 
regression. Not sure why the patch does it tbh.
* Nit: I'd remove the 'clock' arg to CounterUpdateCell.create() and hardcode it 
to 1 inside the method to avoid misuse.
* Nit: I was liking the inital comment of CounterUpdateCell.reconcile, I'd be 
happy keeping it.


> counters++ split counter context shards into separate cells
> ---
>
> Key: CASSANDRA-6506
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6506
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 2.1 beta2
>
>
> This change is related to, but somewhat orthogonal to CASSANDRA-6504.
> Currently all the shard tuples for a given counter cell are packed, in sorted 
> order, in one binary blob. Thus reconciling N counter cells requires 
> allocating a new byte buffer capable of holding the union of the two 
> context's shards N-1 times.
> For writes, in post CASSANDRA-6504 world, it also means reading more data 
> than we have to (the complete context, when all we need is the local node's 
> global shard).
> Splitting the context into separate cells, one cell per shard, will help to 
> improve this. We did a similar thing with super columns for CASSANDRA-3237. 
> Incidentally, doing this split is now possible thanks to CASSANDRA-3237.
> Doing this would also simplify counter reconciliation logic. Getting rid of 
> old contexts altogether can be done trivially with upgradesstables.
> In fact, we should be able to put the logical clock into the cell's 
> timestamp, and use regular Cell-s and regular Cell reconcile() logic for the 
> shards, especially once we get rid of the local/remote shards some time in 
> the future (until then we still have to differentiate between 
> global/remote/local shards and their priority rules).



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[3/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-2.0' into cassandra-2.1

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/2a2141ce
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2a2141ce
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2a2141ce

Branch: refs/heads/cassandra-2.1
Commit: 2a2141ce6505187347613d50e854a6c13af01ceb
Parents: a45fea8 c80f61b
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:42:45 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:42:45 2014 -0500

--
 CHANGES.txt  |  4 +++-
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 18 insertions(+), 5 deletions(-)
--


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

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2a2141ce/doc/cql3/CQL.textile
--



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

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-1.2' into cassandra-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/c80f61b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c80f61b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c80f61b6

Branch: refs/heads/cassandra-2.1
Commit: c80f61b682e4528b5d6f58b2ec0260138799da53
Parents: 32c15c2 7e87001
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:40:40 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:40:40 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c80f61b6/CHANGES.txt
--
diff --cc CHANGES.txt
index 41ec1d7,960b0e9..f3f16e8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,76 -1,11 +1,77 @@@
 -1.2.16
 +2.0.7
 + * Add uuid() function (CASSANDRA-6473)
 + * Omit tombstones from schema digests (CASSANDRA-6862)
 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
 + * Lower chances for losing new SSTables during nodetool refresh and
 +   ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514)
 + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708)
 + * Update hadoop_cql3_word_count example (CASSANDRA-6793)
 + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788)
 + * Log more information when exceeding tombstone_warn_threshold 
(CASSANDRA-6865)
 + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864)
 + * Fix schema concurrency exceptions (CASSANDRA-6841)
 + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832)
 + * Fix saving triggers to schema (CASSANDRA-6789)
 + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
 + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
 + * Fix static counter columns (CASSANDRA-6827)
 + * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
 + * Fix CompactionManager.needsCleanup (CASSANDRA-6845)
 + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779)
 + * Read message id as string from earlier versions (CASSANDRA-6840)
 + * Properly use the Paxos consistency for (non-protocol) batch 
(CASSANDRA-6837)
 + * Add paranoid disk failure option (CASSANDRA-6646)
 + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876)
 + * Extend triggers to support CAS updates (CASSANDRA-6882)
 + * Static columns with IF NOT EXISTS don't always work as expected 
(CASSANDRA-6873)
 +Merged from 1.2:
+  * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
   * add extra SSL cipher suites (CASSANDRA-6613)
   * fix nodetool getsstables for blob PK (CASSANDRA-6803)
 +
 +
 +2.0.6
 + * Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797)
 + * Pool CqlRecordWriter clients by inetaddress rather than Range 
 +   (CASSANDRA-6665)
 + * Fix compaction_history timestamps (CASSANDRA-6784)
 + * Compare scores of full replica ordering in DES (CASSANDRA-6883)
 + * fix CME in SessionInfo updateProgress affecting netstats (CASSANDRA-6577)
 + * Allow repairing between specific replicas (CASSANDRA-6440)
 + * Allow per-dc enabling of hints (CASSANDRA-6157)
 + * Add compatibility for Hadoop 0.2.x (CASSANDRA-5201)
 + * Fix EstimatedHistogram races (CASSANDRA-6682)
 + * Failure detector correctly converts initial value to nanos (CASSANDRA-6658)
 + * Add nodetool taketoken to relocate vnodes (CASSANDRA-4445)
 + * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645)
 + * Improve nodetool cfhistograms formatting (CASSANDRA-6360)
 + * Expose bulk loading progress over JMX (CASSANDRA-4757)
 + * Correctly handle null with IF conditions and TTL (CASSANDRA-6623)
 + * Account for range/row tombstones in tombstone drop
 +   time histogram (CASSANDRA-6522)
 + * Stop CommitLogSegment.close() from calling sync() (CASSANDRA-6652)
 + * Make commitlog failure handling configurable (CASSANDRA-6364)
 + * Avoid overlaps in LCS (CASSANDRA-6688)
 + * Improve support for paginating over composites (CASSANDRA-4851)
 + * Fix count(*) queries in a mixed cluster (CASSANDRA-6707)
 + * Improve repair tasks(snapshot, differencing) concurrency (CASSANDRA-6566)
 + * Fix replaying pre-2.0 commit logs (CASSANDRA-6714)
 + * Add static columns to CQL3 (CASSANDRA-6561)
 + * Optimize single partition batch statements (CASSANDRA-6737)
 + * Disallow post-query re-ordering when paging (CASSANDRA-6722)
 + * Fix potential paging bug with deleted columns (CASSANDRA-6748)
 + * Fix NPE on BulkLoader caused by losing StreamEvent (CASSANDRA-6636)
 + * Fix truncating compression metadata (CASSANDRA-6791)
 + * Fix UPDATE updating PRIMARY KEY co

[1/3] git commit: Add UNLOGGED, COUNTER options to BATCH docs

2014-03-19 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 a45fea8fc -> 2a2141ce6


Add UNLOGGED, COUNTER options to BATCH docs

patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816


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

Branch: refs/heads/cassandra-2.1
Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47
Parents: 3008532
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:37:09 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:37:09 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f88345d..960b0e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.16
+ * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
  * add extra SSL cipher suites (CASSANDRA-6613)
  * fix nodetool getsstables for blob PK (CASSANDRA-6803)
  * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ecd3b7e..91e2625 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -536,7 +536,7 @@ h3(#batchStmt). BATCH
 __Syntax:__
 
 bc(syntax).. 
- ::= BEGIN BATCH
+ ::= BEGIN ( UNLOGGED | COUNTER ) BATCH
  ( USING  ( AND  )* )?
  ( ';'  )*
  APPLY BATCH
@@ -557,11 +557,22 @@ BEGIN BATCH
   DELETE name FROM users WHERE userid = 'user1';
 APPLY BATCH;
 
-The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It mainly serves 
two purposes:
-# it saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
-# all updates in a @BATCH@ belonging to a given partition key are performed 
atomically and in isolation
+The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It serves several 
purposes:
+# It saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
+# All updates in a @BATCH@ belonging to a given partition key are performed in 
isolation.
+# By default, all operations in the batch are performed atomically.  See the 
notes on "@UNLOGGED@":#unloggedBatch for more details.
 Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and 
@DELETE@ statements and is _not_ a full analogue for SQL transactions.
 
+h4(#unloggedBatch). @UNLOGGED@
+
+By default, Cassandra uses a batch log to ensure all operations in a batch are 
applied atomically. (Note that the operations are still only isolated within a 
single partition.)
+
+There is a performance penalty for batch atomicity when a batch spans multiple 
partitions. If you do not want to incur this penalty, you can tell Cassandra to 
skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, 
operations are only atomic within a single partition.
+
+h4(#counterBatch). @COUNTER@
+
+Use the @COUNTER@ option for batched counter updates.  Unlike other updates in 
Cassandra, counter updates are not idempotent.
+
 h4(#batchOptions). @@
 
 @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one 
described in the "@UPDATE@":#updateOptions statement (the timestamp applies to 
all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* 
be used in the statements within the batch.



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

2014-03-19 Thread tylerhobbs
Merge branch 'cassandra-1.2' into cassandra-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/c80f61b6
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c80f61b6
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c80f61b6

Branch: refs/heads/cassandra-2.0
Commit: c80f61b682e4528b5d6f58b2ec0260138799da53
Parents: 32c15c2 7e87001
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:40:40 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:40:40 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c80f61b6/CHANGES.txt
--
diff --cc CHANGES.txt
index 41ec1d7,960b0e9..f3f16e8
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,76 -1,11 +1,77 @@@
 -1.2.16
 +2.0.7
 + * Add uuid() function (CASSANDRA-6473)
 + * Omit tombstones from schema digests (CASSANDRA-6862)
 + * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
 + * Lower chances for losing new SSTables during nodetool refresh and
 +   ColumnFamilyStore.loadNewSSTables (CASSANDRA-6514)
 + * Add support for DELETE ... IF EXISTS to CQL3 (CASSANDRA-5708)
 + * Update hadoop_cql3_word_count example (CASSANDRA-6793)
 + * Fix handling of RejectedExecution in sync Thrift server (CASSANDRA-6788)
 + * Log more information when exceeding tombstone_warn_threshold 
(CASSANDRA-6865)
 + * Fix truncate to not abort due to unreachable fat clients (CASSANDRA-6864)
 + * Fix schema concurrency exceptions (CASSANDRA-6841)
 + * Fix leaking validator FH in StreamWriter (CASSANDRA-6832)
 + * Fix saving triggers to schema (CASSANDRA-6789)
 + * Fix trigger mutations when base mutation list is immutable (CASSANDRA-6790)
 + * Fix accounting in FileCacheService to allow re-using RAR (CASSANDRA-6838)
 + * Fix static counter columns (CASSANDRA-6827)
 + * Restore expiring->deleted (cell) compaction optimization (CASSANDRA-6844)
 + * Fix CompactionManager.needsCleanup (CASSANDRA-6845)
 + * Correctly compare BooleanType values other than 0 and 1 (CASSANDRA-6779)
 + * Read message id as string from earlier versions (CASSANDRA-6840)
 + * Properly use the Paxos consistency for (non-protocol) batch 
(CASSANDRA-6837)
 + * Add paranoid disk failure option (CASSANDRA-6646)
 + * Improve PerRowSecondaryIndex performance (CASSANDRA-6876)
 + * Extend triggers to support CAS updates (CASSANDRA-6882)
 + * Static columns with IF NOT EXISTS don't always work as expected 
(CASSANDRA-6873)
 +Merged from 1.2:
+  * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
   * add extra SSL cipher suites (CASSANDRA-6613)
   * fix nodetool getsstables for blob PK (CASSANDRA-6803)
 +
 +
 +2.0.6
 + * Avoid race-prone second "scrub" of system keyspace (CASSANDRA-6797)
 + * Pool CqlRecordWriter clients by inetaddress rather than Range 
 +   (CASSANDRA-6665)
 + * Fix compaction_history timestamps (CASSANDRA-6784)
 + * Compare scores of full replica ordering in DES (CASSANDRA-6883)
 + * fix CME in SessionInfo updateProgress affecting netstats (CASSANDRA-6577)
 + * Allow repairing between specific replicas (CASSANDRA-6440)
 + * Allow per-dc enabling of hints (CASSANDRA-6157)
 + * Add compatibility for Hadoop 0.2.x (CASSANDRA-5201)
 + * Fix EstimatedHistogram races (CASSANDRA-6682)
 + * Failure detector correctly converts initial value to nanos (CASSANDRA-6658)
 + * Add nodetool taketoken to relocate vnodes (CASSANDRA-4445)
 + * Fix upgradesstables NPE for non-CF-based indexes (CASSANDRA-6645)
 + * Improve nodetool cfhistograms formatting (CASSANDRA-6360)
 + * Expose bulk loading progress over JMX (CASSANDRA-4757)
 + * Correctly handle null with IF conditions and TTL (CASSANDRA-6623)
 + * Account for range/row tombstones in tombstone drop
 +   time histogram (CASSANDRA-6522)
 + * Stop CommitLogSegment.close() from calling sync() (CASSANDRA-6652)
 + * Make commitlog failure handling configurable (CASSANDRA-6364)
 + * Avoid overlaps in LCS (CASSANDRA-6688)
 + * Improve support for paginating over composites (CASSANDRA-4851)
 + * Fix count(*) queries in a mixed cluster (CASSANDRA-6707)
 + * Improve repair tasks(snapshot, differencing) concurrency (CASSANDRA-6566)
 + * Fix replaying pre-2.0 commit logs (CASSANDRA-6714)
 + * Add static columns to CQL3 (CASSANDRA-6561)
 + * Optimize single partition batch statements (CASSANDRA-6737)
 + * Disallow post-query re-ordering when paging (CASSANDRA-6722)
 + * Fix potential paging bug with deleted columns (CASSANDRA-6748)
 + * Fix NPE on BulkLoader caused by losing StreamEvent (CASSANDRA-6636)
 + * Fix truncating compression metadata (CASSANDRA-6791)
 + * Fix UPDATE updating PRIMARY KEY co

[1/2] git commit: Add UNLOGGED, COUNTER options to BATCH docs

2014-03-19 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 32c15c2fb -> c80f61b68


Add UNLOGGED, COUNTER options to BATCH docs

patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816


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

Branch: refs/heads/cassandra-2.0
Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47
Parents: 3008532
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:37:09 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:37:09 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f88345d..960b0e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.16
+ * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
  * add extra SSL cipher suites (CASSANDRA-6613)
  * fix nodetool getsstables for blob PK (CASSANDRA-6803)
  * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ecd3b7e..91e2625 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -536,7 +536,7 @@ h3(#batchStmt). BATCH
 __Syntax:__
 
 bc(syntax).. 
- ::= BEGIN BATCH
+ ::= BEGIN ( UNLOGGED | COUNTER ) BATCH
  ( USING  ( AND  )* )?
  ( ';'  )*
  APPLY BATCH
@@ -557,11 +557,22 @@ BEGIN BATCH
   DELETE name FROM users WHERE userid = 'user1';
 APPLY BATCH;
 
-The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It mainly serves 
two purposes:
-# it saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
-# all updates in a @BATCH@ belonging to a given partition key are performed 
atomically and in isolation
+The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It serves several 
purposes:
+# It saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
+# All updates in a @BATCH@ belonging to a given partition key are performed in 
isolation.
+# By default, all operations in the batch are performed atomically.  See the 
notes on "@UNLOGGED@":#unloggedBatch for more details.
 Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and 
@DELETE@ statements and is _not_ a full analogue for SQL transactions.
 
+h4(#unloggedBatch). @UNLOGGED@
+
+By default, Cassandra uses a batch log to ensure all operations in a batch are 
applied atomically. (Note that the operations are still only isolated within a 
single partition.)
+
+There is a performance penalty for batch atomicity when a batch spans multiple 
partitions. If you do not want to incur this penalty, you can tell Cassandra to 
skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, 
operations are only atomic within a single partition.
+
+h4(#counterBatch). @COUNTER@
+
+Use the @COUNTER@ option for batched counter updates.  Unlike other updates in 
Cassandra, counter updates are not idempotent.
+
 h4(#batchOptions). @@
 
 @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one 
described in the "@UPDATE@":#updateOptions statement (the timestamp applies to 
all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* 
be used in the statements within the batch.



[2/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473

2014-03-19 Thread jbellis
Add uuid() function
patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473


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

Branch: refs/heads/cassandra-2.1
Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f
Parents: 91e4d22
Author: Carl Yeksigian 
Authored: Sat Mar 15 20:11:46 2014 -0400
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:38:26 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2bb3605..41ec1d7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.7
+ * Add uuid() function (CASSANDRA-6473)
  * Omit tombstones from schema digests (CASSANDRA-6862)
  * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
  * Lower chances for losing new SSTables during nodetool refresh and

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 566d13c..b323f20 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1007,6 +1007,10 @@ CREATE TABLE users (
 
 then the @token@ function will take a single argument of type @text@ (in that 
case, the partition key is @userid@ (there is no clustering columns so the 
partition key is the same than the primary key)), and the return type will be 
@bigint@.
 
+h3(#uuidFun). Uuid
+
+The @uuid@ function takes no parameters and generates a random type 4 uuid 
suitable for use in INSERT or SET statements.
+
 h3(#timeuuidFun). Timeuuid functions
 
 h4. @now@

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java 
b/src/java/org/apache/cassandra/cql3/functions/Functions.java
index 97a0e91..5f4201d 100644
--- a/src/java/org/apache/cassandra/cql3/functions/Functions.java
+++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java
@@ -44,6 +44,7 @@ public abstract class Functions
 declared.put("maxtimeuuid", 
AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct));
 declared.put("dateof", 
AbstractFunction.factory(TimeuuidFcts.dateOfFct));
 declared.put("unixtimestampof", 
AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct));
+declared.put("uuid", AbstractFunction.factory(UuidFcts.uuidFct));
 
 for (CQL3Type type : CQL3Type.Native.values())
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
new file mode 100644
index 000..718bcbc
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * 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 in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.functions;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.cassandra.db.marshal.UUIDType;
+import org.apache.cassandra.serializers.UUIDSerializer;
+
+public abstract class UuidFcts
+{
+public static final Function uuidFct = new AbstractFunction("uuid", 
UUIDType.instance)
+{
+public ByteBuffer execute(List parameters)
+

[3/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473

2014-03-19 Thread jbellis
Add uuid() function
patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473


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

Branch: refs/heads/trunk
Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f
Parents: 91e4d22
Author: Carl Yeksigian 
Authored: Sat Mar 15 20:11:46 2014 -0400
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:38:26 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2bb3605..41ec1d7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.7
+ * Add uuid() function (CASSANDRA-6473)
  * Omit tombstones from schema digests (CASSANDRA-6862)
  * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
  * Lower chances for losing new SSTables during nodetool refresh and

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 566d13c..b323f20 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1007,6 +1007,10 @@ CREATE TABLE users (
 
 then the @token@ function will take a single argument of type @text@ (in that 
case, the partition key is @userid@ (there is no clustering columns so the 
partition key is the same than the primary key)), and the return type will be 
@bigint@.
 
+h3(#uuidFun). Uuid
+
+The @uuid@ function takes no parameters and generates a random type 4 uuid 
suitable for use in INSERT or SET statements.
+
 h3(#timeuuidFun). Timeuuid functions
 
 h4. @now@

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java 
b/src/java/org/apache/cassandra/cql3/functions/Functions.java
index 97a0e91..5f4201d 100644
--- a/src/java/org/apache/cassandra/cql3/functions/Functions.java
+++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java
@@ -44,6 +44,7 @@ public abstract class Functions
 declared.put("maxtimeuuid", 
AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct));
 declared.put("dateof", 
AbstractFunction.factory(TimeuuidFcts.dateOfFct));
 declared.put("unixtimestampof", 
AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct));
+declared.put("uuid", AbstractFunction.factory(UuidFcts.uuidFct));
 
 for (CQL3Type type : CQL3Type.Native.values())
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
new file mode 100644
index 000..718bcbc
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * 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 in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.functions;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.cassandra.db.marshal.UUIDType;
+import org.apache.cassandra.serializers.UUIDSerializer;
+
+public abstract class UuidFcts
+{
+public static final Function uuidFct = new AbstractFunction("uuid", 
UUIDType.instance)
+{
+public ByteBuffer execute(List parameters)
+

[1/6] git commit: Add uuid() function patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473

2014-03-19 Thread jbellis
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 91e4d2288 -> 32c15c2fb
  refs/heads/cassandra-2.1 0ccee7f58 -> a45fea8fc
  refs/heads/trunk 51e41a7fb -> 96b55cecc


Add uuid() function
patch by Carl Yeksigian; reviewed by jbellis for CASSANDRA-6473


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

Branch: refs/heads/cassandra-2.0
Commit: 32c15c2fb0d31a8f061a8fb812c2d4851d52ef2f
Parents: 91e4d22
Author: Carl Yeksigian 
Authored: Sat Mar 15 20:11:46 2014 -0400
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:38:26 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 2bb3605..41ec1d7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.0.7
+ * Add uuid() function (CASSANDRA-6473)
  * Omit tombstones from schema digests (CASSANDRA-6862)
  * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
  * Lower chances for losing new SSTables during nodetool refresh and

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 566d13c..b323f20 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -1007,6 +1007,10 @@ CREATE TABLE users (
 
 then the @token@ function will take a single argument of type @text@ (in that 
case, the partition key is @userid@ (there is no clustering columns so the 
partition key is the same than the primary key)), and the return type will be 
@bigint@.
 
+h3(#uuidFun). Uuid
+
+The @uuid@ function takes no parameters and generates a random type 4 uuid 
suitable for use in INSERT or SET statements.
+
 h3(#timeuuidFun). Timeuuid functions
 
 h4. @now@

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/Functions.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/Functions.java 
b/src/java/org/apache/cassandra/cql3/functions/Functions.java
index 97a0e91..5f4201d 100644
--- a/src/java/org/apache/cassandra/cql3/functions/Functions.java
+++ b/src/java/org/apache/cassandra/cql3/functions/Functions.java
@@ -44,6 +44,7 @@ public abstract class Functions
 declared.put("maxtimeuuid", 
AbstractFunction.factory(TimeuuidFcts.maxTimeuuidFct));
 declared.put("dateof", 
AbstractFunction.factory(TimeuuidFcts.dateOfFct));
 declared.put("unixtimestampof", 
AbstractFunction.factory(TimeuuidFcts.unixTimestampOfFct));
+declared.put("uuid", AbstractFunction.factory(UuidFcts.uuidFct));
 
 for (CQL3Type type : CQL3Type.Native.values())
 {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/32c15c2f/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
--
diff --git a/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java 
b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
new file mode 100644
index 000..718bcbc
--- /dev/null
+++ b/src/java/org/apache/cassandra/cql3/functions/UuidFcts.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * 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 in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cassandra.cql3.functions;
+
+import java.nio.ByteBuffer;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.cassandra.db.marshal.UUIDType;
+import org.apache.cassandra.serializers.UUIDSerializer;
+
+pub

[5/6] git commit: merge from 2.0

2014-03-19 Thread jbellis
merge from 2.0


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

Branch: refs/heads/cassandra-2.1
Commit: a45fea8fc67f770556a915b80ef6bea0c62ae3ee
Parents: 0ccee7f 32c15c2
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:38:54 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:38:54 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/CHANGES.txt
--
diff --cc CHANGES.txt
index 159d242,41ec1d7..75f4cee
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,5 +1,30 @@@
 -2.0.7
 +2.1.0-beta2
 + * Eliminate possibility of CL segment appearing twice in active list 
 +   (CASSANDRA-6557)
 + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759)
 + * Switch CRC component to Adler and include it for compressed sstables 
 +   (CASSANDRA-4165)
 + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451)
 + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899)
 + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897)
 + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
 + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692)
 + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
 + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)
 + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705)
 + * Scrub should not always clear out repaired status (CASSANDRA-5351)
 + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446)
 + * Fix ClassCastException for compact table with composites (CASSANDRA-6738)
 + * Fix potentially repairing with wrong nodes (CASSANDRA-6808)
 + * Change caching option syntax (CASSANDRA-6745)
 + * Fix stress to do proper counter reads (CASSANDRA-6835)
 + * Fix help message for stress counter_write (CASSANDRA-6824)
 + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848)
 + * Add logging levels (minimal, normal or verbose) to stress tool 
(CASSANDRA-6849)
 + * Fix race condition in Batch CLE (CASSANDRA-6860)
 + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774)
 +Merged from 2.0:
+  * Add uuid() function (CASSANDRA-6473)
   * Omit tombstones from schema digests (CASSANDRA-6862)
   * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
   * Lower chances for losing new SSTables during nodetool refresh and

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/doc/cql3/CQL.textile
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/src/java/org/apache/cassandra/cql3/functions/Functions.java
--



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

2014-03-19 Thread jbellis
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 96b55cecc37d69c0a3bc292ed9c0e12452559fda
Parents: 51e41a7 a45fea8
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:39:13 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:39:13 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


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



[4/6] git commit: merge from 2.0

2014-03-19 Thread jbellis
merge from 2.0


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

Branch: refs/heads/trunk
Commit: a45fea8fc67f770556a915b80ef6bea0c62ae3ee
Parents: 0ccee7f 32c15c2
Author: Jonathan Ellis 
Authored: Wed Mar 19 11:38:54 2014 -0500
Committer: Jonathan Ellis 
Committed: Wed Mar 19 11:38:54 2014 -0500

--
 CHANGES.txt |  1 +
 doc/cql3/CQL.textile|  4 ++
 .../cassandra/cql3/functions/Functions.java |  1 +
 .../cassandra/cql3/functions/UuidFcts.java  | 42 
 4 files changed, 48 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/CHANGES.txt
--
diff --cc CHANGES.txt
index 159d242,41ec1d7..75f4cee
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,29 -1,5 +1,30 @@@
 -2.0.7
 +2.1.0-beta2
 + * Eliminate possibility of CL segment appearing twice in active list 
 +   (CASSANDRA-6557)
 + * Apply DONTNEED fadvise to commitlog segments (CASSANDRA-6759)
 + * Switch CRC component to Adler and include it for compressed sstables 
 +   (CASSANDRA-4165)
 + * Allow cassandra-stress to set compaction strategy options (CASSANDRA-6451)
 + * Add broadcast_rpc_address option to cassandra.yaml (CASSANDRA-5899)
 + * Auto reload GossipingPropertyFileSnitch config (CASSANDRA-5897)
 + * Fix overflow of memtable_total_space_in_mb (CASSANDRA-6573)
 + * Fix ABTC NPE and apply update function correctly (CASSANDRA-6692)
 + * Allow nodetool to use a file or prompt for password (CASSANDRA-6660)
 + * Fix AIOOBE when concurrently accessing ABSC (CASSANDRA-6742)
 + * Fix assertion error in ALTER TYPE RENAME (CASSANDRA-6705)
 + * Scrub should not always clear out repaired status (CASSANDRA-5351)
 + * Improve handling of range tombstone for wide partitions (CASSANDRA-6446)
 + * Fix ClassCastException for compact table with composites (CASSANDRA-6738)
 + * Fix potentially repairing with wrong nodes (CASSANDRA-6808)
 + * Change caching option syntax (CASSANDRA-6745)
 + * Fix stress to do proper counter reads (CASSANDRA-6835)
 + * Fix help message for stress counter_write (CASSANDRA-6824)
 + * Fix stress smart Thrift client to pick servers correctly (CASSANDRA-6848)
 + * Add logging levels (minimal, normal or verbose) to stress tool 
(CASSANDRA-6849)
 + * Fix race condition in Batch CLE (CASSANDRA-6860)
 + * Improve cleanup/scrub/upgradesstables failure handling (CASSANDRA-6774)
 +Merged from 2.0:
+  * Add uuid() function (CASSANDRA-6473)
   * Omit tombstones from schema digests (CASSANDRA-6862)
   * Include correct consistencyLevel in LWT timeout (CASSANDRA-6884)
   * Lower chances for losing new SSTables during nodetool refresh and

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/doc/cql3/CQL.textile
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a45fea8f/src/java/org/apache/cassandra/cql3/functions/Functions.java
--



git commit: Add UNLOGGED, COUNTER options to BATCH docs

2014-03-19 Thread tylerhobbs
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 300853232 -> 7e870018d


Add UNLOGGED, COUNTER options to BATCH docs

patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-6816


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

Branch: refs/heads/cassandra-1.2
Commit: 7e870018dc2b1b78cf1754056c260c77379d5b47
Parents: 3008532
Author: Tyler Hobbs 
Authored: Wed Mar 19 11:37:09 2014 -0500
Committer: Tyler Hobbs 
Committed: Wed Mar 19 11:37:09 2014 -0500

--
 CHANGES.txt  |  1 +
 doc/cql3/CQL.textile | 19 +++
 2 files changed, 16 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index f88345d..960b0e9 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 1.2.16
+ * Add UNLOGGED, COUNTER options to BATCH documentation (CASSANDRA-6816)
  * add extra SSL cipher suites (CASSANDRA-6613)
  * fix nodetool getsstables for blob PK (CASSANDRA-6803)
  * Add CMSClassUnloadingEnabled JVM option (CASSANDRA-6541)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7e870018/doc/cql3/CQL.textile
--
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index ecd3b7e..91e2625 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -536,7 +536,7 @@ h3(#batchStmt). BATCH
 __Syntax:__
 
 bc(syntax).. 
- ::= BEGIN BATCH
+ ::= BEGIN ( UNLOGGED | COUNTER ) BATCH
  ( USING  ( AND  )* )?
  ( ';'  )*
  APPLY BATCH
@@ -557,11 +557,22 @@ BEGIN BATCH
   DELETE name FROM users WHERE userid = 'user1';
 APPLY BATCH;
 
-The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It mainly serves 
two purposes:
-# it saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
-# all updates in a @BATCH@ belonging to a given partition key are performed 
atomically and in isolation
+The @BATCH@ statement group multiple modification statements 
(insertions/updates and deletions) into a single statement. It serves several 
purposes:
+# It saves network round-trips between the client and the server (and 
sometimes between the server coordinator and the replicas) when batching 
multiple updates.
+# All updates in a @BATCH@ belonging to a given partition key are performed in 
isolation.
+# By default, all operations in the batch are performed atomically.  See the 
notes on "@UNLOGGED@":#unloggedBatch for more details.
 Note however that the @BATCH@ statement only allows @UPDATE@, @INSERT@ and 
@DELETE@ statements and is _not_ a full analogue for SQL transactions.
 
+h4(#unloggedBatch). @UNLOGGED@
+
+By default, Cassandra uses a batch log to ensure all operations in a batch are 
applied atomically. (Note that the operations are still only isolated within a 
single partition.)
+
+There is a performance penalty for batch atomicity when a batch spans multiple 
partitions. If you do not want to incur this penalty, you can tell Cassandra to 
skip the batchlog with the @UNLOGGED@ option. If the @UNLOGGED@ option is used, 
operations are only atomic within a single partition.
+
+h4(#counterBatch). @COUNTER@
+
+Use the @COUNTER@ option for batched counter updates.  Unlike other updates in 
Cassandra, counter updates are not idempotent.
+
 h4(#batchOptions). @@
 
 @BATCH@ supports both the @TIMESTAMP@ option, with similar semantic to the one 
described in the "@UPDATE@":#updateOptions statement (the timestamp applies to 
all the statement inside the batch). However, if used, @TIMESTAMP@ *must not* 
be used in the statements within the batch.



[jira] [Updated] (CASSANDRA-6689) Partially Off Heap Memtables

2014-03-19 Thread Ryan McGuire (JIRA)

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

Ryan McGuire updated CASSANDRA-6689:


Labels: performance  (was: )

> Partially Off Heap Memtables
> 
>
> Key: CASSANDRA-6689
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6689
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Core
>Reporter: Benedict
>Assignee: Benedict
>  Labels: performance
> Fix For: 2.1 beta2
>
> Attachments: CASSANDRA-6689-small-changes.patch
>
>
> Move the contents of ByteBuffers off-heap for records written to a memtable.
> (See comments for details)



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Created] (CASSANDRA-6888) Store whether a counter sstable still use some local/remote shards in the sstable metadata

2014-03-19 Thread Sylvain Lebresne (JIRA)
Sylvain Lebresne created CASSANDRA-6888:
---

 Summary: Store whether a counter sstable still use some 
local/remote shards in the sstable metadata
 Key: CASSANDRA-6888
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6888
 Project: Cassandra
  Issue Type: Improvement
Reporter: Sylvain Lebresne
 Fix For: 2.1


CASSANDRA-6504 has made so we don't distinguish different type of shard in 
counters. Yet, even though we don't generate those local/remote type of shards, 
those won't disappear just by running upgradesstable, they need to be compacted 
away (and even then, they really only disappear if there has been a new update 
on the counter post-6504).

But we want to get rid of those ultimately, since they make things like 
CASSANDRA-6506 less optimal. Now, even though the final step of that remain to 
be discussed, the first step is probably to keep track of whether such shard 
still exist in the system or not. That part is simple, we can just store a 
boolean in the SSTableMetadata to say whether or not said sstable still has at 
least one Cell using such old shard type. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Resolved] (CASSANDRA-6104) Add additional limits in cassandra.conf provided by Debian package

2014-03-19 Thread Brandon Williams (JIRA)

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

Brandon Williams resolved CASSANDRA-6104.
-

   Resolution: Fixed
Fix Version/s: 2.1 beta2
   2.0.7
   1.2.16

Committed the address space change as unlimited, and nproc at the reasonable 
bound of 8096, since going beyond that would suggest that either you need HSHA, 
or mask a bug on our side.

> Add additional limits in cassandra.conf provided by Debian package
> --
>
> Key: CASSANDRA-6104
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6104
> Project: Cassandra
>  Issue Type: Bug
>  Components: Packaging
>Reporter: J.B. Langston
>Assignee: Brandon Williams
>Priority: Trivial
> Fix For: 1.2.16, 2.0.7, 2.1 beta2
>
>
> /etc/security/limits.d/cassandra.conf distributed with DSC deb/rpm packages 
> should contain additional settings. We have found these limits to be 
> necessary for some customers through various support tickets.
> {code}
> cassandra - memlock  unlimited
> cassandra - nofile  10
> cassandra - nproc 32768
> cassandra - as unlimited
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[05/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/cassandra-2.1
Commit: 91e4d22880b341882149013f5f4c1da6227481fc
Parents: f1f8384 3008532
Author: Brandon Williams 
Authored: Wed Mar 19 09:00:51 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:00:51 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[10/10] git commit: Merge branch 'cassandra-2.1' into trunk

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-2.1' into trunk


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

Branch: refs/heads/trunk
Commit: 51e41a7fbd7b5f740e3f4a73e485323012e99619
Parents: fcd791a 0ccee7f
Author: Brandon Williams 
Authored: Wed Mar 19 09:01:17 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:01:17 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[07/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/trunk
Commit: 91e4d22880b341882149013f5f4c1da6227481fc
Parents: f1f8384 3008532
Author: Brandon Williams 
Authored: Wed Mar 19 09:00:51 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:00:51 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[06/10] git commit: Merge branch 'cassandra-1.2' into cassandra-2.0

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-1.2' into cassandra-2.0


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

Branch: refs/heads/cassandra-2.0
Commit: 91e4d22880b341882149013f5f4c1da6227481fc
Parents: f1f8384 3008532
Author: Brandon Williams 
Authored: Wed Mar 19 09:00:51 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:00:51 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[04/10] git commit: Extend limits.conf in debian packaging.

2014-03-19 Thread brandonwilliams
Extend limits.conf in debian packaging.

Patch by brandonwilliams for CASSANDRA-6104


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

Branch: refs/heads/trunk
Commit: 3008532322c3d23058b87d1bc0f30aac637e6308
Parents: 3876eef
Author: Brandon Williams 
Authored: Wed Mar 19 08:59:33 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 08:59:33 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf
--
diff --git a/debian/cassandra.conf b/debian/cassandra.conf
index 987ba6e..72ede9e 100644
--- a/debian/cassandra.conf
+++ b/debian/cassandra.conf
@@ -1,3 +1,5 @@
 # Provided by the cassandra package
 cassandra  -  memlock  unlimited
 cassandra  -  nofile   10
+cassandra  -  as   unlimited
+cassandra  -  nproc8096



[09/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/trunk
Commit: 0ccee7f58cfbccd2f73aca847a32024eb25a338d
Parents: e23e57f 91e4d22
Author: Brandon Williams 
Authored: Wed Mar 19 09:01:05 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:01:05 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[03/10] git commit: Extend limits.conf in debian packaging.

2014-03-19 Thread brandonwilliams
Extend limits.conf in debian packaging.

Patch by brandonwilliams for CASSANDRA-6104


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

Branch: refs/heads/cassandra-2.1
Commit: 3008532322c3d23058b87d1bc0f30aac637e6308
Parents: 3876eef
Author: Brandon Williams 
Authored: Wed Mar 19 08:59:33 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 08:59:33 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf
--
diff --git a/debian/cassandra.conf b/debian/cassandra.conf
index 987ba6e..72ede9e 100644
--- a/debian/cassandra.conf
+++ b/debian/cassandra.conf
@@ -1,3 +1,5 @@
 # Provided by the cassandra package
 cassandra  -  memlock  unlimited
 cassandra  -  nofile   10
+cassandra  -  as   unlimited
+cassandra  -  nproc8096



[01/10] git commit: Extend limits.conf in debian packaging.

2014-03-19 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-1.2 3876eefd1 -> 300853232
  refs/heads/cassandra-2.0 f1f8384a0 -> 91e4d2288
  refs/heads/cassandra-2.1 e23e57fff -> 0ccee7f58
  refs/heads/trunk fcd791ae7 -> 51e41a7fb


Extend limits.conf in debian packaging.

Patch by brandonwilliams for CASSANDRA-6104


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

Branch: refs/heads/cassandra-1.2
Commit: 3008532322c3d23058b87d1bc0f30aac637e6308
Parents: 3876eef
Author: Brandon Williams 
Authored: Wed Mar 19 08:59:33 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 08:59:33 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf
--
diff --git a/debian/cassandra.conf b/debian/cassandra.conf
index 987ba6e..72ede9e 100644
--- a/debian/cassandra.conf
+++ b/debian/cassandra.conf
@@ -1,3 +1,5 @@
 # Provided by the cassandra package
 cassandra  -  memlock  unlimited
 cassandra  -  nofile   10
+cassandra  -  as   unlimited
+cassandra  -  nproc8096



[08/10] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1

2014-03-19 Thread brandonwilliams
Merge branch 'cassandra-2.0' into cassandra-2.1


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

Branch: refs/heads/cassandra-2.1
Commit: 0ccee7f58cfbccd2f73aca847a32024eb25a338d
Parents: e23e57f 91e4d22
Author: Brandon Williams 
Authored: Wed Mar 19 09:01:05 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 09:01:05 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--




[02/10] git commit: Extend limits.conf in debian packaging.

2014-03-19 Thread brandonwilliams
Extend limits.conf in debian packaging.

Patch by brandonwilliams for CASSANDRA-6104


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

Branch: refs/heads/cassandra-2.0
Commit: 3008532322c3d23058b87d1bc0f30aac637e6308
Parents: 3876eef
Author: Brandon Williams 
Authored: Wed Mar 19 08:59:33 2014 -0500
Committer: Brandon Williams 
Committed: Wed Mar 19 08:59:33 2014 -0500

--
 debian/cassandra.conf | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/30085323/debian/cassandra.conf
--
diff --git a/debian/cassandra.conf b/debian/cassandra.conf
index 987ba6e..72ede9e 100644
--- a/debian/cassandra.conf
+++ b/debian/cassandra.conf
@@ -1,3 +1,5 @@
 # Provided by the cassandra package
 cassandra  -  memlock  unlimited
 cassandra  -  nofile   10
+cassandra  -  as   unlimited
+cassandra  -  nproc8096



[jira] [Commented] (CASSANDRA-6781) ByteBuffer write() methods for serializing sstables

2014-03-19 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940475#comment-13940475
 ] 

Benedict commented on CASSANDRA-6781:
-

+1. Changes look good.

I should really setup Intellij to do that tidying up for me :-|

> ByteBuffer write() methods for serializing sstables
> ---
>
> Key: CASSANDRA-6781
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6781
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Benedict
>Assignee: Benedict
>Priority: Minor
> Fix For: 2.1 beta2
>
>
> As mentioned in CASSANDRA-6689, there may be some performance issues with 
> writing sstables from offheap memtables. This is mostly plausibly caused by 
> the single-byte-at-a-time write path for ByteBuffers, as we use DataOutput 
> which only accepts byte[].
> I propose extending DataOutput to include ByteBuffer methods, and to use this 
> extended interface for serializing sstables instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6781) ByteBuffer write() methods for serializing sstables

2014-03-19 Thread Marcus Eriksson (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940459#comment-13940459
 ] 

Marcus Eriksson commented on CASSANDRA-6781:


this looks good to me, rebased, squashed and pushed; 
https://github.com/krummas/cassandra/commits/bes/6781 - with a small commit on 
top, mostly removing unused imports and files

> ByteBuffer write() methods for serializing sstables
> ---
>
> Key: CASSANDRA-6781
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6781
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Benedict
>Assignee: Benedict
>Priority: Minor
> Fix For: 2.1 beta2
>
>
> As mentioned in CASSANDRA-6689, there may be some performance issues with 
> writing sstables from offheap memtables. This is mostly plausibly caused by 
> the single-byte-at-a-time write path for ByteBuffers, as we use DataOutput 
> which only accepts byte[].
> I propose extending DataOutput to include ByteBuffer methods, and to use this 
> extended interface for serializing sstables instead.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6733) Upgrade of 1.2.11 to 2.0.5 make IllegalArgumentException in Buffer.limit on read of a super column family

2014-03-19 Thread JIRA

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940437#comment-13940437
 ] 

Nicolas Lalevée commented on CASSANDRA-6733:


I tried again the upgrade but with 2.0.6 on our test cluster, it was not 
straight forward (I'll ask for some insights on cassandra-user), but it was 
successful.

> Upgrade of 1.2.11 to 2.0.5 make IllegalArgumentException in Buffer.limit on 
> read of a super column family
> -
>
> Key: CASSANDRA-6733
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6733
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Nicolas Lalevée
>Assignee: Sylvain Lebresne
> Fix For: 2.0.6
>
> Attachments: 6733.txt, QaUser_user_view_node1.tgz, 
> QaUser_user_view_node2.tgz
>
>
> We have a super column family which was first created with a 1.0.x. Then 
> upgraded to 1.1.x, then to 1.2.11, and now to 2.0.5.
> {noformat}
> cqlsh:QaUser> desc table user_view;
> CREATE TABLE user_view (
>   key bigint,
>   column1 varint,
>   column2 text,
>   value counter,
>   PRIMARY KEY (key, column1, column2)
> ) WITH COMPACT STORAGE AND
>   bloom_filter_fp_chance=0.01 AND
>   caching='KEYS_ONLY' AND
>   comment='' AND
>   dclocal_read_repair_chance=0.00 AND
>   gc_grace_seconds=864000 AND
>   index_interval=128 AND
>   read_repair_chance=1.00 AND
>   replicate_on_write='true' AND
>   populate_io_cache_on_flush='false' AND
>   default_time_to_live=0 AND
>   speculative_retry='99.0PERCENTILE' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'SnappyCompressor'};
> {noformat}
> With cqlsh, the following query was doing a timeout:
> {noformat}
> select * from user_view where key = 3 and column1 = 1 and column2 = 
> '20130218';
> {noformat}
> In the log of cassandra, we could read:
> {noformat}
> ERROR [ReadStage:1385] 2014-02-19 14:45:19,549 CassandraDaemon.java (line 
> 192) Exception in thread Thread[ReadStage:1385,5,main]
> java.lang.IllegalArgumentException
> at java.nio.Buffer.limit(Buffer.java:267)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.getBytes(AbstractCompositeType.java:55)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.getWithShortLength(AbstractCompositeType.java:64)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:82)
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
> at 
> org.apache.cassandra.db.marshal.AbstractType$1.compare(AbstractType.java:63)
> at 
> org.apache.cassandra.db.marshal.AbstractType$1.compare(AbstractType.java:60)
> at java.util.Collections.indexedBinarySearch(Collections.java:377)
> at java.util.Collections.binarySearch(Collections.java:365)
> at 
> org.apache.cassandra.io.sstable.IndexHelper.indexFor(IndexHelper.java:144)
> at 
> org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.setNextSlice(IndexedSliceReader.java:262)
> at 
> org.apache.cassandra.db.columniterator.IndexedSliceReader$IndexedBlockFetcher.(IndexedSliceReader.java:255)
> at 
> org.apache.cassandra.db.columniterator.IndexedSliceReader.(IndexedSliceReader.java:91)
> at 
> org.apache.cassandra.db.columniterator.SSTableSliceIterator.createReader(SSTableSliceIterator.java:65)
> at 
> org.apache.cassandra.db.columniterator.SSTableSliceIterator.(SSTableSliceIterator.java:42)
> at 
> org.apache.cassandra.db.filter.SliceQueryFilter.getSSTableColumnIterator(SliceQueryFilter.java:167)
> at 
> org.apache.cassandra.db.filter.QueryFilter.getSSTableColumnIterator(QueryFilter.java:62)
> at 
> org.apache.cassandra.db.CollationController.collectAllData(CollationController.java:250)
> at 
> org.apache.cassandra.db.CollationController.getTopLevelColumns(CollationController.java:53)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.getTopLevelColumns(ColumnFamilyStore.java:1560)
> at 
> org.apache.cassandra.db.ColumnFamilyStore.getColumnFamily(ColumnFamilyStore.java:1379)
> at org.apache.cassandra.db.Keyspace.getRow(Keyspace.java:327)
> at 
> org.apache.cassandra.db.SliceFromReadCommand.getRow(SliceFromReadCommand.java:65)
> at 
> org.apache.cassandra.db.ReadVerbHandler.doVerb(ReadVerbHandler.java:47)
> at 
> org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:60)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(T

[jira] [Commented] (CASSANDRA-6837) Batch CAS does not support LOCAL_SERIAL

2014-03-19 Thread Jonathan Ellis (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940435#comment-13940435
 ] 

Jonathan Ellis commented on CASSANDRA-6837:
---

fair enough

> Batch CAS does not support LOCAL_SERIAL
> ---
>
> Key: CASSANDRA-6837
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6837
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Nicolas Favre-Felix
>Assignee: Sylvain Lebresne
> Fix For: 2.0.7
>
> Attachments: 6837.txt
>
>
> The batch CAS feature introduced in Cassandra 2.0.6 does not support the 
> LOCAL_SERIAL consistency level, and always uses SERIAL.
> Create a cluster with 4 nodes with the following topology:
> {code}
> Datacenter: DC2
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.3  269 KB 256 26.3%  ae92d997-6042-42d9-b447-943080569742 
>  RAC1
> UN  127.0.0.4  197.81 KB  256 25.1%  3edc92d7-9d1b-472a-8452-24dddbc4502c 
>  RAC1
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.1  226.92 KB  256 24.8%  dbc17bd7-1ede-47a2-9b31-6063752d6eb3 
>  RAC1
> UN  127.0.0.2  179.27 KB  256 23.7%  bb0ad285-34d2-4989-a664-b068986ab6fa 
>  RAC1
> {code}
> In cqlsh:
> {code}
> cqlsh> CREATE KEYSPACE foo WITH replication = {'class': 
> 'NetworkTopologyStrategy', 'DC1': 2, 'DC2': 2};
> cqlsh> USE foo;
> cqlsh:foo> CREATE TABLE bar (x text, y bigint, z bigint, t bigint, PRIMARY 
> KEY(x,y));
> {code}
> Kill nodes 127.0.0.3 and 127.0.0.4:
> {code}
> Datacenter: DC2
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> DN  127.0.0.3  262.37 KB  256 26.3%  ae92d997-6042-42d9-b447-943080569742 
>  RAC1
> DN  127.0.0.4  208.04 KB  256 25.1%  3edc92d7-9d1b-472a-8452-24dddbc4502c 
>  RAC1
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.1  214.82 KB  256 24.8%  dbc17bd7-1ede-47a2-9b31-6063752d6eb3 
>  RAC1
> UN  127.0.0.2  178.23 KB  256 23.7%  bb0ad285-34d2-4989-a664-b068986ab6fa 
>  RAC1
> {code}
> Connect to 127.0.0.1 in DC1 and run a CAS batch at 
> CL.LOCAL_SERIAL+LOCAL_QUORUM:
> {code}
> final Cluster cluster = new Cluster.Builder()
> .addContactPoint("127.0.0.1")
> .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy("DC1"))
> .build();
> final Session session = cluster.connect("foo");
> Batch batch = QueryBuilder.batch();
> batch.add(new SimpleStatement("INSERT INTO bar (x,y,z) VALUES ('abc', 
> 123, 1) IF NOT EXISTS"));
> batch.add(new SimpleStatement("UPDATE bar SET t=2 WHERE x='abc' AND 
> y=123"));
> batch.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM);
> batch.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL);
> session.execute(batch);
> {code}
> The batch fails with:
> {code}
> Caused by: com.datastax.driver.core.exceptions.UnavailableException: Not 
> enough replica available for query at consistency SERIAL (3 required but only 
> 2 alive)
>   at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:44)
>   at com.datastax.driver.core.Responses$Error$1.decode(Responses.java:33)
>   at 
> com.datastax.driver.core.Message$ProtocolDecoder.decode(Message.java:182)
>   at 
> org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:66)
>   ... 21 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6870) Transform operation

2014-03-19 Thread Edward Capriolo (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6870?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940425#comment-13940425
 ] 

Edward Capriolo commented on CASSANDRA-6870:


I am going to add one more feature. We can support nested functions by creating 
temporary columns 

Concat a,b -> c 
Trim c -> d

All we need to do is add a bol to the transform that states if we wish to keep 
the column at the end of the transform.



> Transform operation
> ---
>
> Key: CASSANDRA-6870
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6870
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Edward Capriolo
>Assignee: Edward Capriolo
>Priority: Minor
>
> Compare and swap uses paxos to only update a value only if some criteria is 
> met. If I understand correctly we should be able to use this feature to 
> provide a wider variety of server side operations. 
> For example inside a paxos transaction performing a slice and then using a 
> function to manipulate the slice. You could accomplish features like append 
> and increment this way without user needing to know the current value.
> I took a stab at doing this. I **think** I did it correctly. Comments welcome.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6883) stress read fails with IOException "Data returned was not validated"

2014-03-19 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-6883:


Attachment: 6883.txt

> stress read fails with IOException "Data returned was not validated"
> 
>
> Key: CASSANDRA-6883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6883
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: ccm 3 node cluster, java 1.7.0_51
> cassandra 2.1 branch -- 615612f61566
>Reporter: Russ Hatch
> Fix For: 2.1 beta2
>
> Attachments: 6883.txt
>
>
> I'm working to do some basic testing of read/write with the new stress. 
> First, I populate data using write like so:
> {noformat}
> rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress write 
> n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema 
> replication\(factor=3\) -rate threads=50
> {noformat}
> Then I attempt a read test, and this happens:
> {noformat}
> rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress read 
> n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema 
> replication\(factor=3\) -rate threads=50
> Warming up READ with 5 iterations...
> INFO  19:38:14 New Cassandra host /127.0.0.3 added
> INFO  19:38:14 New Cassandra host /127.0.0.2 added
> Connected to cluster: test_stress
> Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
> Datatacenter: datacenter1; Host: /127.0.0.2; Rack: rack1
> Datatacenter: datacenter1; Host: /127.0.0.3; Rack: rack1
> java.io.IOException: Operation [11055] x0 key 01 
> (0x30303030303030303031) Data returned was not validated
>   at org.apache.cassandra.stress.Operation.error(Operation.java:298)
>   at 
> org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276)
>   at 
> org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46)
>   at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304)
> Sleeping 2s...
> Running READ with 50 threads  for 100 iterations
> ops   ,op/s,adj op/s,   key/s,mean, med, .95, .99,
> .999, max,   time,   stderr
> 11287 ,   11286,   11286,   11286, 4.7, 3.8,11.9,21.8,
> 34.0,52.9,1.0,  0.0
> 23263 ,   11764,   11764,   11764, 4.3, 3.5,10.4,18.1,
> 29.8,51.8,2.0,  0.0
> 35300 ,   11889,   11889,   11889, 4.2, 3.7, 9.6,15.3,
> 27.3,40.0,3.0,  0.01467
> 47239 ,   11737,   11737,   11737, 4.3, 3.7,10.1,17.0,
> 26.9,47.7,4.0,  0.01289
> 59140 ,   11729,   11729,   11729, 4.3, 3.8, 9.6,15.1,
> 25.7,47.9,5.1,  0.00979
> java.io.IOException: Operation [66434] x0 key 01 
> (0x30303030303030303031) Data returned was not validated
>   at org.apache.cassandra.stress.Operation.error(Operation.java:298)
>   at 
> org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276)
>   at 
> org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46)
>   at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304)
> 66584 ,   11952,   11952,   11952, 4.2, 3.6, 9.9,15.7,
> 24.7,64.9,5.7,  0.00788
> FAILURE
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6883) stress read fails with IOException "Data returned was not validated"

2014-03-19 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940392#comment-13940392
 ] 

Benedict commented on CASSANDRA-6883:
-

Yes: Looks like I was using inclusive bounds to construct the apache 
UniformRealDistribution, when its upper bound is exclusive.

The reason it failed, however, is because the writer writes a random prefix of 
columns, whereas the reader reads a random subset of columns, for reasons I 
won't go into - this can be changed, but for now is probably not worth the 
effort.

Attaching simply patch

> stress read fails with IOException "Data returned was not validated"
> 
>
> Key: CASSANDRA-6883
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6883
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
> Environment: ccm 3 node cluster, java 1.7.0_51
> cassandra 2.1 branch -- 615612f61566
>Reporter: Russ Hatch
>
> I'm working to do some basic testing of read/write with the new stress. 
> First, I populate data using write like so:
> {noformat}
> rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress write 
> n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema 
> replication\(factor=3\) -rate threads=50
> {noformat}
> Then I attempt a read test, and this happens:
> {noformat}
> rhatch@whatup:~/git/cstar/cassandra$ tools/bin/cassandra-stress read 
> n=100 CL=ONE -key dist=FIXED\(1\) -col n=UNIFORM\(1..100\) -schema 
> replication\(factor=3\) -rate threads=50
> Warming up READ with 5 iterations...
> INFO  19:38:14 New Cassandra host /127.0.0.3 added
> INFO  19:38:14 New Cassandra host /127.0.0.2 added
> Connected to cluster: test_stress
> Datatacenter: datacenter1; Host: localhost/127.0.0.1; Rack: rack1
> Datatacenter: datacenter1; Host: /127.0.0.2; Rack: rack1
> Datatacenter: datacenter1; Host: /127.0.0.3; Rack: rack1
> java.io.IOException: Operation [11055] x0 key 01 
> (0x30303030303030303031) Data returned was not validated
>   at org.apache.cassandra.stress.Operation.error(Operation.java:298)
>   at 
> org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276)
>   at 
> org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46)
>   at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304)
> Sleeping 2s...
> Running READ with 50 threads  for 100 iterations
> ops   ,op/s,adj op/s,   key/s,mean, med, .95, .99,
> .999, max,   time,   stderr
> 11287 ,   11286,   11286,   11286, 4.7, 3.8,11.9,21.8,
> 34.0,52.9,1.0,  0.0
> 23263 ,   11764,   11764,   11764, 4.3, 3.5,10.4,18.1,
> 29.8,51.8,2.0,  0.0
> 35300 ,   11889,   11889,   11889, 4.2, 3.7, 9.6,15.3,
> 27.3,40.0,3.0,  0.01467
> 47239 ,   11737,   11737,   11737, 4.3, 3.7,10.1,17.0,
> 26.9,47.7,4.0,  0.01289
> 59140 ,   11729,   11729,   11729, 4.3, 3.8, 9.6,15.1,
> 25.7,47.9,5.1,  0.00979
> java.io.IOException: Operation [66434] x0 key 01 
> (0x30303030303030303031) Data returned was not validated
>   at org.apache.cassandra.stress.Operation.error(Operation.java:298)
>   at 
> org.apache.cassandra.stress.Operation.timeWithRetry(Operation.java:276)
>   at 
> org.apache.cassandra.stress.operations.ThriftReader.run(ThriftReader.java:46)
>   at 
> org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:304)
> 66584 ,   11952,   11952,   11952, 4.2, 3.6, 9.9,15.7,
> 24.7,64.9,5.7,  0.00788
> FAILURE
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6837) Batch CAS does not support LOCAL_SERIAL

2014-03-19 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940383#comment-13940383
 ] 

Sylvain Lebresne commented on CASSANDRA-6837:
-

At the risk of sounding obtuse, we use "serial_consistency" both in thrift and 
in the native protocol spec. And truth is, while maybe not perfect, I do think 
it's better than paxos_consistency because that would be leaking implementation 
details and we've always said that the use of Paxos was an implementation 
detail we didn't wanted to leak. It also happen that I don't really see the 
problem with serial_consistency. The comment in cassandra.thrift describe it 
this way
{quote}
The first one, serial_consistency_level, simply indicates the level of 
serialization required. This can be either ConsistencyLevel.SERIAL or 
ConsistencyLevel.LOCAL_SERIAL
{quote}
and to me that sounds relatively sensible. Of course, we can call it "serial 
consistency" externally but "paxos consistency" internally, but that feels a 
bit inconsistent for no good reason.

Anyway, all this to say that imo serial_consistency is better than 
paxos_consistency at least externally because it doesn't leak implementation 
details, and that it follows to me that there is no point in making it 
different internally. Nor do I think that serial_consistency is so bad that we 
should bother finding something else. Those arguments and opinion being made, 
if you still think it's worth renaming, I won't fight it, and feel free to go 
ahead. It's orthogonal to this issue however, the patch here didn't introduced 
the serial_consistency naming.

> Batch CAS does not support LOCAL_SERIAL
> ---
>
> Key: CASSANDRA-6837
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6837
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Reporter: Nicolas Favre-Felix
>Assignee: Sylvain Lebresne
> Fix For: 2.0.7
>
> Attachments: 6837.txt
>
>
> The batch CAS feature introduced in Cassandra 2.0.6 does not support the 
> LOCAL_SERIAL consistency level, and always uses SERIAL.
> Create a cluster with 4 nodes with the following topology:
> {code}
> Datacenter: DC2
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.3  269 KB 256 26.3%  ae92d997-6042-42d9-b447-943080569742 
>  RAC1
> UN  127.0.0.4  197.81 KB  256 25.1%  3edc92d7-9d1b-472a-8452-24dddbc4502c 
>  RAC1
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.1  226.92 KB  256 24.8%  dbc17bd7-1ede-47a2-9b31-6063752d6eb3 
>  RAC1
> UN  127.0.0.2  179.27 KB  256 23.7%  bb0ad285-34d2-4989-a664-b068986ab6fa 
>  RAC1
> {code}
> In cqlsh:
> {code}
> cqlsh> CREATE KEYSPACE foo WITH replication = {'class': 
> 'NetworkTopologyStrategy', 'DC1': 2, 'DC2': 2};
> cqlsh> USE foo;
> cqlsh:foo> CREATE TABLE bar (x text, y bigint, z bigint, t bigint, PRIMARY 
> KEY(x,y));
> {code}
> Kill nodes 127.0.0.3 and 127.0.0.4:
> {code}
> Datacenter: DC2
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> DN  127.0.0.3  262.37 KB  256 26.3%  ae92d997-6042-42d9-b447-943080569742 
>  RAC1
> DN  127.0.0.4  208.04 KB  256 25.1%  3edc92d7-9d1b-472a-8452-24dddbc4502c 
>  RAC1
> Datacenter: DC1
> ===
> Status=Up/Down
> |/ State=Normal/Leaving/Joining/Moving
> --  AddressLoad   Tokens  Owns   Host ID  
>  Rack
> UN  127.0.0.1  214.82 KB  256 24.8%  dbc17bd7-1ede-47a2-9b31-6063752d6eb3 
>  RAC1
> UN  127.0.0.2  178.23 KB  256 23.7%  bb0ad285-34d2-4989-a664-b068986ab6fa 
>  RAC1
> {code}
> Connect to 127.0.0.1 in DC1 and run a CAS batch at 
> CL.LOCAL_SERIAL+LOCAL_QUORUM:
> {code}
> final Cluster cluster = new Cluster.Builder()
> .addContactPoint("127.0.0.1")
> .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy("DC1"))
> .build();
> final Session session = cluster.connect("foo");
> Batch batch = QueryBuilder.batch();
> batch.add(new SimpleStatement("INSERT INTO bar (x,y,z) VALUES ('abc', 
> 123, 1) IF NOT EXISTS"));
> batch.add(new SimpleStatement("UPDATE bar SET t=2 WHERE x='abc' AND 
> y=123"));
> batch.setConsistencyLevel(ConsistencyLevel.LOCAL_QUORUM);
> batch.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL);
> session.execute(batch);
> {code}
> The batch fails with:
> {code}
> Caused by: com.datastax.driver.core.exceptions.UnavailableException

[jira] [Commented] (CASSANDRA-6311) Add CqlRecordReader to take advantage of native CQL pagination

2014-03-19 Thread Sylvain Lebresne (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940367#comment-13940367
 ] 

Sylvain Lebresne commented on CASSANDRA-6311:
-

Tried to commit this but v9 doesn't seem to apply cleanly on the current 
cassandra-2.0 branch (unless that's meant to be 2.1 only but that's not what 
the 'fix version' says so...). As a side node, we should update the driver 
dependency to 2.0.1 instead of 2.0.0-rc2.

> Add CqlRecordReader to take advantage of native CQL pagination
> --
>
> Key: CASSANDRA-6311
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6311
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Hadoop
>Reporter: Alex Liu
>Assignee: Alex Liu
> Fix For: 2.0.7
>
> Attachments: 6311-v3-2.0-branch.txt, 6311-v4.txt, 
> 6311-v5-2.0-branch.txt, 6311-v6-2.0-branch.txt, 6311-v7.txt, 6311-v8.txt, 
> 6311-v9.txt, 6331-2.0-branch.txt, 6331-v2-2.0-branch.txt
>
>
> Since the latest Cql pagination is done and it should be more efficient, so 
> we need update CqlPagingRecordReader to use it instead of the custom thrift 
> paging.



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6783) Collections should have a proper compare() method for UDT

2014-03-19 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-6783:


Attachment: 6783-2.txt

Can't seem to get this one right, can I? Updated v2 to fix this.

> Collections should have a proper compare() method for UDT
> -
>
> Key: CASSANDRA-6783
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6783
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 2.1 beta2
>
> Attachments: 6783-2.txt, 6783.txt
>
>
> So far, ListType, SetType and MapType don't have a proper implementation of 
> compare() (they throw UnsupportedOperationException) because we haven't need 
> one since as far as the cell comparator is concenred, only parts of a 
> collection ends up in the comparator and need to be compared, but the full 
> collection itself does not.
> But with UDT can nest a collection and that sometimes require to be able to 
> compare them. Typically, I pushed a dtest 
> [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f]
>  that ends up throwing:
> {noformat}
> java.lang.UnsupportedOperationException: CollectionType should not be use 
> directly as a comparator
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
>  ~[main/:na]
> at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45]
> at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45]
> at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45]
> at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) 
> ~[main/:na]
> at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201)
>  ~[main/:na]
> ...
> {noformat}
> Note that this stack doesn't involve cell name comparison at all, it's just 
> that CQL3 sometimes uses a SortedSet underneath to deal with set literals 
> (since internal sets are sorted by their value), and so when a set contains 
> UDT that has set themselves, we need the collection comparison. That being 
> said, for some cases like having a UDT as a map key, we do would need 
> collections to be comparable for the purpose of cell name comparison.
> Attaching relatively simple patch. The patch is a bit bigger than it should 
> be because while adding the 3 simple compare() method, I realized that we had 
> methods to read a short length (2 unsigned short) from a ByteBuffer 
> duplicated all over the place and that it was time to consolidate that in 
> ByteBufferUtil where it should have been from day one (thus removing the 
> duplication). I can separate that trivial refactor in a separate patch if we 
> really need to, but really, the new stuff is the compare() method 
> implementation in ListType, SetType and MapType and the rest is a bit of 
> trivial cleanup. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Updated] (CASSANDRA-6783) Collections should have a proper compare() method for UDT

2014-03-19 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne updated CASSANDRA-6783:


Attachment: (was: 6783-2.txt)

> Collections should have a proper compare() method for UDT
> -
>
> Key: CASSANDRA-6783
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6783
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
> Fix For: 2.1 beta2
>
> Attachments: 6783.txt
>
>
> So far, ListType, SetType and MapType don't have a proper implementation of 
> compare() (they throw UnsupportedOperationException) because we haven't need 
> one since as far as the cell comparator is concenred, only parts of a 
> collection ends up in the comparator and need to be compared, but the full 
> collection itself does not.
> But with UDT can nest a collection and that sometimes require to be able to 
> compare them. Typically, I pushed a dtest 
> [here|https://github.com/riptano/cassandra-dtest/commit/290e9496d1b2c45158c7d7f5487d09ba48897a7f]
>  that ends up throwing:
> {noformat}
> java.lang.UnsupportedOperationException: CollectionType should not be use 
> directly as a comparator
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:72)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.CollectionType.compare(CollectionType.java:37)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractType.compareCollectionMembers(AbstractType.java:174)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:101)
>  ~[main/:na]
> at 
> org.apache.cassandra.db.marshal.AbstractCompositeType.compare(AbstractCompositeType.java:35)
>  ~[main/:na]
> at java.util.TreeMap.compare(TreeMap.java:1188) ~[na:1.7.0_45]
> at java.util.TreeMap.put(TreeMap.java:531) ~[na:1.7.0_45]
> at java.util.TreeSet.add(TreeSet.java:255) ~[na:1.7.0_45]
> at org.apache.cassandra.cql3.Sets$DelayedValue.bind(Sets.java:205) 
> ~[main/:na]
> at org.apache.cassandra.cql3.Sets$Literal.prepare(Sets.java:91) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.UserTypes$Literal.prepare(UserTypes.java:60) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.Operation$SetElement.prepare(Operation.java:221) 
> ~[main/:na]
> at 
> org.apache.cassandra.cql3.statements.UpdateStatement$ParsedUpdate.prepareInternal(UpdateStatement.java:201)
>  ~[main/:na]
> ...
> {noformat}
> Note that this stack doesn't involve cell name comparison at all, it's just 
> that CQL3 sometimes uses a SortedSet underneath to deal with set literals 
> (since internal sets are sorted by their value), and so when a set contains 
> UDT that has set themselves, we need the collection comparison. That being 
> said, for some cases like having a UDT as a map key, we do would need 
> collections to be comparable for the purpose of cell name comparison.
> Attaching relatively simple patch. The patch is a bit bigger than it should 
> be because while adding the 3 simple compare() method, I realized that we had 
> methods to read a short length (2 unsigned short) from a ByteBuffer 
> duplicated all over the place and that it was time to consolidate that in 
> ByteBufferUtil where it should have been from day one (thus removing the 
> duplication). I can separate that trivial refactor in a separate patch if we 
> really need to, but really, the new stuff is the compare() method 
> implementation in ListType, SetType and MapType and the rest is a bit of 
> trivial cleanup. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (CASSANDRA-6886) cassandra-stress currently uses thrift by default

2014-03-19 Thread Benedict (JIRA)

[ 
https://issues.apache.org/jira/browse/CASSANDRA-6886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940361#comment-13940361
 ] 

Benedict commented on CASSANDRA-6886:
-

bq. Well, JMeter can be used in non-GUI /command line mode as well

Well, I think you have to deploy a pre-constructed test plan, that is not 
easily tweaked once deployed, which is why I said "more easily" :)

> cassandra-stress currently uses thrift by default
> -
>
> Key: CASSANDRA-6886
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6886
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tools
>Reporter: Russ Hatch
>Priority: Minor
>
> Since thrift will be frozen, and cql3 native is the preferred alternative, 
> can stress be updated to default to cql3 native?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


  1   2   >