[jira] [Updated] (CASSANDRA-8547) Make RangeTombstone.Tracker.isDeleted() faster

2015-01-06 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8547:

Reviewer: Sylvain Lebresne  (was: Benedict)

 Make RangeTombstone.Tracker.isDeleted() faster
 --

 Key: CASSANDRA-8547
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8547
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
 Environment: 2.0.11
Reporter: Dominic Letz
Assignee: Dominic Letz
 Fix For: 2.1.3

 Attachments: Selection_044.png, cassandra-2.0.11-8547.txt, 
 cassandra-2.1-8547.txt, rangetombstone.tracker.txt


 During compaction and repairs with many tombstones an exorbitant amount of 
 time is spend in RangeTombstone.Tracker.isDeleted().
 The amount of time spend there can be so big that compactions and repairs 
 look stalled and the time remaining time estimated frozen at the same value 
 for days.
 Using visualvm I've been sample profiling the code during execution and both 
 in Compaction as well as during repairs found this. (point in time backtraces 
 attached)
 Looking at the code the problem is obviously the linear scanning:
 {code}
 public boolean isDeleted(Column column)
 {
 for (RangeTombstone tombstone : ranges)
 {
 if (comparator.compare(column.name(), tombstone.min) = 0
  comparator.compare(column.name(), tombstone.max) = 0
  tombstone.maxTimestamp() = column.timestamp())
 {
 return true;
 }
 }
 return false;
 }
 {code}
 I would like to propose to change this and instead use a sorted list (e.g. 
 RangeTombstoneList) here instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8547) Make RangeTombstone.Tracker.isDeleted() faster

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8547:
-

This looks like something [~slebresne] should take a look at.

 Make RangeTombstone.Tracker.isDeleted() faster
 --

 Key: CASSANDRA-8547
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8547
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
 Environment: 2.0.11
Reporter: Dominic Letz
Assignee: Dominic Letz
 Fix For: 2.1.3

 Attachments: Selection_044.png, cassandra-2.0.11-8547.txt, 
 cassandra-2.1-8547.txt, rangetombstone.tracker.txt


 During compaction and repairs with many tombstones an exorbitant amount of 
 time is spend in RangeTombstone.Tracker.isDeleted().
 The amount of time spend there can be so big that compactions and repairs 
 look stalled and the time remaining time estimated frozen at the same value 
 for days.
 Using visualvm I've been sample profiling the code during execution and both 
 in Compaction as well as during repairs found this. (point in time backtraces 
 attached)
 Looking at the code the problem is obviously the linear scanning:
 {code}
 public boolean isDeleted(Column column)
 {
 for (RangeTombstone tombstone : ranges)
 {
 if (comparator.compare(column.name(), tombstone.min) = 0
  comparator.compare(column.name(), tombstone.max) = 0
  tombstone.maxTimestamp() = column.timestamp())
 {
 return true;
 }
 }
 return false;
 }
 {code}
 I would like to propose to change this and instead use a sorted list (e.g. 
 RangeTombstoneList) here instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8552) Large compactions run out of off-heap RAM

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8552:
-

[~philipthompson] could we try to reproduce ourselves, since Brent has 
navigated around the problem for the moment? It would be great to figure this 
out and fix for 2.1.3

 Large compactions run out of off-heap RAM
 -

 Key: CASSANDRA-8552
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8552
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 14.4 
 AWS EC2
 12 m1.xlarge nodes [4 cores, 16GB RAM, 1TB storage (251GB Used)]
 Java build 1.7.0_55-b13 and build 1.8.0_25-b17
Reporter: Brent Haines
Assignee: Benedict
Priority: Blocker
 Fix For: 2.1.3

 Attachments: Screen Shot 2015-01-02 at 9.36.11 PM.png, fhandles.log, 
 freelog.log, lsof.txt, meminfo.txt, sysctl.txt, system.log


 We have a large table of storing, effectively event logs and a pair of 
 denormalized tables for indexing.
 When updating from 2.0 to 2.1 we saw performance improvements, but some 
 random and silent crashes during nightly repairs. We lost a node (totally 
 corrupted) and replaced it. That node has never stabilized -- it simply can't 
 finish the compactions. 
 Smaller compactions finish. Larger compactions, like these two never finish - 
 {code}
 pending tasks: 48
compaction type   keyspace table completed total   
  unit   progress
 Compaction   data   stories   16532973358   75977993784   
 bytes 21.76%
 Compaction   data   stories_by_text   10593780658   38555048812   
 bytes 27.48%
 Active compaction remaining time :   0h10m51s
 {code}
 We are not getting exceptions and are not running out of heap space. The 
 Ubuntu OOM killer is reaping the process after all of the memory is consumed. 
 We watch memory in the opscenter console and it will grow. If we turn off the 
 OOM killer for the process, it will run until everything else is killed 
 instead and then the kernel panics.
 We have the following settings configured: 
 2G Heap
 512M New
 {code}
 memtable_heap_space_in_mb: 1024
 memtable_offheap_space_in_mb: 1024
 memtable_allocation_type: heap_buffers
 commitlog_total_space_in_mb: 2048
 concurrent_compactors: 1
 compaction_throughput_mb_per_sec: 128
 {code}
 The compaction strategy is leveled (these are read-intensive tables that are 
 rarely updated)
 I have tried every setting, every option and I have the system where the MTBF 
 is about an hour now, but we never finish compacting because there are some 
 large compactions pending. None of the GC tools or settings help because it 
 is not a GC problem. It is an off-heap memory problem.
 We are getting these messages in our syslog 
 {code}
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219527] BUG: Bad page map in 
 process java  pte:0320 pmd:2d6fa5067
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219545] addr:7fb820be3000 
 vm_flags:0870 anon_vma:  (null) mapping:  (null) 
 index:7fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219556] CPU: 3 PID: 27344 
 Comm: java Tainted: GB3.13.0-24-generic #47-Ubuntu
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219559]  880028510e40 
 88020d43da98 81715ac4 7fb820be3000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219565]  88020d43dae0 
 81174183 0320 0007fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219568]  8802d6fa5f18 
 0320 7fb820be3000 7fb820be4000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219572] Call Trace:
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219584]  [81715ac4] 
 dump_stack+0x45/0x56
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219591]  [81174183] 
 print_bad_pte+0x1a3/0x250
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219594]  [81175439] 
 vm_normal_page+0x69/0x80
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219598]  [8117580b] 
 unmap_page_range+0x3bb/0x7f0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219602]  [81175cc1] 
 unmap_single_vma+0x81/0xf0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219605]  [81176d39] 
 unmap_vmas+0x49/0x90
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219610]  [8117feec] 
 exit_mmap+0x9c/0x170
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219617]  [8110fcf3] 
 ? __delayacct_add_tsk+0x153/0x170
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219621]  [8106482c] 
 mmput+0x5c/0x120
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219625]  [81069bbc] 
 do_exit+0x26c/0xa50
 Jan  2 07:06:00 ip-10-0-2-226 kernel: 

[jira] [Commented] (CASSANDRA-6246) EPaxos

2015-01-06 Thread sankalp kohli (JIRA)

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

sankalp kohli commented on CASSANDRA-6246:
--

I am a little confused as in how you will use epoch to make sure instances are 
executed on all replicas when incrementing? 

 EPaxos
 --

 Key: CASSANDRA-6246
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6246
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Blake Eggleston
Priority: Minor

 One reason we haven't optimized our Paxos implementation with Multi-paxos is 
 that Multi-paxos requires leader election and hence, a period of 
 unavailability when the leader dies.
 EPaxos is a Paxos variant that requires (1) less messages than multi-paxos, 
 (2) is particularly useful across multiple datacenters, and (3) allows any 
 node to act as coordinator: 
 http://sigops.org/sosp/sosp13/papers/p358-moraru.pdf
 However, there is substantial additional complexity involved if we choose to 
 implement it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8546) RangeTombstoneList becoming bottleneck on tombstone heavy tasks

2015-01-06 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8546:

Assignee: (was: Benedict)

 RangeTombstoneList becoming bottleneck on tombstone heavy tasks
 ---

 Key: CASSANDRA-8546
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8546
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
 Environment: 2.0.11 / 2.1
Reporter: Dominic Letz
 Fix For: 2.1.3

 Attachments: cassandra-2.0.11-8546.txt, cassandra-2.1-8546.txt, 
 rangetombstonelist_compaction.png, rangetombstonelist_mutation.png, 
 rangetombstonelist_read.png, tombstone_test.tgz


 I would like to propose a change of the data structure used in the 
 RangeTombstoneList to store and insert tombstone ranges to something with at 
 least O(log N) insert in the middle and at near O(1) and start AND end. Here 
 is why:
 When having tombstone heavy work-loads the current implementation of 
 RangeTombstoneList becomes a bottleneck with slice queries.
 Scanning the number of tombstones up to the default maximum (100k) can take 
 up to 3 minutes of how addInternal() scales on insertion of middle and start 
 elements.
 The attached test shows that with 50k deletes from both sides of a range.
 INSERT 1...11
 flush()
 DELETE 1...5
 DELETE 11...6
 While one direction performs ok (~400ms on my notebook):
 {code}
 SELECT * FROM timeseries WHERE name = 'a' ORDER BY timestamp DESC LIMIT 1
 {code}
 The other direction underperforms (~7seconds on my notebook)
 {code}
 SELECT * FROM timeseries WHERE name = 'a' ORDER BY timestamp ASC LIMIT 1
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8325:
-

[~graham sanderson] thanks for the New Year cheer and putting together another 
great patch.

My slight concern with this approach is that it pollutes the instruction cache, 
so we do need to run some performance tests. These codepaths _are_ pretty 
sensitive to these effects.

Ultimately, I think a follow up ticket might be sensible that performs all of 
this work natively, since we should not need such code duplication. 

 Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
 -

 Key: CASSANDRA-8325
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325
 Project: Cassandra
  Issue Type: Bug
 Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit 
 Server VM
Reporter: Leonid Shalupov
 Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, 
 untested_8325.patch


 See attached error file after JVM crash
 {quote}
 FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu 
 Jan 16 22:34:59 UTC 2014 
 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 {quote}
 {quote}
  % java -version
 openjdk version 1.7.0_71
 OpenJDK Runtime Environment (build 1.7.0_71-b14)
 OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-8568) Impose new API on data tracker modifications that makes correct usage obvious and imposes safety

2015-01-06 Thread Benedict (JIRA)
Benedict created CASSANDRA-8568:
---

 Summary: Impose new API on data tracker modifications that makes 
correct usage obvious and imposes safety
 Key: CASSANDRA-8568
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8568
 Project: Cassandra
  Issue Type: Bug
Reporter: Benedict


DataTracker has become a bit of a quagmire, and not at all obvious to interface 
with, with many subtly different modifiers. I suspect it is still subtly 
broken, especially around error recovery.

I propose piggy-backing on CASSANDRA-7705 to offer RAII (and GC-enforced, for 
those situations where a try/finally block isn't possible) objects that have 
transactional behaviour, and with few simple declarative methods that can be 
composed simply to provide all of the functionality we currently need.

See CASSANDRA-8399 for context



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8506) Improve management of DataTracker, esp. compacting

2015-01-06 Thread Benedict (JIRA)

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

Benedict resolved CASSANDRA-8506.
-
Resolution: Duplicate

 Improve management of DataTracker, esp. compacting
 --

 Key: CASSANDRA-8506
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8506
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Benedict
 Fix For: 3.0


 Building on CASSANDRA-7705, we can use debuggable ref counting to manage the 
 marking and unmarking of compaction state, so that we can quickly track down 
 errors.
 We should also simplify the logic wrt rewriters, by ignoring the descriptor 
 type, perhaps for all sets.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-7438) Serializing Row cache alternative (Fully off heap)

2015-01-06 Thread Robert Stupp (JIRA)

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

Robert Stupp edited comment on CASSANDRA-7438 at 1/6/15 10:08 AM:
--

I had the opportunity to test OHC on a big machine.
First: it works - very happy about that :)

Some things I want to notice:
* high number of segments do not have any really measurable influence (default 
of 2* # of cores is fine)
* throughput heavily depends on serialization (hash entry size) - Java8 gave 
about 10% to 15% improvement in some tests (either on {{Unsafe.copyMemory}} or 
something related like JNI barrier)
* the number of entries per bucket stays pretty low with the default load 
factor of .75 - vast majority has 0 or 1 entries, some 2 or 3 and few up to 8

Issue (not solvable yet):
It works great for hash entries to approx. 64kB with good to great throughput. 
Above that barrier it first works good but after some time the system spends a 
huge amount of CPU time (~95%) in {{malloc()}} / {{free()}} (with jemalloc, 
Unsafe.allocate is not worth discussing at all on Linux).
I tried to add some „memory buffer cache“ that caches free’d hash entries for 
reuse. But it turned out that in the end it would be too complex if done right. 
The current implementation is still in the code, but must be explicitly enabled 
with a system property. Workloads with small entries and high number of threads 
easily trigger Linux OOM protection (that kills the process). Please note that 
it works with large hash entries - but throughput drops dramatically to just a 
few thousand writes per second.

Some numbers (value sizes have gaussian distribution). Had to do these tests in 
a hurry because I had to give back the machine. Code used during these tests is 
tagged as {{0.1-SNAP-Bench}} in git. Throughput is limited by {{malloc()}} / 
{{free()}} and most tests did only use 50% of available CPU capacity (on 
_c3.8xlarge_ - 32 cores, Intel Xeon E5-2680v2 @2.8GHz, 64GB).
* -1k..200k value size, 32 threads, 1M keys, 90% read ratio, 32GB: 22k 
writes/sec, 200k reads/sec, ~8k evictions/sec, write: 8ms (99perc), read: 
3ms(99perc)-
* -1k..64k value size, 500 threads, 1M keys, 90% read ratio, 32GB: 55k 
writes/sec, 499k reads/sec, ~2k evictions/sec, write: .1ms (99perc), read: 
.03ms(99perc)-
* -1k..64k value size, 500 threads, 1M keys, 50% read ratio, 32GB: 195k 
writes/sec, 195k reads/sec, ~9k evictions/sec, write: .2ms (99perc), read: 
.1ms(99perc)-
* -1k..64k value size, 500 threads, 1M keys, 10% read ratio, 32GB: 185k 
writes/sec, 20k reads/sec, ~7k evictions/sec, write: 4ms (99perc), read: 
.07ms(99perc)-
* -1k..16k value size, 500 threads, 5M keys, 90% read ratio, 32GB: 110k 
writes/sec, 1M reads/sec, 30k evictions/sec, write: .04ms (99perc), read: 
.01ms(99perc)-
* -1k..16k value size, 500 threads, 5M keys, 50% read ratio, 32GB: 420k 
writes/sec, 420k reads/sec, 125k evictions/sec, write: .06ms (99perc), read: 
.01ms(99perc)-
* -1k..16k value size, 500 threads, 5M keys, 10% read ratio, 32GB: 435k 
writes/sec, 48k reads/sec, 130k evictions/sec, write: .06ms (99perc), read: 
.01ms(99perc)-
* -1k..4k value size, 500 threads, 20M keys, 90% read ratio, 32GB: 140k 
writes/sec, 1.25M reads/sec, 50k evictions/sec, write: .02ms (99perc), read: 
.005ms(99perc)-
* -1k..4k value size, 500 threads, 20M keys, 50% read ratio, 32GB: 530k 
writes/sec, 530k reads/sec, 220k evictions/sec, write: .04ms (99perc), read: 
.005ms(99perc)-
* -1k..4k value size, 500 threads, 20M keys, 10% read ratio, 32GB: 665k 
writes/sec, 74k reads/sec, 250k evcictions/sec, write: .04ms (99perc), read: 
.005ms(99perc)-

Command line to execute the benchmark:
{code}
java -jar ohc-benchmark/target/ohc-benchmark-0.1-SNAPSHOT.jar -rkd 
'uniform(1..2000)' -wkd 'uniform(1..2000)' -vs 'gaussian(1024..4096,2)' 
-r .1 -cap 320 -d 86400 -t 500 -dr 8

-r = read rate
-d = duration
-t = # of threads
-dr = # of driver threads that feed the worker threads
-rkd = read key distribution
-wkd = write key distribution
-vs = value size
-cap = capacity
{code}

Sample bucket histogram from 20M test:
{code}
[0..0]: 8118604
[1..1]: 5892298
[2..2]: 2138308
[3..3]: 518089
[4..4]: 94441
[5..5]: 13672
[6..6]: 1599
[7..7]: 189
[8..9]: 16
{code}

After trapping into that memory management issue with varying allocation sized 
of some few kB to several MB, I think that it’s still worth to work on an own 
off-heap memory management. Maybe some block-based approach (fixed or 
variable). But that’s out of the scope of this ticket.

EDIT: The problem with high system-CPU usage only persists on systems with 
multiple CPUs. Cross check with the second CPU socket disabled - calling the 
benchmark with {{taskset 0x3ff java -jar ...}}  does not show 95% system CPU 
usage.

EDIT2: Marked benchmark values as invalid (see my comment on 

[jira] [Updated] (CASSANDRA-8194) Reading from Auth table should not be in the request path

2015-01-06 Thread sankalp kohli (JIRA)

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

sankalp kohli updated CASSANDRA-8194:
-
Assignee: Vishy Kasar

 Reading from Auth table should not be in the request path
 -

 Key: CASSANDRA-8194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8194
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Assignee: Vishy Kasar
Priority: Minor
 Fix For: 2.0.12, 3.0

 Attachments: 8194-V2.patch, 8194.patch, CacheTest2.java


 We use PasswordAuthenticator and PasswordAuthorizer. The system_auth has a RF 
 of 10 per DC over 2 DCs. The permissions_validity_in_ms is 5 minutes. 
 We still have few thousand requests failing each day with the trace below. 
 The reason for this is read cache request realizing that cached entry has 
 expired and doing a blocking request to refresh cache. 
 We should have cache refreshed periodically only in the back ground. The user 
 request should simply look at the cache and not try to refresh it. 
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:292)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:172)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:165)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:149)
   at 
 org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:75)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:102)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:113)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1735)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4162)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4150)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:256)
   at org.apache.cassandra.auth.Auth.isSuperuser(Auth.java:84)
   at 
 org.apache.cassandra.auth.AuthenticatedUser.isSuper(AuthenticatedUser.java:50)
   at 
 org.apache.cassandra.auth.CassandraAuthorizer.authorize(CassandraAuthorizer.java:68)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:278)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:275)
   at 
 com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
   at 
 com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
   at 
 com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
   ... 19 more
 Caused by: org.apache.cassandra.exceptions.ReadTimeoutException: Operation 
 timed out - received only 0 responses.
   at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:105)
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:943)
   at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:828)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:140)
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:245)
   ... 28 more
 ERROR [Thrift:17232] 2014-10-24 05:06:51,004 CustomTThreadPoolServer.java 
 (line 224) Error occurred during processing of message.
 com.google.common.util.concurrent.UncheckedExecutionException: 
 

[jira] [Commented] (CASSANDRA-8325) Cassandra 2.1.x fails to start on FreeBSD (JVM crash)

2015-01-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne commented on CASSANDRA-8325:
-

For the sake of clarification, being from DataStax doesn't entitled anyone to 
make calls regarding Apache Cassandra (having a good track record of 
contributions, which usually means you're a committer, is probably what 
entitled you to make calls, though decisions are ideally agreed upon 
collectively).

 Cassandra 2.1.x fails to start on FreeBSD (JVM crash)
 -

 Key: CASSANDRA-8325
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8325
 Project: Cassandra
  Issue Type: Bug
 Environment: FreeBSD 10.0 with openjdk version 1.7.0_71, 64-Bit 
 Server VM
Reporter: Leonid Shalupov
 Attachments: hs_err_pid1856.log, system.log, unsafeCopy1.txt, 
 untested_8325.patch


 See attached error file after JVM crash
 {quote}
 FreeBSD xxx.intellij.net 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu 
 Jan 16 22:34:59 UTC 2014 
 r...@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
 {quote}
 {quote}
  % java -version
 openjdk version 1.7.0_71
 OpenJDK Runtime Environment (build 1.7.0_71-b14)
 OpenJDK 64-Bit Server VM (build 24.71-b01, mixed mode)
 {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8567) Functions like length() and trim() on cqlsh table fields

2015-01-06 Thread Sylvain Lebresne (JIRA)

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

Sylvain Lebresne resolved CASSANDRA-8567.
-
Resolution: Won't Fix

We might add some {{length}} and {{trim}} method at some point, though even if 
we don't, UDF in 3.0 will allow you to define them. But what you're really 
asking here is to be able to use functions in {{ORDER BY}}, and that is not 
going to happen. The reason is that we have no better strategy server side than 
to read everything and sort it in memory afterwards before returning to the 
client. Which 1) is no faster than letting you the client do the sorting client 
side and 2) doesn't work with paging at all and thus makes it likely to OOM as 
soon as the amount of data to order is not small.

For those reason, we prefer letting clients do the sorting themselves 
post-query if they wants to (but we understand that for cqlsh it's not as nice 
as you'd like. Though if you really need quick and dirty post-query sorting, 
piping the output of cqlsh into sort (the unix utility) isn't terribly hard). 
Alternatively, if you need results in that sort order often, you should store 
the data in a table whose clustering is {{length(trim(field)}}.

 Functions like length() and trim() on cqlsh table fields
 

 Key: CASSANDRA-8567
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8567
 Project: Cassandra
  Issue Type: Wish
  Components: Core
Reporter: Rekha Joshi

 It would be nice to be able to order by length of field values.
 A function like length(field) and trim(field) on cqlsh
 To enable do something like say - select * from  table where 
 field1=value order by length(trim(field2)) desc;
 Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7438) Serializing Row cache alternative (Fully off heap)

2015-01-06 Thread Robert Stupp (JIRA)

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

Robert Stupp commented on CASSANDRA-7438:
-

The latest (just checked in) benchmark implementation gives much better 
results. Using 
{{com.codahale.metrics.Timer#time(java.util.concurrent.CallableT)}} 
eliminates use of {{System.nanoTime()}} or 
{{ThreadMXBean.getCurrentThreadCpuTime()}} - it can directly use its internal 
clock.
The benchmark {{java -jar ohc-benchmark/target/ohc-benchmark-0.2-SNAPSHOT.jar 
-rkd 'gaussian(1..2000,2)' -wkd 'gaussian(1..2000,2)' -vs 
'gaussian(1024..4096,2)' -r .9 -cap 16 -d 30 -t 30}} improved from 800k 
reads to 3.3M reads per second w/ 8 cores). So yes - benchmark was measuring 
its own mad code. Due to that I edited my previous comment with the benchmark 
results since those are invalid now.

I've added a (yet simple) JMH benchmark as a separate module. This one can 
cause high system CPU usage - at operation rates of 2M per second or more (8 
cores). I think these rates are really fine.

Note: these rates cannot be achieved in production since then you'll obviously 
have to pay for (de)serialization, too.

So we want to address these topics as follow-up:
* own off-heap allocator
* C* ability to access off-heap cached rows
* C* ability to serialize hot keys directly from off-heap (might be a minor win 
since it's triggered not that often)
* per-table knob to control whether to add to row-cache on writes -- I strongly 
believe that this is a useful feature (maybe LHF) on workloads where read and 
written data work on different (row} keys.
* investigate if counter-cache can benefit
* investigate if key-cache can benefit

bq. You could start with it outside and publish to maven central and if there 
an issue getting patches applied quickly we can always fork it in C*.
OK

bq. pluggable row cache
Then I'll start with that - just make row-cache pluggable and the 
implementation configurable.

Note: JNA has a synchronized block that's executed at every call - version 
4.2.0 fixes this (don't know when it will be released).

 Serializing Row cache alternative (Fully off heap)
 --

 Key: CASSANDRA-7438
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7438
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
 Environment: Linux
Reporter: Vijay
Assignee: Vijay
  Labels: performance
 Fix For: 3.0

 Attachments: 0001-CASSANDRA-7438.patch, tests.zip


 Currently SerializingCache is partially off heap, keys are still stored in 
 JVM heap as BB, 
 * There is a higher GC costs for a reasonably big cache.
 * Some users have used the row cache efficiently in production for better 
 results, but this requires careful tunning.
 * Overhead in Memory for the cache entries are relatively high.
 So the proposal for this ticket is to move the LRU cache logic completely off 
 heap and use JNI to interact with cache. We might want to ensure that the new 
 implementation match the existing API's (ICache), and the implementation 
 needs to have safe memory access, low overhead in memory and less memcpy's 
 (As much as possible).
 We might also want to make this cache configurable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7438) Serializing Row cache alternative (Fully off heap)

2015-01-06 Thread Robert Stupp (JIRA)

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

Robert Stupp updated CASSANDRA-7438:

Reviewer: Ariel Weisberg  (was: Robert Stupp)
Assignee: Robert Stupp  (was: Vijay)

 Serializing Row cache alternative (Fully off heap)
 --

 Key: CASSANDRA-7438
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7438
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
 Environment: Linux
Reporter: Vijay
Assignee: Robert Stupp
  Labels: performance
 Fix For: 3.0

 Attachments: 0001-CASSANDRA-7438.patch, tests.zip


 Currently SerializingCache is partially off heap, keys are still stored in 
 JVM heap as BB, 
 * There is a higher GC costs for a reasonably big cache.
 * Some users have used the row cache efficiently in production for better 
 results, but this requires careful tunning.
 * Overhead in Memory for the cache entries are relatively high.
 So the proposal for this ticket is to move the LRU cache logic completely off 
 heap and use JNI to interact with cache. We might want to ensure that the new 
 implementation match the existing API's (ICache), and the implementation 
 needs to have safe memory access, low overhead in memory and less memcpy's 
 (As much as possible).
 We might also want to make this cache configurable.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8163) Re-introduce DESCRIBE permission

2015-01-06 Thread Ben Laplanche (JIRA)

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

Ben Laplanche commented on CASSANDRA-8163:
--

The ability for users to see the table names for other users keyspaces is 
blocking us from using a cluster in a multi-tenant setup, which for some 
clients and the nature of their work can be prohibitive in using Cassandra. 

 Re-introduce DESCRIBE permission
 

 Key: CASSANDRA-8163
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8163
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Priority: Minor

 We have a cluster like this:
 project1_keyspace
 table101
 table102
 project2_keyspace
 table201
 table202
 We have set up following users and grants:
 project1_user has all access to project1_keyspace 
 project2_user has all access to project2_keyspace
 However project1_user can still do a 'describe schema' and get the schema for 
 project2_keyspace as well. We do not want project1_user to have any knowledge 
 for project2 in any way (cqlsh/java-driver etc) .



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8558:
-

This is nothing to do with either change as far as I can tell. Somewhere 
inbetween those two changes something else was presumably broken, that is 
unrelated to either of them. It's possible that it was broken before either, in 
fact. Somewhere amongst them we changed drop behaviour to introduce flushing of 
dirty tables, and this flushing causes the problem. In fact we probably have a 
much worse problem than this appears.

I can illicit this behaviour with a simple call to nodetool flush. The deletion 
records are flushed to disk, and appear in their respective sstables, but are 
not being returned by the IndexedSliceReader that queries them. A new test to 
find this behaviour would be simpler: 

CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
CREATE  TABLE space1.table1(a int, b int, c text,primary key(a,b));
INSERT INTO space1.table1(a,b,c) VALUES(1,1,'1');
// nodetool flush
DELETE FROM space1.table3 where a=1 and b=1;
// nodetool flush
SELECT * FROM space1.table3 where a=1 and b=1;

This is much more fundamentally broken than this ticket suggests, but I'm 
probably not the best person to investigate, since it looks to be a problem 
with IndexedSliceReader. Hopefully a git bisect with the updated test will 
blame a suitable candidate next time around :)

(assuming it isn't somehow still my fault)

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Benedict
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8558:

Assignee: Philip Thompson  (was: Benedict)

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Philip Thompson
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Benedict (JIRA)

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

Benedict edited comment on CASSANDRA-8558 at 1/6/15 12:12 PM:
--

This is nothing to do with either change as far as I can tell. Somewhere 
inbetween those two changes something else was presumably broken, that is 
unrelated to either of them. It's possible that it was broken before either, in 
fact. Somewhere amongst them we changed drop behaviour to introduce flushing of 
dirty tables, and this flushing causes the problem. In fact we probably have a 
much worse problem than this appears.

I can illicit this behaviour with a simple call to nodetool flush. The deletion 
records are flushed to disk, and appear in their respective sstables, but are 
not being returned by the IndexedSliceReader that queries them. A new test to 
find this behaviour would be simpler: 

CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
CREATE  TABLE space1.table1(a int, b int, c text,primary key(a,b));
INSERT INTO space1.table1(a,b,c) VALUES(1,1,'1');
// nodetool flush
DELETE FROM space1.table1 where a=1 and b=1;
// nodetool flush
SELECT * FROM space1.table1 where a=1 and b=1;

This is much more fundamentally broken than this ticket suggests, but I'm 
probably not the best person to investigate, since it looks to be a problem 
with IndexedSliceReader. Hopefully a git bisect with the updated test will 
blame a suitable candidate next time around :)

(assuming it isn't somehow still my fault)


was (Author: benedict):
This is nothing to do with either change as far as I can tell. Somewhere 
inbetween those two changes something else was presumably broken, that is 
unrelated to either of them. It's possible that it was broken before either, in 
fact. Somewhere amongst them we changed drop behaviour to introduce flushing of 
dirty tables, and this flushing causes the problem. In fact we probably have a 
much worse problem than this appears.

I can illicit this behaviour with a simple call to nodetool flush. The deletion 
records are flushed to disk, and appear in their respective sstables, but are 
not being returned by the IndexedSliceReader that queries them. A new test to 
find this behaviour would be simpler: 

CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
CREATE  TABLE space1.table1(a int, b int, c text,primary key(a,b));
INSERT INTO space1.table1(a,b,c) VALUES(1,1,'1');
// nodetool flush
DELETE FROM space1.table3 where a=1 and b=1;
// nodetool flush
SELECT * FROM space1.table3 where a=1 and b=1;

This is much more fundamentally broken than this ticket suggests, but I'm 
probably not the best person to investigate, since it looks to be a problem 
with IndexedSliceReader. Hopefully a git bisect with the updated test will 
blame a suitable candidate next time around :)

(assuming it isn't somehow still my fault)

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Philip Thompson
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8194) Reading from Auth table should not be in the request path

2015-01-06 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-8194:


While there is a window during which a stale set of permissions is used, under 
normal operation I don't think this *should* present too many practical 
problems. 

Refresh is triggered by the first lookup after permisions_validity_in_ms, so 
we'll continue to use the stale set between that point and when that refresh 
actually completes. Outside of tests though, clients have no 
visibility/expectation about the precise load or expiry timings, so this 
shouldn't usually matter. My concern would be performing every 
IAuthorizer.authorize call on a single thread using StorageService.tasks 
instead of distributing them across client request threads could cause a 
backlog and allow the window to grow unacceptably (plus, these tasks will also 
be contending with other users of the shared executor). 

The point about the proliferation of threads and executors is valid, but maybe 
there's a case for a dedicated executor here. We could make it a TPE with a 
default poolsize of 1 but allow that to be increased via a system property if 
necessary.

What may be more of an issue is that we'll continue to serve the stale perms as 
long as the refresh fails completely due to IAuthorizer.authorize throwing some 
exception. This shouldn't really happen with CassandraAuthorizer, but other 
IAuthorizer impls could well encounter errors when fetching perms. To guard 
against that, we can force an invalidation if the ListenableFutureTask 
encounters an exception. That would pretty much maintain current behaviour, 
with the client receiving an error response while the refresh fails (actually, 
the authorize calls after an error would serve stale perms until the exception 
is thrown  caught, but all subsequent calls would fail as per current 
behaviour).

I've attached a v3 with this second change, what are your thoughts on reverting 
back to a dedicated executor for cache refresh?

Also, as I mentioned, tests do have concrete expectations about expiry of 
permissions and so this breaks auth_test.py:TestAuth.permissions_caching_test. 
I've pushed a fix [here|https://github.com/beobal/cassandra-dtest/tree/8194] 
and I'll open a PR shortly.

 Reading from Auth table should not be in the request path
 -

 Key: CASSANDRA-8194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8194
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Assignee: Vishy Kasar
Priority: Minor
 Fix For: 2.0.12, 3.0

 Attachments: 8194-V2.patch, 8194.patch, CacheTest2.java


 We use PasswordAuthenticator and PasswordAuthorizer. The system_auth has a RF 
 of 10 per DC over 2 DCs. The permissions_validity_in_ms is 5 minutes. 
 We still have few thousand requests failing each day with the trace below. 
 The reason for this is read cache request realizing that cached entry has 
 expired and doing a blocking request to refresh cache. 
 We should have cache refreshed periodically only in the back ground. The user 
 request should simply look at the cache and not try to refresh it. 
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:292)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:172)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:165)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:149)
   at 
 org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:75)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:102)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:113)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1735)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4162)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4150)
   at 

[jira] [Commented] (CASSANDRA-7124) Use JMX Notifications to Indicate Success/Failure of Long-Running Operations

2015-01-06 Thread Rajanarayanan Thottuvaikkatumana (JIRA)

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

Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-7124:
-

[~yukim], Did you get a chance to look at the changes made? Any comments? Thanks

 Use JMX Notifications to Indicate Success/Failure of Long-Running Operations
 

 Key: CASSANDRA-7124
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7124
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Tyler Hobbs
Assignee: Rajanarayanan Thottuvaikkatumana
Priority: Minor
  Labels: lhf
 Fix For: 3.0

 Attachments: 7124-wip.txt, cassandra-trunk-compact-7124.txt, 
 cassandra-trunk-decommission-7124.txt


 If {{nodetool cleanup}} or some other long-running operation takes too long 
 to complete, you'll see an error like the one in CASSANDRA-2126, so you can't 
 tell if the operation completed successfully or not.  CASSANDRA-4767 fixed 
 this for repairs with JMX notifications.  We should do something similar for 
 nodetool cleanup, compact, decommission, move, relocate, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8194) Reading from Auth table should not be in the request path

2015-01-06 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe updated CASSANDRA-8194:
---
Attachment: 8194-V3.txt

 Reading from Auth table should not be in the request path
 -

 Key: CASSANDRA-8194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8194
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Assignee: Vishy Kasar
Priority: Minor
 Fix For: 2.0.12, 3.0

 Attachments: 8194-V2.patch, 8194-V3.txt, 8194.patch, CacheTest2.java


 We use PasswordAuthenticator and PasswordAuthorizer. The system_auth has a RF 
 of 10 per DC over 2 DCs. The permissions_validity_in_ms is 5 minutes. 
 We still have few thousand requests failing each day with the trace below. 
 The reason for this is read cache request realizing that cached entry has 
 expired and doing a blocking request to refresh cache. 
 We should have cache refreshed periodically only in the back ground. The user 
 request should simply look at the cache and not try to refresh it. 
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:292)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:172)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:165)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:149)
   at 
 org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:75)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:102)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:113)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1735)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4162)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4150)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:256)
   at org.apache.cassandra.auth.Auth.isSuperuser(Auth.java:84)
   at 
 org.apache.cassandra.auth.AuthenticatedUser.isSuper(AuthenticatedUser.java:50)
   at 
 org.apache.cassandra.auth.CassandraAuthorizer.authorize(CassandraAuthorizer.java:68)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:278)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:275)
   at 
 com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
   at 
 com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
   at 
 com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
   ... 19 more
 Caused by: org.apache.cassandra.exceptions.ReadTimeoutException: Operation 
 timed out - received only 0 responses.
   at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:105)
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:943)
   at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:828)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:140)
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:245)
   ... 28 more
 ERROR [Thrift:17232] 2014-10-24 05:06:51,004 CustomTThreadPoolServer.java 
 (line 224) Error occurred during processing of message.
 

[jira] [Updated] (CASSANDRA-6983) DirectoriesTest fails when run as root

2015-01-06 Thread Alan Boudreault (JIRA)

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

Alan Boudreault updated CASSANDRA-6983:
---
Tester: Alan Boudreault

 DirectoriesTest fails when run as root
 --

 Key: CASSANDRA-6983
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6983
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Brandon Williams
Assignee: Ryan McGuire
Priority: Minor
 Fix For: 2.0.12


 When you run the DirectoriesTest as a normal user, it passes because it fails 
 to create the 'bad' directory:
 {noformat}
 [junit] - Standard Error -
 [junit] ERROR 16:16:18,111 Failed to create 
 /tmp/cassandra4119802552776680052unittest/ks/bad directory
 [junit]  WARN 16:16:18,112 Blacklisting 
 /tmp/cassandra4119802552776680052unittest/ks/bad for writes
 [junit] -  ---
 {noformat}
 But when you run the test as root, it succeeds in making the directory, 
 causing an assertion failure that it's unwritable:
 {noformat}
 [junit] Testcase: 
 testDiskFailurePolicy_best_effort(org.apache.cassandra.db.DirectoriesTest):   
 FAILED
 [junit] 
 [junit] junit.framework.AssertionFailedError: 
 [junit] at 
 org.apache.cassandra.db.DirectoriesTest.testDiskFailurePolicy_best_effort(DirectoriesTest.java:199)
 {noformat}
 It seems to me that we shouldn't be relying on failing the make the 
 directory.  If we're just going to test a nonexistent dir, why try to make 
 one at all?  And if that is supposed to succeed, then we have a problem with 
 either the test or blacklisting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-6983) DirectoriesTest fails when run as root

2015-01-06 Thread Alan Boudreault (JIRA)

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

Alan Boudreault updated CASSANDRA-6983:
---
Attachment: 6983-v1.patch

As a non-root user perspective, the test is ok. We have to call the  
Directories.create() if we want to get the internal cassandra disk policy 
mechanism triggered. If we remove that fake directory creation, the test will 
fail since the it is not marked as an unwritable BlacklistedDirectory. 

The real issue with that test using the root user is that we cannot set the 
directory unwritable using Java. Internally, Java will simply re-set the write 
permission for the operation since the root user is allowed to do everything. 
Please correct me if I'm wrong here about that Java behavior. 

At this point, we have two options to fix this test:

1.  Do not call Directories.create(), but rather set the directory unwritable 
manually via the BlacklistedDirectories class. I don't especially like this 
option since it doesn't really trigger the best_effort internal mechanism.  

2. Simulate a fake directory creation by throwing an exception. This will 
trigger the internal handleFSError and the best_effort mechanism. This will 
work for the root user since we are not playing anymore with the filesystem. 
I've attached a tentative patch with this solution.

Let me know what you think or if you have any suggestion.

 DirectoriesTest fails when run as root
 --

 Key: CASSANDRA-6983
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6983
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Brandon Williams
Assignee: Ryan McGuire
Priority: Minor
 Fix For: 2.0.12

 Attachments: 6983-v1.patch


 When you run the DirectoriesTest as a normal user, it passes because it fails 
 to create the 'bad' directory:
 {noformat}
 [junit] - Standard Error -
 [junit] ERROR 16:16:18,111 Failed to create 
 /tmp/cassandra4119802552776680052unittest/ks/bad directory
 [junit]  WARN 16:16:18,112 Blacklisting 
 /tmp/cassandra4119802552776680052unittest/ks/bad for writes
 [junit] -  ---
 {noformat}
 But when you run the test as root, it succeeds in making the directory, 
 causing an assertion failure that it's unwritable:
 {noformat}
 [junit] Testcase: 
 testDiskFailurePolicy_best_effort(org.apache.cassandra.db.DirectoriesTest):   
 FAILED
 [junit] 
 [junit] junit.framework.AssertionFailedError: 
 [junit] at 
 org.apache.cassandra.db.DirectoriesTest.testDiskFailurePolicy_best_effort(DirectoriesTest.java:199)
 {noformat}
 It seems to me that we shouldn't be relying on failing the make the 
 directory.  If we're just going to test a nonexistent dir, why try to make 
 one at all?  And if that is supposed to succeed, then we have a problem with 
 either the test or blacklisting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/3] cassandra git commit: Use lexical comparison for java revisions

2015-01-06 Thread brandonwilliams
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 1af8ea5ef - e83304ddf
  refs/heads/trunk dc0102a8e - 0f024a619


Use lexical comparison for java revisions

Patch by Michael Shuler, reviewed by brandonwilliams for CASSANDRA-8315


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

Branch: refs/heads/cassandra-2.1
Commit: e83304ddfee1377417b334d393c61671895d8ed5
Parents: 1af8ea5
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Jan 6 08:24:48 2015 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Jan 6 08:24:48 2015 -0600

--
 conf/cassandra-env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e83304dd/conf/cassandra-env.sh
--
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index 191fb7e..755f962 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -99,7 +99,7 @@ if [ $JVM_VERSION \ 1.7 ] ; then
 exit 1;
 fi
 
-if [ $JVM_VERSION \ 1.8 ]  [ $JVM_PATCH_VERSION -lt 25 ] ; then
+if [ $JVM_VERSION \ 1.8 ]  [ $JVM_PATCH_VERSION \ 25 ] ; then
 echo Cassandra 2.0 and later require Java 7u25 or later.
 exit 1;
 fi



[2/3] cassandra git commit: Use lexical comparison for java revisions

2015-01-06 Thread brandonwilliams
Use lexical comparison for java revisions

Patch by Michael Shuler, reviewed by brandonwilliams for CASSANDRA-8315


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

Branch: refs/heads/trunk
Commit: e83304ddfee1377417b334d393c61671895d8ed5
Parents: 1af8ea5
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Jan 6 08:24:48 2015 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Jan 6 08:24:48 2015 -0600

--
 conf/cassandra-env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e83304dd/conf/cassandra-env.sh
--
diff --git a/conf/cassandra-env.sh b/conf/cassandra-env.sh
index 191fb7e..755f962 100644
--- a/conf/cassandra-env.sh
+++ b/conf/cassandra-env.sh
@@ -99,7 +99,7 @@ if [ $JVM_VERSION \ 1.7 ] ; then
 exit 1;
 fi
 
-if [ $JVM_VERSION \ 1.8 ]  [ $JVM_PATCH_VERSION -lt 25 ] ; then
+if [ $JVM_VERSION \ 1.8 ]  [ $JVM_PATCH_VERSION \ 25 ] ; then
 echo Cassandra 2.0 and later require Java 7u25 or later.
 exit 1;
 fi



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

2015-01-06 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/0f024a61
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0f024a61
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0f024a61

Branch: refs/heads/trunk
Commit: 0f024a6192f185b93439ae53a69ce113b363
Parents: dc0102a e83304d
Author: Brandon Williams brandonwilli...@apache.org
Authored: Tue Jan 6 08:25:56 2015 -0600
Committer: Brandon Williams brandonwilli...@apache.org
Committed: Tue Jan 6 08:25:56 2015 -0600

--
 conf/cassandra-env.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0f024a61/conf/cassandra-env.sh
--



[jira] [Commented] (CASSANDRA-8303) Provide strict mode for CQL Queries

2015-01-06 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-8303:


It seems to me that this could be a reasonably natural fit as an extension to 
the existing authz system. If we do go down that route there are a couple of 
things to consider. 

What we're really talking about here are restrictions on the permissions a 
particular user may have been granted. For instance, you could grant SELECT on 
ks1.cf1 to user foo, but add a restriction such that multipartition queries are 
not allowed. My first question then is are there other restrictions that would 
be useful but which don't fit this definition?

For restrictions which do fit that definition, it seems sensible to use a 
similar resource hierarchy as permissions. i.e. a restriction can be applied at 
the table level, keyspace level (which trickles down to apply to all tables in 
the ks), or at the root level. The alternative implied by the syntax in the 
previous comments suggests that a restriction should always be applied at the 
root level (i.e. for all keyspaces  tables). 

How inheritance is handled in that hierarchy of resources should be from the 
bottom upwards, working from the most specific permission/restriction.For 
instance, in the case where user x is granted SELECT without any restriction on 
ks1 and the same user is also granted SELECT with the MULTI_PARTITION 
restriction on ks1.cf1 it seems clear that MP queries from user x should only 
be disallowed on the one table, not all tables in ks1. Also, the unrestricted 
grant should not trump the more specific, restricted one and allow MP queries 
on that table.
In the reverse scenario, where the restriction is at the keyspace level, but 
there is also a non-restricted grant for the table, the behaviour should also 
be reversed, user x can make MP queries on the 1 table, but on no others in the 
keyspace.

As noted, managing all this at the user level could be overly burdensome but 
CASSANDRA-7653 should relieve most of that extra administrative load. However, 
it would involve some additional complexity in handling resolution of 
permissions and restrictions.

During the authz process when we resolve permissions for a user on a particular 
resource, the most specific permission whether granted directly or inherited 
through role membership should apply, along with any of its restrictions. If 
there are multiple inherited or direct grants for the exact same resource (i.e. 
at the same level in the resource hierarchy) then we would merge them, unioning 
any restrictions, e.g

{noformat}
role x is granted SELECT on ks1 with MULTI_PARTITION restriction
role y is granted SELECT on ks1.cf1, unrestricted
role y should be allowed to SELECT from any table in ks1, but perform MP 
queries on ks1.cf1 only 

role z is granted both role x and role y
role z should be allowed to SELECT from any table in ks1, but perform MP 
queries on ks1.cf1 only 

role a is granted SELECT on ks1, unrestricted
role z is granted roles x, y, a
role z should be allowed to SELECT from any table in ks1, but perform MP 
queries on ks1.cf1 only 
{noformat}

So, I think this could fit nicely into authz for 3.0 but we may also want to 
think about adding options to cassandra.yaml to enforce the same restrictions 
without requiring authz ( authn). Obviously, that would be much more of a 
blunt instrument - enforcing a given restriction for all queries when enabled, 
though it would mean that it could be turned on on a per-node/per-DC basis. I 
don't see a problem with supporting both cql and yaml based approaches so long 
as we define an order of precedence.

 Provide strict mode for CQL Queries
 -

 Key: CASSANDRA-8303
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8303
 Project: Cassandra
  Issue Type: Improvement
Reporter: Anupam Arora
 Fix For: 3.0


 Please provide a strict mode option in cassandra that will kick out any CQL 
 queries that are expensive, e.g. any query with ALLOWS FILTERING, 
 multi-partition queries, secondary index queries, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-6983) DirectoriesTest fails when run as root

2015-01-06 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-6983:

Reviewer: Yuki Morishita
Assignee: Alan Boudreault  (was: Ryan McGuire)

 DirectoriesTest fails when run as root
 --

 Key: CASSANDRA-6983
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6983
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Brandon Williams
Assignee: Alan Boudreault
Priority: Minor
 Fix For: 2.0.12

 Attachments: 6983-v1.patch


 When you run the DirectoriesTest as a normal user, it passes because it fails 
 to create the 'bad' directory:
 {noformat}
 [junit] - Standard Error -
 [junit] ERROR 16:16:18,111 Failed to create 
 /tmp/cassandra4119802552776680052unittest/ks/bad directory
 [junit]  WARN 16:16:18,112 Blacklisting 
 /tmp/cassandra4119802552776680052unittest/ks/bad for writes
 [junit] -  ---
 {noformat}
 But when you run the test as root, it succeeds in making the directory, 
 causing an assertion failure that it's unwritable:
 {noformat}
 [junit] Testcase: 
 testDiskFailurePolicy_best_effort(org.apache.cassandra.db.DirectoriesTest):   
 FAILED
 [junit] 
 [junit] junit.framework.AssertionFailedError: 
 [junit] at 
 org.apache.cassandra.db.DirectoriesTest.testDiskFailurePolicy_best_effort(DirectoriesTest.java:199)
 {noformat}
 It seems to me that we shouldn't be relying on failing the make the 
 directory.  If we're just going to test a nonexistent dir, why try to make 
 one at all?  And if that is supposed to succeed, then we have a problem with 
 either the test or blacklisting.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Brandon Williams (JIRA)

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

Brandon Williams updated CASSANDRA-8558:

Priority: Blocker  (was: Major)

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Philip Thompson
Priority: Blocker
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7653) Add role based access control to Cassandra

2015-01-06 Thread Mike Adamson (JIRA)

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

Mike Adamson commented on CASSANDRA-7653:
-

I have a couple of initial thoughts on this. 
# Is the IAuthenticator.constructInitialSaslToken method really necessary? The 
only usage of this is from login methods that are only going to use the plain 
text sasl implementation offered by the PasswordAuthenticator so they could 
build the initial token themselves.
# Is there any way of not having the Option enum? This fixes the options that 
an Authenticator can support and doesn't allow any 3rd party to have different 
options but still work with the CQL grammar. Could we have some similar to the 
replication strategies? Or perhaps keep the Option enum but have an option of 
EXTENSION (or other name) that would allow the passing in of a json set of 
extension options.

 Add role based access control to Cassandra
 --

 Key: CASSANDRA-7653
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7653
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Mike Adamson
Assignee: Sam Tunnicliffe
 Fix For: 3.0

 Attachments: 7653.patch, CQLSmokeTest.java, cql_smoke_test.py


 The current authentication model supports granting permissions to individual 
 users. While this is OK for small or medium organizations wanting to 
 implement authorization, it does not work well in large organizations because 
 of the overhead of having to maintain the permissions for each user.
 Introducing roles into the authentication model would allow sets of 
 permissions to be controlled in one place as a role and then the role granted 
 to users. Roles should also be able to be granted to other roles to allow 
 hierarchical sets of permissions to be built up.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8448) Comparison method violates its general contract in AbstractEndpointSnitch

2015-01-06 Thread Brandon Williams (JIRA)

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

Brandon Williams commented on CASSANDRA-8448:
-

ISTM we already do that:

{noformat}
ArrayListDouble sortedScores = new 
ArrayList(subsnitchOrderedScores);
Collections.sort(sortedScores);

IteratorDouble sortedScoreIterator = sortedScores.iterator();
for (Double subsnitchScore : subsnitchOrderedScores)
{
if (subsnitchScore  (sortedScoreIterator.next() * (1.0 + 
BADNESS_THRESHOLD)))
{
sortByProximityWithScore(address, addresses);
return;
}
}
{noformat}

So I'm not sure what to do (and have no clear repro steps so I can't even try.) 
A simple workaround would be disabling badness, though.

 Comparison method violates its general contract in AbstractEndpointSnitch
 ---

 Key: CASSANDRA-8448
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8448
 Project: Cassandra
  Issue Type: Bug
Reporter: J.B. Langston
Assignee: Brandon Williams

 Seen in both 1.2 and 2.0.  The error is occurring here: 
 https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/locator/AbstractEndpointSnitch.java#L49
 {code}
 ERROR [Thrift:9] 2014-12-04 20:12:28,732 CustomTThreadPoolServer.java (line 
 219) Error occurred during processing of message.
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.IllegalArgumentException: Comparison method violates its general 
 contract!
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:352)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:224)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:218)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:202)
   at 
 org.apache.cassandra.thrift.CassandraServer.createMutationList(CassandraServer.java:822)
   at 
 org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:954)
   at com.datastax.bdp.server.DseServer.batch_mutate(DseServer.java:576)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.getResult(Cassandra.java:3922)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.getResult(Cassandra.java:3906)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201)
   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:745)
 Caused by: java.lang.IllegalArgumentException: Comparison method violates its 
 general contract!
   at java.util.TimSort.mergeHi(TimSort.java:868)
   at java.util.TimSort.mergeAt(TimSort.java:485)
   at java.util.TimSort.mergeCollapse(TimSort.java:410)
   at java.util.TimSort.sort(TimSort.java:214)
   at java.util.TimSort.sort(TimSort.java:173)
   at java.util.Arrays.sort(Arrays.java:659)
   at java.util.Collections.sort(Collections.java:217)
   at 
 org.apache.cassandra.locator.AbstractEndpointSnitch.sortByProximity(AbstractEndpointSnitch.java:49)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithScore(DynamicEndpointSnitch.java:157)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithBadness(DynamicEndpointSnitch.java:186)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximity(DynamicEndpointSnitch.java:151)
   at 
 org.apache.cassandra.service.StorageProxy.getLiveSortedEndpoints(StorageProxy.java:1408)
   at 
 org.apache.cassandra.service.StorageProxy.getLiveSortedEndpoints(StorageProxy.java:1402)
   at 
 org.apache.cassandra.service.AbstractReadExecutor.getReadExecutor(AbstractReadExecutor.java:148)
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1223)
   at 
 org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1165)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:255)
   

[jira] [Updated] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8558:
---
Assignee: Sylvain Lebresne  (was: Philip Thompson)

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Sylvain Lebresne
Priority: Blocker
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-8558:


Thanks for the better test. The new bisect was much cleaner, the only failure I 
saw was the expected one highlighted by the reporter. Here is the bisect output:

{code}
362cc05352ec67e707e0ac790732e96a15e63f6b is the first bad commit
commit 362cc05352ec67e707e0ac790732e96a15e63f6b
Author: Sylvain Lebresne sylv...@datastax.com
Date:   Tue Oct 29 11:03:52 2013 +0100

Push composites support in the storage engine

patch by slebresne; reviewed by benedict for CASSANDRA-5417

:100644 100644 c0d0f0d243f0454c1b1926957634bb52165295aa 
dcc7e33b064e52d245d8c6ba5de887c74e0f0a00 M  CHANGES.txt
:04 04 da620b5b36e8ba6b97cdb8efe4f690692a85e15e 
5dd1113af54ad7b90dd8694e462483bac6e7f985 M  src
:04 04 1fe1db9fca3bf03946828cdc917a0aef5bf7a9e1 
3bf0563361febc821a357cf61b5a0760f5a8eca4 M  test
{code}

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Philip Thompson
Priority: Blocker
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8558:
---
Tester: Philip Thompson

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Sylvain Lebresne
Priority: Blocker
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-6246) EPaxos

2015-01-06 Thread Blake Eggleston (JIRA)

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

Blake Eggleston commented on CASSANDRA-6246:


By using the existing epaxos ordering constraints. Incrementing the epoch is 
done by an instance which takes all unacknowledged instances as dependencies 
for the token range it's incrementing the epoch for. The epoch can only be 
incremented if all previous instances have also been executed.

 EPaxos
 --

 Key: CASSANDRA-6246
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6246
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Blake Eggleston
Priority: Minor

 One reason we haven't optimized our Paxos implementation with Multi-paxos is 
 that Multi-paxos requires leader election and hence, a period of 
 unavailability when the leader dies.
 EPaxos is a Paxos variant that requires (1) less messages than multi-paxos, 
 (2) is particularly useful across multiple datacenters, and (3) allows any 
 node to act as coordinator: 
 http://sigops.org/sosp/sosp13/papers/p358-moraru.pdf
 However, there is substantial additional complexity involved if we choose to 
 implement it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-6246) EPaxos

2015-01-06 Thread Blake Eggleston (JIRA)

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

Blake Eggleston edited comment on CASSANDRA-6246 at 1/6/15 3:11 PM:


By using the existing epaxos ordering constraints. Incrementing the epoch is 
done by an instance which takes all unacknowledged instances as dependencies 
for the token range it's incrementing the epoch for. The epoch can only be 
incremented if all previous instances have also been executed. 

I pushed up some commits that add the epoch functionality yesterday if you'd 
like to take a look: 
https://github.com/bdeggleston/cassandra/tree/CASSANDRA-6246


was (Author: bdeggleston):
By using the existing epaxos ordering constraints. Incrementing the epoch is 
done by an instance which takes all unacknowledged instances as dependencies 
for the token range it's incrementing the epoch for. The epoch can only be 
incremented if all previous instances have also been executed.

 EPaxos
 --

 Key: CASSANDRA-6246
 URL: https://issues.apache.org/jira/browse/CASSANDRA-6246
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Jonathan Ellis
Assignee: Blake Eggleston
Priority: Minor

 One reason we haven't optimized our Paxos implementation with Multi-paxos is 
 that Multi-paxos requires leader election and hence, a period of 
 unavailability when the leader dies.
 EPaxos is a Paxos variant that requires (1) less messages than multi-paxos, 
 (2) is particularly useful across multiple datacenters, and (3) allows any 
 node to act as coordinator: 
 http://sigops.org/sosp/sosp13/papers/p358-moraru.pdf
 However, there is substantial additional complexity involved if we choose to 
 implement it.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8558) deleted row still can be selected out

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8558:
-

I had a quick debug, and it appears EOCs are the problem: the range tombstone 
has an EOC of start, but the SliceQuery has an EOC of NONE, and the 
SimpleBlockFetcher skips over every atom = the slice start. But the name of a 
range tombstone is only its start, so this is considered prior to the slice's 
start, even though it stretches across the slice's range.

 deleted row still can be selected out
 -

 Key: CASSANDRA-8558
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8558
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.1.2 
 java version 1.7.0_55
Reporter: zhaoyan
Assignee: Sylvain Lebresne
Priority: Blocker
 Fix For: 2.1.3


 first
 {code}CREATE  KEYSPACE space1 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};
 CREATE  TABLE space1.table3(a int, b int, c text,primary key(a,b));
 CREATE  KEYSPACE space2 WITH replication = {'class': 'SimpleStrategy', 
 'replication_factor': 3};{code}
 second
 {code}CREATE  TABLE space2.table1(a int, b int, c int, primary key(a,b));
 CREATE  TABLE space2.table2(a int, b int, c int, primary key(a,b));
 INSERT INTO space1.table3(a,b,c) VALUES(1,1,'1');
 drop table space2.table1;
 DELETE FROM space1.table3 where a=1 and b=1;
 drop table space2.table2;
 select * from space1.table3 where a=1 and b=1;{code}
 you will find that the row (a=1 and b=1)  in space1.table3 is not deleted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-06 Thread Lex Lythius (JIRA)

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

Lex Lythius commented on CASSANDRA-3025:


@Michael Yes, I've checked nearly all the drivers listed in that 
PlanetCassandra page.

While Cassandra JIRA != DataStax, there is considerable overlapping between 
Apache and DataStax regarding Cassandra. My goal is to get some indication from 
either of the main driving forces behind Cassandra.

@Alex's reply sheds some light on this matter: it will be a C++-built wrapper 
around the official C++ driver, which is native protocol-based. Will it be 
PDO-based as well? (with several C*-specific added features, to be sure). The 
one I've been contributing to is, but it uses the deprecated Thrift interface 
and, apart from a few bugs, it has no support for user-defined types and tuples.

I will be happy to contribute in my pretty modest capacity as C++ developer to 
a C* PHP driver -- I would just like to know I work in the right direction.

If this JIRA is not the right place to bring the issue to the table, where 
would that be?


 PHP/PDO driver for Cassandra CQL
 

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


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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8303) Provide strict mode for CQL Queries

2015-01-06 Thread Jonathan Shook (JIRA)

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

Jonathan Shook commented on CASSANDRA-8303:
---

It might be nice if the auth system was always in play (when that auth provider 
is set), but the system defaults are applied to a virtual role with a name like 
defaults. This cleans up any layering questions by casting the yaml defaults 
into the authz conceptual model. If a user isn't assigned to another defined 
role, they should be automatically assigned to the defaults role.

Otherwise, explaining the result of layering them, even with precedence, might 
become overly cumbersome. With it, you can use both.



 Provide strict mode for CQL Queries
 -

 Key: CASSANDRA-8303
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8303
 Project: Cassandra
  Issue Type: Improvement
Reporter: Anupam Arora
 Fix For: 3.0


 Please provide a strict mode option in cassandra that will kick out any CQL 
 queries that are expensive, e.g. any query with ALLOWS FILTERING, 
 multi-partition queries, secondary index queries, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8552) Large compactions run out of off-heap RAM

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8552:
---
Reproduced In: 2.1.2, 2.1.1  (was: 2.1.1, 2.1.2)
   Tester: Alan Boudreault

 Large compactions run out of off-heap RAM
 -

 Key: CASSANDRA-8552
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8552
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 14.4 
 AWS EC2
 12 m1.xlarge nodes [4 cores, 16GB RAM, 1TB storage (251GB Used)]
 Java build 1.7.0_55-b13 and build 1.8.0_25-b17
Reporter: Brent Haines
Assignee: Benedict
Priority: Blocker
 Fix For: 2.1.3

 Attachments: Screen Shot 2015-01-02 at 9.36.11 PM.png, fhandles.log, 
 freelog.log, lsof.txt, meminfo.txt, sysctl.txt, system.log


 We have a large table of storing, effectively event logs and a pair of 
 denormalized tables for indexing.
 When updating from 2.0 to 2.1 we saw performance improvements, but some 
 random and silent crashes during nightly repairs. We lost a node (totally 
 corrupted) and replaced it. That node has never stabilized -- it simply can't 
 finish the compactions. 
 Smaller compactions finish. Larger compactions, like these two never finish - 
 {code}
 pending tasks: 48
compaction type   keyspace table completed total   
  unit   progress
 Compaction   data   stories   16532973358   75977993784   
 bytes 21.76%
 Compaction   data   stories_by_text   10593780658   38555048812   
 bytes 27.48%
 Active compaction remaining time :   0h10m51s
 {code}
 We are not getting exceptions and are not running out of heap space. The 
 Ubuntu OOM killer is reaping the process after all of the memory is consumed. 
 We watch memory in the opscenter console and it will grow. If we turn off the 
 OOM killer for the process, it will run until everything else is killed 
 instead and then the kernel panics.
 We have the following settings configured: 
 2G Heap
 512M New
 {code}
 memtable_heap_space_in_mb: 1024
 memtable_offheap_space_in_mb: 1024
 memtable_allocation_type: heap_buffers
 commitlog_total_space_in_mb: 2048
 concurrent_compactors: 1
 compaction_throughput_mb_per_sec: 128
 {code}
 The compaction strategy is leveled (these are read-intensive tables that are 
 rarely updated)
 I have tried every setting, every option and I have the system where the MTBF 
 is about an hour now, but we never finish compacting because there are some 
 large compactions pending. None of the GC tools or settings help because it 
 is not a GC problem. It is an off-heap memory problem.
 We are getting these messages in our syslog 
 {code}
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219527] BUG: Bad page map in 
 process java  pte:0320 pmd:2d6fa5067
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219545] addr:7fb820be3000 
 vm_flags:0870 anon_vma:  (null) mapping:  (null) 
 index:7fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219556] CPU: 3 PID: 27344 
 Comm: java Tainted: GB3.13.0-24-generic #47-Ubuntu
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219559]  880028510e40 
 88020d43da98 81715ac4 7fb820be3000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219565]  88020d43dae0 
 81174183 0320 0007fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219568]  8802d6fa5f18 
 0320 7fb820be3000 7fb820be4000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219572] Call Trace:
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219584]  [81715ac4] 
 dump_stack+0x45/0x56
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219591]  [81174183] 
 print_bad_pte+0x1a3/0x250
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219594]  [81175439] 
 vm_normal_page+0x69/0x80
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219598]  [8117580b] 
 unmap_page_range+0x3bb/0x7f0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219602]  [81175cc1] 
 unmap_single_vma+0x81/0xf0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219605]  [81176d39] 
 unmap_vmas+0x49/0x90
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219610]  [8117feec] 
 exit_mmap+0x9c/0x170
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219617]  [8110fcf3] 
 ? __delayacct_add_tsk+0x153/0x170
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219621]  [8106482c] 
 mmput+0x5c/0x120
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219625]  [81069bbc] 
 do_exit+0x26c/0xa50
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219631]  [810d7591] 
 ? __unqueue_futex+0x31/0x60
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219634]  

[jira] [Updated] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread JIRA

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

Bartłomiej Romański updated CASSANDRA-8571:
---
Description: 
Hi all,

We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
(JBODs). We mostly use LCS.

Recently, our nodes starts failing with 'no space left on device'. It all 
started with our mistake - we let our LCS accumulate too much in L0.

As a result, STCS woke up and we end with some big sstables on each node (let's 
say 5-10 sstables, 20-50gb each).

During normal operation we keep our disks about 50% full. This gives about 200 
GB free space on each of them. This was too little for compacting all 
accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
failing...

Evantually, we managed to stabilized the situation (with some crazy code 
hacking, manually moving sstables etc...). However, there are a few things that 
would be more than helpful in recovering from such situations more 
automatically... 

First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
(local) variable: writeSize. I believe we should check somewhere here if we 
have enough space on a chosen disk. The problem is that writeSize is never 
read... Am I missing something here?

Btw, while in STCS we first look for the least overloaded disk, and then (if 
there are more than one such disks) for the one with the most free space 
(please note the sort order in Directories.getWriteableLocation()). That's 
often suboptimal (it's usually better to wait for the bigger disk than to 
compact fewer sstables now), but probably not crucial.

Second, the strategy (used by LCS) that we first choose target disk and then 
use it for whole compaction is not the best one. For big compactions (eg. after 
some massive operations like bootstrap or repair; or after some issues with LCS 
like in our case) on small drives (eg. JBOD of SSDs) these will never succeed. 
Much better strategy would be to choose target drive for each output sstable 
separately, or at least round robin them.

Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
LeveledManifest.getCandidatesFor() would be expanded to support also limit for 
total space. After fallback STCS in L0 you end up with very big sstables and 32 
of them is just too much for one compaction on a small drives.

We finally used some hack similar the last option (as it was the easiest one to 
implement in a hurry), but any improvents described above would save us from 
all this.

Thanks,
BR


  was:
Hi all,

We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
(JBODs). We mostly use LCS.

Recently, our nodes starts failing with 'no space left on device'. It all 
started with our mistake - we let our LCS accumulate too much in L0.

As a result, STCS woke up and we end with some big sstables on each node (let's 
say 5-10 sstables, 20-50gb each).

During normal operation we keep our disks about 50% full. This gives about 200 
GB free space on each of them. This was too little for compacting all 
accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
failing...

Evantually, we managed to stabilized the situation (with some crazy code 
hacking, manually moving sstables etc...). However, there are a few things that 
would be more than helpful in recovering from such situations more 
automatically... 

First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
(local) variable: writeSize. I believe we should check somewhere here if we 
have enough space on a chosen disk. The problem is that writeSize is never 
read... Am I missing something here?

Btw, while in STCS we first look for the least overloaded disk, and then (if 
there are more than one such disks) for the one with the most free space 
(please note the sort order in Directories.getWriteableLocation()). That's 
often suboptimal (it's usually better to wait for the bigger disk than to 
compact fewer sstables now), but probably not crucial.

Second, the strategy (used by LCS) that we first choose target disk and then 
use it for whole compaction is not the best one. For big compactions (eg. after 
some massive operations like bootstrap or repair; or after some issues with LCS 
like in our case) on small drives (eg. JBOD of SSDs) these will never succeed. 
Much better strategy would be to choose target drive for each output sstable 
separately, or at least round robin them.

Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
LeveledManifest.getCandidatesFor() would be expanded to support also limit for 
total space. After fallback STCS in L0 you end up with very big sstables an 32 
of them is just too much for one compaction on a small drives.

We finally used some hack similar the last option (as it was the easiest one to 
implement in a hurry), but any 

[jira] [Comment Edited] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna edited comment on CASSANDRA-8571 at 1/6/15 7:43 PM:
-

See CASSANDRA-8329.  That may be what you're looking for in 2.1.3 I believe.  
Also related is CASSANDRA-7386.


was (Author: jeromatron):
See CASSANDRA-8329.  That may be what you're looking for in 2.0.12.  Also 
related is CASSANDRA-7386.

 Free space management does not work very well
 -

 Key: CASSANDRA-8571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8571
 Project: Cassandra
  Issue Type: Bug
Reporter: Bartłomiej Romański

 Hi all,
 We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
 (JBODs). We mostly use LCS.
 Recently, our nodes starts failing with 'no space left on device'. It all 
 started with our mistake - we let our LCS accumulate too much in L0.
 As a result, STCS woke up and we end with some big sstables on each node 
 (let's say 5-10 sstables, 20-50gb each).
 During normal operation we keep our disks about 50% full. This gives about 
 200 GB free space on each of them. This was too little for compacting all 
 accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
 failing...
 Evantually, we managed to stabilized the situation (with some crazy code 
 hacking, manually moving sstables etc...). However, there are a few things 
 that would be more than helpful in recovering from such situations more 
 automatically... 
 First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
 (local) variable: writeSize. I believe we should check somewhere here if we 
 have enough space on a chosen disk. The problem is that writeSize is never 
 read... Am I missing something here?
 Btw, while in STCS we first look for the least overloaded disk, and then (if 
 there are more than one such disks) for the one with the most free space 
 (please note the sort order in Directories.getWriteableLocation()). That's 
 often suboptimal (it's usually better to wait for the bigger disk than to 
 compact fewer sstables now), but probably not crucial.
 Second, the strategy (used by LCS) that we first choose target disk and then 
 use it for whole compaction is not the best one. For big compactions (eg. 
 after some massive operations like bootstrap or repair; or after some issues 
 with LCS like in our case) on small drives (eg. JBOD of SSDs) these will 
 never succeed. Much better strategy would be to choose target drive for each 
 output sstable separately, or at least round robin them.
 Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
 LeveledManifest.getCandidatesFor() would be expanded to support also limit 
 for total space. After fallback STCS in L0 you end up with very big sstables 
 and 32 of them is just too much for one compaction on a small drives.
 We finally used some hack similar the last option (as it was the easiest one 
 to implement in a hurry), but any improvents described above would save us 
 from all this.
 Thanks,
 BR



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8310) Assertion error in 2.1.1: SSTableReader.cloneWithNewSummarySamplingLevel(SSTableReader.java:988)

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8310:
---
Reproduced In: 2.1.1
Fix Version/s: 2.1.3

 Assertion error in 2.1.1: 
 SSTableReader.cloneWithNewSummarySamplingLevel(SSTableReader.java:988)
 

 Key: CASSANDRA-8310
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8310
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Donald Smith
 Fix For: 2.1.3


 Using C* 2.1.1  on linux Centos 6.4, we're getting this AssertionError on 5 
 nodes in a 12 node cluster. Also, compactions are lagging on all nodes.
 {noformat}
 ERROR [IndexSummaryManager:1] 2014-11-13 09:15:16,221 CassandraDaemon.java 
 (line 153) Exception in thread Thread[IndexSummaryManager:1,1,main]
 java.lang.AssertionError: null
 at 
 org.apache.cassandra.io.sstable.SSTableReader.cloneWithNewSummarySamplingLevel(SSTableReader.java:988)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.io.sstable.IndexSummaryManager.adjustSamplingLevels(IndexSummaryManager.java:420)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.io.sstable.IndexSummaryManager.redistributeSummaries(IndexSummaryManager.java:298)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.io.sstable.IndexSummaryManager.redistributeSummaries(IndexSummaryManager.java:238)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.io.sstable.IndexSummaryManager$1.runMayThrow(IndexSummaryManager.java:139)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
 ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor$UncomplainingRunnable.run(DebuggableScheduledThreadPoolExecutor.java:77)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
 [na:1.7.0_60]
 at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) 
 [na:1.7.0_60]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
  [na:1.7.0_60]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  [na:1.7.0_60]
 {noformat} 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8311) C* 2.1.1: AssertionError in AbstractionCompactionTask not correctly marked compacting

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8311:
---
Reproduced In: 2.1.1
Fix Version/s: 2.1.3

 C* 2.1.1:  AssertionError in AbstractionCompactionTask not correctly marked 
 compacting
 

 Key: CASSANDRA-8311
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8311
 Project: Cassandra
  Issue Type: Bug
Reporter: Donald Smith
 Fix For: 2.1.3


 Using 2.1.1 on CentOS6.4, we see this AssertionError on 3 out of 12 nodes in 
 one DC.
 {noformat}
 ERROR [CompactionExecutor:7] 2014-11-12 10:15:13,980 CassandraDaemon.java 
 (line 153) Exception in thread Thread[CompactionExecutor:7,1,RMI Runtime]
 java.lang.AssertionError: 
 /data/data/KEYSPACE_NAME/TABLE_NAME/KEYSPACE_NAME-TABLE_NAME-jb-308572-Data.db
  is not correctly marked compacting
 at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.init(AbstractCompactionTask.java:49)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.db.compaction.CompactionTask.init(CompactionTask.java:62)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionTask.init(LeveledCompactionTask.java:33)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.db.compaction.LeveledCompactionStrategy.getCompactionTask(LeveledCompactionStrategy.java:170)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8314) C* 2.1.1: AssertionError: stream can only read forward

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8314:
---
Reproduced In: 2.1.1
Fix Version/s: 2.1.3

 C* 2.1.1: AssertionError:  stream can only read forward
 -

 Key: CASSANDRA-8314
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8314
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Donald Smith
 Fix For: 2.1.3


 I see this multiple nodes on a 2.1.1 cluster running on CentOS 6.4:
 {noformat}
 ERROR [STREAM-IN-/10.6.1.104] 2014-11-13 14:13:16,565 StreamSession.java 
 (line 470) [Stream #45bdfe30-6b81-11e4-a7ca-b150b4554347] Streaming error 
 occurred
 java.io.IOException: Too many retries for Header (cfId: 
 aaefa7d7-9d72-3d18-b5f0-02b30cee5bd7, #29, version: jb, estimated keys: 
 12672, transfer size: 130005779, compressed?: true, repairedAt: 0)
 at 
 org.apache.cassandra.streaming.StreamSession.doRetry(StreamSession.java:594) 
 [apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:53)
  [apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:38)
  [apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.messages.StreamMessage.deserialize(StreamMessage.java:55)
  [apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.ConnectionHandler$IncomingMessageHandler.run(ConnectionHandler.java:245)
  [apache-cassandra-2.1.1.jar:2.1.1]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_60]
 Caused by: java.lang.AssertionError: stream can only read forward.
 at 
 org.apache.cassandra.streaming.compress.CompressedInputStream.position(CompressedInputStream.java:107)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.compress.CompressedStreamReader.read(CompressedStreamReader.java:85)
  ~[apache-cassandra-2.1.1.jar:2.1.1]
 at 
 org.apache.cassandra.streaming.messages.IncomingFileMessage$1.deserialize(IncomingFileMessage.java:48)
  [apache-cassandra-2.1.1.jar:2.1.1]
 ... 4 common frames omitted
 {noformat}
 We couldn't upgrade SStables due to exceptions.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8403) limit disregarded when paging with IN clause under certain conditions

2015-01-06 Thread Russ Hatch (JIRA)

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

Russ Hatch commented on CASSANDRA-8403:
---

[~blerer] I did a bisect of sorts and it looks like that was handled by the 
patch for CASSANDRA-8408.

 limit disregarded when paging with IN clause under certain conditions
 -

 Key: CASSANDRA-8403
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8403
 Project: Cassandra
  Issue Type: Bug
Reporter: Russ Hatch
Assignee: Benjamin Lerer
Priority: Minor

 This issue was originally reported on the python-driver userlist and 
 confirmed by [~aholmber]
 When:
 page_size  limit  data size,
 the limit value is disregarded and all rows are paged back.
 to repro:
 create a table and populate it with two partitions
 CREATE TABLE paging_test ( id int, value text, PRIMARY KEY (id, value) )
 Add data: in one partition create 10 rows, an in a second partition create 20 
 rows
 perform a query with page_size of 10 and a LIMIT of 20, like so:
 SELECT * FROM paging_test where id in (1,2) LIMIT 20;
 The limit is disregarded and three pages of 10 records each will be returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-7622) Implement virtual tables

2015-01-06 Thread Benjamin Lerer (JIRA)

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

Benjamin Lerer reassigned CASSANDRA-7622:
-

Assignee: Benjamin Lerer

 Implement virtual tables
 

 Key: CASSANDRA-7622
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7622
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Tupshin Harper
Assignee: Benjamin Lerer
 Fix For: 3.1


 There are a variety of reasons to want virtual tables, which would be any 
 table that would be backed by an API, rather than data explicitly managed and 
 stored as sstables.
 One possible use case would be to expose JMX data through CQL as a 
 resurrection of CASSANDRA-3527.
 Another is a more general framework to implement the ability to expose yaml 
 configuration information. So it would be an alternate approach to 
 CASSANDRA-7370.
 A possible implementation would be in terms of CASSANDRA-7443, but I am not 
 presupposing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-7269) Make CqlInputFormat and CqlRecordReader consistent with comments

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-7269:
---
 Reviewer: Brandon Williams
Fix Version/s: 2.1.3

 Make CqlInputFormat and CqlRecordReader consistent with comments
 

 Key: CASSANDRA-7269
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7269
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Jeremy Hanna
Assignee: Rekha Joshi
Priority: Minor
  Labels: hadoop
 Fix For: 2.1.3

 Attachments: CASSANDRA-7269.txt


 Both the CqlInputFormat and CqlPagingInputFormat have the following comment:
 {code}
 /**
 ...
  *   the number of CQL rows per page
  *   CQLConfigHelper.setInputCQLPageRowSize. The default page row size is 
 1000. You 
  *   should set it to as big as possible, but no bigger. It set the LIMIT 
 for the CQL 
  *   query, so you need set it big enough to minimize the network overhead, 
 and also
  *   not too big to avoid out of memory issue.
 ...
 **/
 {code}
 The property is used in both classes, but the default is only set to 1000 in 
 CqlPagingRecordReader explicitly.
 We should either make the default part of the CqlConfigHelper so it's set in 
 both places or update the comments in the CqlInputFormat to say that if it's 
 not set, it will default to the java driver fetch size which is 5000.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8563) cqlsh broken for some thrift created tables.

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8563:
---
Assignee: Tyler Hobbs

 cqlsh broken for some thrift created tables.
 

 Key: CASSANDRA-8563
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8563
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
Reporter: Jeremiah Jordan
Assignee: Tyler Hobbs
  Labels: cqlsh
 Fix For: 2.1.3


 The new python driver based cqlsh is broken for some tables.  This was fixed 
 recently in: https://datastax-oss.atlassian.net/browse/PYTHON-192
 So we should pull in a new version of the python driver.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8347) 2.1.1: org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException after accidental computer crash

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-8347:


If your sstable is corrupt, run nodetool scrub against it, then repair. If that 
doesn't fix the problem, please re-open this.

 2.1.1: org.apache.cassandra.io.sstable.CorruptSSTableException: 
 java.io.EOFException after accidental computer crash
 

 Key: CASSANDRA-8347
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8347
 Project: Cassandra
  Issue Type: Bug
Reporter: Evgeny Pasynkov

 {code}9:08:56.972 [SSTableBatchOpen:1] ERROR o.a.c.service.CassandraDaemon - 
 Exception in thread Thread[SSTableBatchOpen:1,5,main]
 org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.init(CompressionMetadata.java:129)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.create(CompressionMetadata.java:83)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.util.CompressedSegmentedFile$Builder.metadata(CompressedSegmentedFile.java:50)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.util.CompressedPoolingSegmentedFile$Builder.complete(CompressedPoolingSegmentedFile.java:48)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:766) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:725) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:402) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:302) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader$4.run(SSTableReader.java:438) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
 ~[na:1.7.0_65]
  at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_65]
  at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  ~[na:1.7.0_65]
  at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_65]
  at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
 Caused by: java.io.EOFException: null
  at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340) 
 ~[na:1.7.0_65]
  at java.io.DataInputStream.readUTF(DataInputStream.java:589) ~[na:1.7.0_65]
  at java.io.DataInputStream.readUTF(DataInputStream.java:564) ~[na:1.7.0_65]
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.init(CompressionMetadata.java:104)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  ... 13 common frames omitted{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8347) 2.1.1: org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException after accidental computer crash

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson resolved CASSANDRA-8347.

Resolution: Not a Problem

 2.1.1: org.apache.cassandra.io.sstable.CorruptSSTableException: 
 java.io.EOFException after accidental computer crash
 

 Key: CASSANDRA-8347
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8347
 Project: Cassandra
  Issue Type: Bug
Reporter: Evgeny Pasynkov

 {code}9:08:56.972 [SSTableBatchOpen:1] ERROR o.a.c.service.CassandraDaemon - 
 Exception in thread Thread[SSTableBatchOpen:1,5,main]
 org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.EOFException
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.init(CompressionMetadata.java:129)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.create(CompressionMetadata.java:83)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.util.CompressedSegmentedFile$Builder.metadata(CompressedSegmentedFile.java:50)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.util.CompressedPoolingSegmentedFile$Builder.complete(CompressedPoolingSegmentedFile.java:48)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:766) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.load(SSTableReader.java:725) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:402) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader.open(SSTableReader.java:302) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at 
 org.apache.cassandra.io.sstable.SSTableReader$4.run(SSTableReader.java:438) 
 ~[cassandra-all-2.1.1.jar:2.1.1]
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
 ~[na:1.7.0_65]
  at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_65]
  at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  ~[na:1.7.0_65]
  at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_65]
  at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65]
 Caused by: java.io.EOFException: null
  at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340) 
 ~[na:1.7.0_65]
  at java.io.DataInputStream.readUTF(DataInputStream.java:589) ~[na:1.7.0_65]
  at java.io.DataInputStream.readUTF(DataInputStream.java:564) ~[na:1.7.0_65]
  at 
 org.apache.cassandra.io.compress.CompressionMetadata.init(CompressionMetadata.java:104)
  ~[cassandra-all-2.1.1.jar:2.1.1]
  ... 13 common frames omitted{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8570) org.apache.cassandra.db.compaction.CompactionsPurgeTest failing

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8570:
---
Description: 
The patch for CASSANDRA-8429 broke the tests 
{{org.apache.cassandra.db.compaction.CompactionsPurgeTest.testCompactionPurgeTombstonedRow}}
 and 
{{org.apache.cassandra.db.compaction.CompactionsPurgeTest.testRowTombstoneObservedBeforePurging}}

{code}
junit.framework.AssertionFailedError: 
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testCompactionPurgeTombstonedRow(CompactionsPurgeTest.java:308)
{code}

{code}expected:0 but was:1

 Stack Trace

junit.framework.AssertionFailedError: expected:0 but was:1
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testRowTombstoneObservedBeforePurging(CompactionsPurgeTest.java:372)

{code}

  was:
The patch for CASSANDRA-8429 broke the test 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge

{code}
java.lang.NullPointerException
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge(CompactionsPurgeTest.java:138)

 Standard Output

ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
{code}

Summary: org.apache.cassandra.db.compaction.CompactionsPurgeTest 
failing  (was: 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge
 failing)

 org.apache.cassandra.db.compaction.CompactionsPurgeTest failing
 ---

 Key: CASSANDRA-8570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8570
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Philip Thompson
Assignee: Marcus Eriksson
 Fix For: 2.1.3


 The patch for CASSANDRA-8429 broke the tests 
 {{org.apache.cassandra.db.compaction.CompactionsPurgeTest.testCompactionPurgeTombstonedRow}}
  and 
 {{org.apache.cassandra.db.compaction.CompactionsPurgeTest.testRowTombstoneObservedBeforePurging}}
 {code}
 junit.framework.AssertionFailedError: 
   at 
 org.apache.cassandra.db.compaction.CompactionsPurgeTest.testCompactionPurgeTombstonedRow(CompactionsPurgeTest.java:308)
 {code}
 {code}expected:0 but was:1
  Stack Trace
 junit.framework.AssertionFailedError: expected:0 but was:1
   at 
 org.apache.cassandra.db.compaction.CompactionsPurgeTest.testRowTombstoneObservedBeforePurging(CompactionsPurgeTest.java:372)
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (CASSANDRA-8403) limit disregarded when paging with IN clause under certain conditions

2015-01-06 Thread Russ Hatch (JIRA)

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

Russ Hatch resolved CASSANDRA-8403.
---
Resolution: Not a Problem

 limit disregarded when paging with IN clause under certain conditions
 -

 Key: CASSANDRA-8403
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8403
 Project: Cassandra
  Issue Type: Bug
Reporter: Russ Hatch
Assignee: Benjamin Lerer
Priority: Minor

 This issue was originally reported on the python-driver userlist and 
 confirmed by [~aholmber]
 When:
 page_size  limit  data size,
 the limit value is disregarded and all rows are paged back.
 to repro:
 create a table and populate it with two partitions
 CREATE TABLE paging_test ( id int, value text, PRIMARY KEY (id, value) )
 Add data: in one partition create 10 rows, an in a second partition create 20 
 rows
 perform a query with page_size of 10 and a LIMIT of 20, like so:
 SELECT * FROM paging_test where id in (1,2) LIMIT 20;
 The limit is disregarded and three pages of 10 records each will be returned.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8329) LeveledCompactionStrategy should split large files across data directories when compacting

2015-01-06 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna updated CASSANDRA-8329:

Fix Version/s: 2.1.3

 LeveledCompactionStrategy should split large files across data directories 
 when compacting
 --

 Key: CASSANDRA-8329
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8329
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: J.B. Langston
Assignee: Marcus Eriksson
 Fix For: 2.0.12, 2.1.3

 Attachments: 
 0001-get-new-sstable-directory-for-every-new-file-during-.patch, 
 test_no_patch_2.0.jpg, test_with_patch_2.0.jpg


 Because we fall back to STCS for L0 when LCS gets behind, the sstables in L0 
 can get quite large during sustained periods of heavy writes.  This can 
 result in large imbalances between data volumes when using JBOD support.  
 Eventually these large files get broken up as L0 sstables are moved up into 
 higher levels; however, because LCS only chooses a single volume on which to 
 write all of the sstables created during a single compaction, the imbalance 
 is persisted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8566) node crash (while auto-compaction?)

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8566:
---
Reproduced In: 2.1.2
Fix Version/s: 2.1.3

 node crash (while auto-compaction?)
 ---

 Key: CASSANDRA-8566
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8566
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux CentOS 6.6 64bit, Cassandra 2.1.2 (release)
Reporter: Dmitri Dmitrienko
 Fix For: 2.1.3

 Attachments: 1.log


 As data size became 20-24GB/node this issue started happening quite 
 frequently. With 7GB/node I didn't notice any crashes.
 HEAP size was 10GB, now increased to 16GB and it didn't help.
 Log is attached



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-8570) org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge failing

2015-01-06 Thread Philip Thompson (JIRA)
Philip Thompson created CASSANDRA-8570:
--

 Summary: 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge
 failing
 Key: CASSANDRA-8570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8570
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Philip Thompson
Assignee: Marcus Eriksson
 Fix For: 2.1.3


The patch for 8429 broke the test 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge

{code}
java.lang.NullPointerException
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge(CompactionsPurgeTest.java:138)

 Standard Output

ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread JIRA
Bartłomiej Romański created CASSANDRA-8571:
--

 Summary: Free space management does not work very well
 Key: CASSANDRA-8571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8571
 Project: Cassandra
  Issue Type: Bug
Reporter: Bartłomiej Romański


Hi all,

We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
(JBODs). We mostly use LCS.

Recently, our nodes starts failing with 'no space left on device'. It all 
started with our mistake - we let our LCS accumulate too much in L0.

As a result, STCS woke up and we end with some big sstables on each node (let's 
say 5-10 sstables, 20-50gb each).

During normal operation we keep our disks about 50% full. This gives about 200 
GB free space on each of them. This was too little for compacting all 
accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
failing...

Evantually, we managed to stabilized the situation (with some crazy code 
hacking, manually moving sstables etc...). However, there are a few things that 
would be more than helpful in recovering from such situations more 
automatically... 

First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
(local) variable: writeSize. I believe we should check somewhere here if we 
have enough space on a chosen disk. The problem is that writeSize is never 
read... Am I missing something here?

Btw, while in STCS we first look for the least overloaded disk, and then (if 
there are more than one such disks) for the one with the most free space 
(please note the sort order in Directories.getWriteableLocation()). That's 
often suboptimal (it's usually better to wait for the bigger disk than to 
compact fewer sstables now), but probably not crucial.

Second, the strategy (used by LCS) that we first choose target disk and then 
use it for whole compaction is not the best one. For big compactions (eg. after 
some massive operations like bootstrap or repair; or after some issues with LCS 
like in our case) on small drives (eg. JBOD of SSDs) these will never succeed. 
Much better strategy would be to choose target drive for each output sstable 
separately, or at least round robin them.

Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
LeveledManifest.getCandidatesFor() would be expanded to support also limit for 
total space. After fallback STCS in L0 you end up with very big sstables an 32 
of them is just too much for one compaction on a small drives.

We finally used some hack similar the last option (as it was the easiest one to 
implement in a hurry), but any improvents described above would save us from 
all this.

Thanks,
BR




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna commented on CASSANDRA-8571:
-

See CASSANDRA-8329.  That may be what you're looking for in 2.0.12.  Also 
related is CASSANDRA-7386.

 Free space management does not work very well
 -

 Key: CASSANDRA-8571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8571
 Project: Cassandra
  Issue Type: Bug
Reporter: Bartłomiej Romański

 Hi all,
 We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
 (JBODs). We mostly use LCS.
 Recently, our nodes starts failing with 'no space left on device'. It all 
 started with our mistake - we let our LCS accumulate too much in L0.
 As a result, STCS woke up and we end with some big sstables on each node 
 (let's say 5-10 sstables, 20-50gb each).
 During normal operation we keep our disks about 50% full. This gives about 
 200 GB free space on each of them. This was too little for compacting all 
 accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
 failing...
 Evantually, we managed to stabilized the situation (with some crazy code 
 hacking, manually moving sstables etc...). However, there are a few things 
 that would be more than helpful in recovering from such situations more 
 automatically... 
 First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
 (local) variable: writeSize. I believe we should check somewhere here if we 
 have enough space on a chosen disk. The problem is that writeSize is never 
 read... Am I missing something here?
 Btw, while in STCS we first look for the least overloaded disk, and then (if 
 there are more than one such disks) for the one with the most free space 
 (please note the sort order in Directories.getWriteableLocation()). That's 
 often suboptimal (it's usually better to wait for the bigger disk than to 
 compact fewer sstables now), but probably not crucial.
 Second, the strategy (used by LCS) that we first choose target disk and then 
 use it for whole compaction is not the best one. For big compactions (eg. 
 after some massive operations like bootstrap or repair; or after some issues 
 with LCS like in our case) on small drives (eg. JBOD of SSDs) these will 
 never succeed. Much better strategy would be to choose target drive for each 
 output sstable separately, or at least round robin them.
 Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
 LeveledManifest.getCandidatesFor() would be expanded to support also limit 
 for total space. After fallback STCS in L0 you end up with very big sstables 
 and 32 of them is just too much for one compaction on a small drives.
 We finally used some hack similar the last option (as it was the easiest one 
 to implement in a hurry), but any improvents described above would save us 
 from all this.
 Thanks,
 BR



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread Jeremy Hanna (JIRA)

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

Jeremy Hanna edited comment on CASSANDRA-8571 at 1/6/15 7:54 PM:
-

See CASSANDRA-8329.  That may be what you're looking for in the upcoming 2.1.3. 
 Also related is CASSANDRA-7386.


was (Author: jeromatron):
See CASSANDRA-8329.  That may be what you're looking for in 2.1.3 I believe.  
Also related is CASSANDRA-7386.

 Free space management does not work very well
 -

 Key: CASSANDRA-8571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8571
 Project: Cassandra
  Issue Type: Bug
Reporter: Bartłomiej Romański

 Hi all,
 We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
 (JBODs). We mostly use LCS.
 Recently, our nodes starts failing with 'no space left on device'. It all 
 started with our mistake - we let our LCS accumulate too much in L0.
 As a result, STCS woke up and we end with some big sstables on each node 
 (let's say 5-10 sstables, 20-50gb each).
 During normal operation we keep our disks about 50% full. This gives about 
 200 GB free space on each of them. This was too little for compacting all 
 accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
 failing...
 Evantually, we managed to stabilized the situation (with some crazy code 
 hacking, manually moving sstables etc...). However, there are a few things 
 that would be more than helpful in recovering from such situations more 
 automatically... 
 First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
 (local) variable: writeSize. I believe we should check somewhere here if we 
 have enough space on a chosen disk. The problem is that writeSize is never 
 read... Am I missing something here?
 Btw, while in STCS we first look for the least overloaded disk, and then (if 
 there are more than one such disks) for the one with the most free space 
 (please note the sort order in Directories.getWriteableLocation()). That's 
 often suboptimal (it's usually better to wait for the bigger disk than to 
 compact fewer sstables now), but probably not crucial.
 Second, the strategy (used by LCS) that we first choose target disk and then 
 use it for whole compaction is not the best one. For big compactions (eg. 
 after some massive operations like bootstrap or repair; or after some issues 
 with LCS like in our case) on small drives (eg. JBOD of SSDs) these will 
 never succeed. Much better strategy would be to choose target drive for each 
 output sstable separately, or at least round robin them.
 Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
 LeveledManifest.getCandidatesFor() would be expanded to support also limit 
 for total space. After fallback STCS in L0 you end up with very big sstables 
 and 32 of them is just too much for one compaction on a small drives.
 We finally used some hack similar the last option (as it was the easiest one 
 to implement in a hurry), but any improvents described above would save us 
 from all this.
 Thanks,
 BR



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7159) sstablemetadata command should print some more stuff

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-7159:


[~vsinjavin], any update on this? 2.1.3 is rolling out soon, and it would be 
nice to get this patch in.

 sstablemetadata command should print some more stuff
 

 Key: CASSANDRA-7159
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7159
 Project: Cassandra
  Issue Type: Improvement
  Components: Tools
Reporter: Jeremiah Jordan
Assignee: Vladislav Sinjavin
Priority: Trivial
  Labels: lhf
 Fix For: 2.1.3

 Attachments: 
 CASSANDRA-7159_-_sstablemetadata_command_should_print_some_more_stuff.patch


 It would be nice if the sstablemetadata command printed out some more of the 
 stuff we track.  Like the Min/Max column names and the min/max token in the 
 file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8041) Utility sstablesplit should prevent users from running when C* is running

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8041:
---
Fix Version/s: 2.0.12

 Utility sstablesplit should prevent users from running when C* is running
 -

 Key: CASSANDRA-8041
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8041
 Project: Cassandra
  Issue Type: Bug
  Components: Documentation  website, Tools
Reporter: Erick Ramirez
Priority: Minor
 Fix For: 2.0.12


 The sstablesplit utility is designed for use when C* is offline, but there is 
 nothing stopping the user from running it on a live system. There are also no 
 warning messages alerting the user to this effect.
 The help information should also be updated to explicitly state that the 
 utility should only be used when C* is offline.
 Finally, this utility is not included in any of the documentation. Please 
 update accordingly. Thanks.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (CASSANDRA-8569) org.apache.cassandra.db.KeyspaceTest failing

2015-01-06 Thread Philip Thompson (JIRA)
Philip Thompson created CASSANDRA-8569:
--

 Summary: org.apache.cassandra.db.KeyspaceTest failing
 Key: CASSANDRA-8569
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8569
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Philip Thompson
Assignee: Brandon Williams
 Fix For: 2.1.3


org.apache.cassandra.db.KeyspaceTest began failing after the patch for 
CASSANDRA-8245.

{code}
java.lang.NullPointerException
at 
org.apache.cassandra.db.KeyspaceTest.testGetSliceFromLarge(KeyspaceTest.java:425)
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8570) org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge failing

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8570:
---
Description: 
The patch for CASSANDRA-8429 broke the test 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge

{code}
java.lang.NullPointerException
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge(CompactionsPurgeTest.java:138)

 Standard Output

ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
{code}

  was:
The patch for 8429 broke the test 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge

{code}
java.lang.NullPointerException
at 
org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge(CompactionsPurgeTest.java:138)

 Standard Output

ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user defined 
compaction
{code}


 org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge
  failing
 

 Key: CASSANDRA-8570
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8570
 Project: Cassandra
  Issue Type: Bug
  Components: Tests
Reporter: Philip Thompson
Assignee: Marcus Eriksson
 Fix For: 2.1.3


 The patch for CASSANDRA-8429 broke the test 
 org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge
 {code}
 java.lang.NullPointerException
   at 
 org.apache.cassandra.db.compaction.CompactionsPurgeTest.testMinorCompactionPurge(CompactionsPurgeTest.java:138)
  Standard Output
 ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user 
 defined compaction
 ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user 
 defined compaction
 ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user 
 defined compaction
 ERROR 16:19:44 You can't mix repaired and unrepaired sstables in a user 
 defined compaction
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8552) Large compactions run out of off-heap RAM

2015-01-06 Thread Brent Haines (JIRA)

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

Brent Haines commented on CASSANDRA-8552:
-

Quick update - the node was cleared and has re-joined the cluster. It managed 
to work through the sync and resultant compactions (more than 500 jobs) without 
fail. This is a good sign, but it worked the first time too, failing during the 
first repair thereafter. 

I have started the repair this morning and we are part of the way through it. I 
will let you know if / when the issue reappears.

 Large compactions run out of off-heap RAM
 -

 Key: CASSANDRA-8552
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8552
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: Ubuntu 14.4 
 AWS EC2
 12 m1.xlarge nodes [4 cores, 16GB RAM, 1TB storage (251GB Used)]
 Java build 1.7.0_55-b13 and build 1.8.0_25-b17
Reporter: Brent Haines
Assignee: Benedict
Priority: Blocker
 Fix For: 2.1.3

 Attachments: Screen Shot 2015-01-02 at 9.36.11 PM.png, fhandles.log, 
 freelog.log, lsof.txt, meminfo.txt, sysctl.txt, system.log


 We have a large table of storing, effectively event logs and a pair of 
 denormalized tables for indexing.
 When updating from 2.0 to 2.1 we saw performance improvements, but some 
 random and silent crashes during nightly repairs. We lost a node (totally 
 corrupted) and replaced it. That node has never stabilized -- it simply can't 
 finish the compactions. 
 Smaller compactions finish. Larger compactions, like these two never finish - 
 {code}
 pending tasks: 48
compaction type   keyspace table completed total   
  unit   progress
 Compaction   data   stories   16532973358   75977993784   
 bytes 21.76%
 Compaction   data   stories_by_text   10593780658   38555048812   
 bytes 27.48%
 Active compaction remaining time :   0h10m51s
 {code}
 We are not getting exceptions and are not running out of heap space. The 
 Ubuntu OOM killer is reaping the process after all of the memory is consumed. 
 We watch memory in the opscenter console and it will grow. If we turn off the 
 OOM killer for the process, it will run until everything else is killed 
 instead and then the kernel panics.
 We have the following settings configured: 
 2G Heap
 512M New
 {code}
 memtable_heap_space_in_mb: 1024
 memtable_offheap_space_in_mb: 1024
 memtable_allocation_type: heap_buffers
 commitlog_total_space_in_mb: 2048
 concurrent_compactors: 1
 compaction_throughput_mb_per_sec: 128
 {code}
 The compaction strategy is leveled (these are read-intensive tables that are 
 rarely updated)
 I have tried every setting, every option and I have the system where the MTBF 
 is about an hour now, but we never finish compacting because there are some 
 large compactions pending. None of the GC tools or settings help because it 
 is not a GC problem. It is an off-heap memory problem.
 We are getting these messages in our syslog 
 {code}
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219527] BUG: Bad page map in 
 process java  pte:0320 pmd:2d6fa5067
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219545] addr:7fb820be3000 
 vm_flags:0870 anon_vma:  (null) mapping:  (null) 
 index:7fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219556] CPU: 3 PID: 27344 
 Comm: java Tainted: GB3.13.0-24-generic #47-Ubuntu
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219559]  880028510e40 
 88020d43da98 81715ac4 7fb820be3000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219565]  88020d43dae0 
 81174183 0320 0007fb820be3
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219568]  8802d6fa5f18 
 0320 7fb820be3000 7fb820be4000
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219572] Call Trace:
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219584]  [81715ac4] 
 dump_stack+0x45/0x56
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219591]  [81174183] 
 print_bad_pte+0x1a3/0x250
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219594]  [81175439] 
 vm_normal_page+0x69/0x80
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219598]  [8117580b] 
 unmap_page_range+0x3bb/0x7f0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219602]  [81175cc1] 
 unmap_single_vma+0x81/0xf0
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219605]  [81176d39] 
 unmap_vmas+0x49/0x90
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219610]  [8117feec] 
 exit_mmap+0x9c/0x170
 Jan  2 07:06:00 ip-10-0-2-226 kernel: [49801151.219617]  [8110fcf3] 
 ? __delayacct_add_tsk+0x153/0x170
 Jan  2 

[jira] [Updated] (CASSANDRA-8357) ArrayOutOfBounds in cassandra-stress with inverted exponential distribution

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8357:
---
Reproduced In: 2.1.1
Fix Version/s: 2.1.3

 ArrayOutOfBounds in cassandra-stress with inverted exponential distribution
 ---

 Key: CASSANDRA-8357
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8357
 Project: Cassandra
  Issue Type: Bug
  Components: Tools
 Environment: 6-node cassandra cluster (2.1.1) on debian.
Reporter: Jens Preußner
 Fix For: 2.1.3


 When using the CQLstress example from GitHub 
 (https://github.com/apache/cassandra/blob/trunk/tools/cqlstress-example.yaml) 
 with an inverted exponential distribution in the insert-partitions field, 
 generated threads fail with
 Exception in thread Thread-20 java.lang.ArrayIndexOutOfBoundsException: 20 
 at 
 org.apache.cassandra.stress.StressAction$Consumer.run(StressAction.java:307)
 See the gist https://gist.github.com/jenzopr/9edde53122554729c852 for the 
 typetest.yaml I used.
 The call was:
 cassandra-stress user profile=typetest.yaml ops\(insert=1\) -node $NODES



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8499) Ensure SSTableWriter cleans up properly after failure

2015-01-06 Thread Benedict (JIRA)

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

Benedict updated CASSANDRA-8499:

Attachment: 8499-21v3

Heh. Looks like we were previously instead at risk of leaking the directory 
file descriptor, if we aborted prior to closing. While the new behaviour was 
benign, a simple modification avoids it

 Ensure SSTableWriter cleans up properly after failure
 -

 Key: CASSANDRA-8499
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8499
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 2.0.12

 Attachments: 8499-20.txt, 8499-20v2, 8499-21.txt, 8499-21v2, 8499-21v3


 In 2.0 we do not free a bloom filter, in 2.1 we do not free a small piece of 
 offheap memory for writing compression metadata. In both we attempt to flush 
 the BF despite having encountered an exception, making the exception slow to 
 propagate.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (CASSANDRA-8559) OOM caused by large tombstone warning.

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson updated CASSANDRA-8559:
---
Fix Version/s: 2.0.12

 OOM caused by large tombstone warning.
 --

 Key: CASSANDRA-8559
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8559
 Project: Cassandra
  Issue Type: Bug
  Components: Core
 Environment: 2.0.11 / 2.1
Reporter: Dominic Letz
 Fix For: 2.0.12

 Attachments: Selection_048.png, stacktrace.log


 When running with high amount of tombstones the error message generation from 
 CASSANDRA-6117 can lead to out of memory situation with the default setting.
 Attached a heapdump viewed in visualvm showing how this construct created two 
 777mb strings to print the error message for a read query and then crashed 
 OOM.
 {code}
 if (respectTombstoneThresholds()  columnCounter.ignored()  
 DatabaseDescriptor.getTombstoneWarnThreshold())
 {
 StringBuilder sb = new StringBuilder();
 CellNameType type = container.metadata().comparator;
 for (ColumnSlice sl : slices)
 {
 assert sl != null;
 sb.append('[');
 sb.append(type.getString(sl.start));
 sb.append('-');
 sb.append(type.getString(sl.finish));
 sb.append(']');
 }
 logger.warn(Read {} live and {} tombstoned cells in {}.{} (see 
 tombstone_warn_threshold). {} columns was requested, slices={}, delInfo={},
 columnCounter.live(), columnCounter.ignored(), 
 container.metadata().ksName, container.metadata().cfName, count, sb, 
 container.deletionInfo());
 }
 {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8448) Comparison method violates its general contract in AbstractEndpointSnitch

2015-01-06 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-8448:
-

compareEndpoints() doesn't snapshot, it uses the values from the shared 
scores object property, and sortByProximityWithScore ultimately delegates to 
this.


 Comparison method violates its general contract in AbstractEndpointSnitch
 ---

 Key: CASSANDRA-8448
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8448
 Project: Cassandra
  Issue Type: Bug
Reporter: J.B. Langston
Assignee: Brandon Williams

 Seen in both 1.2 and 2.0.  The error is occurring here: 
 https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/locator/AbstractEndpointSnitch.java#L49
 {code}
 ERROR [Thrift:9] 2014-12-04 20:12:28,732 CustomTThreadPoolServer.java (line 
 219) Error occurred during processing of message.
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.IllegalArgumentException: Comparison method violates its general 
 contract!
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2199)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3932)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3936)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4806)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:352)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:224)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:218)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:202)
   at 
 org.apache.cassandra.thrift.CassandraServer.createMutationList(CassandraServer.java:822)
   at 
 org.apache.cassandra.thrift.CassandraServer.batch_mutate(CassandraServer.java:954)
   at com.datastax.bdp.server.DseServer.batch_mutate(DseServer.java:576)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.getResult(Cassandra.java:3922)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$batch_mutate.getResult(Cassandra.java:3906)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201)
   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:745)
 Caused by: java.lang.IllegalArgumentException: Comparison method violates its 
 general contract!
   at java.util.TimSort.mergeHi(TimSort.java:868)
   at java.util.TimSort.mergeAt(TimSort.java:485)
   at java.util.TimSort.mergeCollapse(TimSort.java:410)
   at java.util.TimSort.sort(TimSort.java:214)
   at java.util.TimSort.sort(TimSort.java:173)
   at java.util.Arrays.sort(Arrays.java:659)
   at java.util.Collections.sort(Collections.java:217)
   at 
 org.apache.cassandra.locator.AbstractEndpointSnitch.sortByProximity(AbstractEndpointSnitch.java:49)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithScore(DynamicEndpointSnitch.java:157)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximityWithBadness(DynamicEndpointSnitch.java:186)
   at 
 org.apache.cassandra.locator.DynamicEndpointSnitch.sortByProximity(DynamicEndpointSnitch.java:151)
   at 
 org.apache.cassandra.service.StorageProxy.getLiveSortedEndpoints(StorageProxy.java:1408)
   at 
 org.apache.cassandra.service.StorageProxy.getLiveSortedEndpoints(StorageProxy.java:1402)
   at 
 org.apache.cassandra.service.AbstractReadExecutor.getReadExecutor(AbstractReadExecutor.java:148)
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1223)
   at 
 org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1165)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:255)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:225)
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:243)
   at org.apache.cassandra.auth.Auth.isSuperuser(Auth.java:84)
   at 
 org.apache.cassandra.auth.AuthenticatedUser.isSuper(AuthenticatedUser.java:50)
   at 
 org.apache.cassandra.auth.CassandraAuthorizer.authorize(CassandraAuthorizer.java:69)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:338)
   at 

[jira] [Commented] (CASSANDRA-8499) Ensure SSTableWriter cleans up properly after failure

2015-01-06 Thread Marcus Eriksson (JIRA)

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

Marcus Eriksson commented on CASSANDRA-8499:


+1  (remove the unused boolean closed in SequentialWriter on commit)

 Ensure SSTableWriter cleans up properly after failure
 -

 Key: CASSANDRA-8499
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8499
 Project: Cassandra
  Issue Type: Bug
  Components: Core
Reporter: Benedict
Assignee: Benedict
 Fix For: 2.0.12

 Attachments: 8499-20.txt, 8499-20v2, 8499-21.txt, 8499-21v2, 8499-21v3


 In 2.0 we do not free a bloom filter, in 2.1 we do not free a small piece of 
 offheap memory for writing compression metadata. In both we attempt to flush 
 the BF despite having encountered an exception, making the exception slow to 
 propagate.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8566) node crash (while auto-compaction?)

2015-01-06 Thread Philip Thompson (JIRA)

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

Philip Thompson commented on CASSANDRA-8566:


This looks possibly related to CASSANDRA-8552

 node crash (while auto-compaction?)
 ---

 Key: CASSANDRA-8566
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8566
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux CentOS 6.6 64bit, Cassandra 2.1.2 (release)
Reporter: Dmitri Dmitrienko
 Fix For: 2.1.3

 Attachments: 1.log


 As data size became 20-24GB/node this issue started happening quite 
 frequently. With 7GB/node I didn't notice any crashes.
 HEAP size was 10GB, now increased to 16GB and it didn't help.
 Log is attached



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8518) Cassandra Query Request Size Estimator

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8518:
---

WDYT [~benedict]?

 Cassandra Query Request Size Estimator
 --

 Key: CASSANDRA-8518
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8518
 Project: Cassandra
  Issue Type: Improvement
  Components: Core
Reporter: Cheng Ren

 We have been suffering from cassandra node crash due to out of memory for a 
 long time. The heap dump from the recent crash shows there are 22 native 
 transport request threads each of which consumes 3.3% of heap size, taking 
 more than 70% in total.  
 Heap dump:
 !https://dl-web.dropbox.com/get/attach1.png?_subject_uid=303980955w=AAAVOoncBoZ5aOPbDg2TpRkUss7B-2wlrnhUAv19b27OUA|height=400,width=600!
 Expanded view of one thread:
 !https://dl-web.dropbox.com/get/Screen%20Shot%202014-12-18%20at%204.06.29%20PM.png?_subject_uid=303980955w=AACUO4wrbxheRUxv8fwQ9P52T6gBOm5_g9zeIe8odu3V3w|height=400,width=600!
 The cassandra we are using now (2.0.4) utilized MemoryAwareThreadPoolExecutor 
 as the request executor and provided a default request size estimator which 
 constantly returns 1, meaning it limits only the number of requests being 
 pushed to the pool. To have more fine-grained control on handling requests 
 and better protect our node from OOM issue, we propose implementing a more 
 precise estimator. 
 Here is our two cents:
 For update/delete/insert request: Size could be estimated by adding size of 
 all class members together.
 For scan query, the major part of the request is response, which can be 
 estimated from the history data. For example if we receive a scan query on a 
 column family for a certain token range, we keep track of its response size 
 used as the estimated response size for later scan query on the same cf. 
 For future requests on the same cf, response size could be calculated by 
 token range*recorded size/ recorded token range. The request size should be 
 estimated as (query size + estimated response size).
 We believe what we're proposing here can be useful for other people in the 
 Cassandra community as well. Would you mind providing us feedbacks? Please 
 let us know if you have any concerns or suggestions regarding this proposal.
 Thanks,
 Cheng



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[3/6] cassandra git commit: Remove C* specific class from JMX API

2015-01-06 Thread yukim
Remove C* specific class from JMX API

This is follow up for CASSANDRA-8193


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

Branch: refs/heads/trunk
Commit: e20810c7bdf81b2ea225d1356ac3237994fb5349
Parents: eb9c5bb
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 14:24:37 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 14:24:37 2015 -0600

--
 .../cassandra/service/StorageService.java   | 25 +---
 .../cassandra/service/StorageServiceMBean.java  |  9 +++
 .../org/apache/cassandra/tools/NodeProbe.java   |  4 ++--
 3 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e20810c7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 3daa66f..8085d7b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2414,18 +2414,22 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairAsync(final String keyspace, final boolean 
isSequential, final CollectionString dataCenters, final CollectionString 
hosts, final boolean primaryRange, final String... columnFamilies)
 {
-return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, columnFamilies);
+return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, columnFamilies);
 }
 
-public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
+public int forceRepairAsync(final String keyspace, final int 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
 {
+if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+{
+throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+}
 // when repairing only primary range, dataCenter nor hosts can be set
 if (primaryRange  (dataCenters != null || hosts != null))
 {
 throw new IllegalArgumentException(You need to run primary range 
repair on all nodes in the cluster.);
 }
 final CollectionRangeToken ranges = primaryRange ? 
getLocalPrimaryRanges(keyspace) : getLocalRanges(keyspace);
-return forceRepairAsync(keyspace, parallelismDegree, dataCenters, 
hosts, ranges, columnFamilies);
+return forceRepairAsync(keyspace, 
RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, 
columnFamilies);
 }
 
 public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts,  final CollectionRangeToken ranges, final 
String... columnFamilies)
@@ -2469,22 +2473,27 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, boolean isSequential, CollectionString dataCenters, 
final CollectionString hosts, final String... columnFamilies)
 {
-return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, 
dataCenters, hosts, columnFamilies);
+return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL.ordinal() : 
RepairParallelism.PARALLEL.ordinal(), dataCenters, hosts, columnFamilies);
 }
 
-public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, RepairParallelism parallelismDegree, CollectionString 
dataCenters, final CollectionString hosts, final String... columnFamilies)
+public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, int parallelismDegree, CollectionString dataCenters, 
final CollectionString hosts, final String... columnFamilies)
 {
+if (parallelismDegree  0 || parallelismDegree 

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

2015-01-06 Thread yukim
Merge branch 'cassandra-2.1' into trunk

Conflicts:
src/java/org/apache/cassandra/service/StorageService.java
src/java/org/apache/cassandra/service/StorageServiceMBean.java
src/java/org/apache/cassandra/tools/NodeProbe.java


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

Branch: refs/heads/trunk
Commit: 9529fba6679e903375ec935467de1017a1f4574f
Parents: ffb7f64 f8b43d4
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 16:02:12 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 16:02:12 2015 -0600

--
 .../cassandra/service/StorageService.java   | 30 +---
 .../cassandra/service/StorageServiceMBean.java  | 23 +++
 2 files changed, 37 insertions(+), 16 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9529fba6/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 391f890,b961381..4740cd3
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -2430,153 -2495,122 +2430,163 @@@ public class StorageService extends Not
  sendNotification(jmxNotification);
  }
  
 -public int forceRepairAsync(String keyspace, boolean isSequential, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies) throws IOException
 +public int repairAsync(String keyspace, MapString, String repairSpec)
 +{
 +RepairOption option = RepairOption.parse(repairSpec, 
getPartitioner());
 +// if ranges are not specified
 +if (option.getRanges().isEmpty())
 +{
 +if (option.isPrimaryRange())
 +{
 +// when repairing only primary range, neither dataCenters nor 
hosts can be set
 +if (option.getDataCenters().isEmpty()  
option.getHosts().isEmpty())
 +option.getRanges().addAll(getPrimaryRanges(keyspace));
 +// except dataCenters only contain local DC (i.e. -local)
 +else if (option.getDataCenters().size() == 1  
option.getDataCenters().contains(DatabaseDescriptor.getLocalDataCenter()))
 +
option.getRanges().addAll(getPrimaryRangesWithinDC(keyspace));
 +else
 +throw new IllegalArgumentException(You need to run 
primary range repair on all nodes in the cluster.);
 +}
 +else
 +{
 +option.getRanges().addAll(getLocalRanges(keyspace));
 +}
 +}
 +return forceRepairAsync(keyspace, option);
 +}
 +
 +@Deprecated
 +public int forceRepairAsync(String keyspace,
 +boolean isSequential,
 +CollectionString dataCenters,
 +CollectionString hosts,
 +boolean primaryRange,
 +boolean fullRepair,
 +String... columnFamilies)
  {
- return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, fullRepair, columnFamilies);
+ return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, fullRepair, columnFamilies);
  }
  
 -public int forceRepairAsync(String keyspace, int parallelismDegree, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies)
 +@Deprecated
 +public int forceRepairAsync(String keyspace,
- RepairParallelism parallelismDegree,
++int parallelismDegree,
 +CollectionString dataCenters,
 +CollectionString hosts,
 +boolean primaryRange,
 +boolean fullRepair,
 +String... columnFamilies)
  {
- if (FBUtilities.isWindows()  parallelismDegree != 
RepairParallelism.PARALLEL)
+ if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+ {
+ throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+ }
 -  

[1/6] cassandra git commit: Remove C* specific class from JMX API

2015-01-06 Thread yukim
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 eb9c5bbcf - e20810c7b
  refs/heads/cassandra-2.1 136042ec3 - f8b43d4a8
  refs/heads/trunk ffb7f6491 - 9529fba66


Remove C* specific class from JMX API

This is follow up for CASSANDRA-8193


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

Branch: refs/heads/cassandra-2.0
Commit: e20810c7bdf81b2ea225d1356ac3237994fb5349
Parents: eb9c5bb
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 14:24:37 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 14:24:37 2015 -0600

--
 .../cassandra/service/StorageService.java   | 25 +---
 .../cassandra/service/StorageServiceMBean.java  |  9 +++
 .../org/apache/cassandra/tools/NodeProbe.java   |  4 ++--
 3 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e20810c7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 3daa66f..8085d7b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2414,18 +2414,22 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairAsync(final String keyspace, final boolean 
isSequential, final CollectionString dataCenters, final CollectionString 
hosts, final boolean primaryRange, final String... columnFamilies)
 {
-return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, columnFamilies);
+return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, columnFamilies);
 }
 
-public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
+public int forceRepairAsync(final String keyspace, final int 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
 {
+if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+{
+throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+}
 // when repairing only primary range, dataCenter nor hosts can be set
 if (primaryRange  (dataCenters != null || hosts != null))
 {
 throw new IllegalArgumentException(You need to run primary range 
repair on all nodes in the cluster.);
 }
 final CollectionRangeToken ranges = primaryRange ? 
getLocalPrimaryRanges(keyspace) : getLocalRanges(keyspace);
-return forceRepairAsync(keyspace, parallelismDegree, dataCenters, 
hosts, ranges, columnFamilies);
+return forceRepairAsync(keyspace, 
RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, 
columnFamilies);
 }
 
 public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts,  final CollectionRangeToken ranges, final 
String... columnFamilies)
@@ -2469,22 +2473,27 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, boolean isSequential, CollectionString dataCenters, 
final CollectionString hosts, final String... columnFamilies)
 {
-return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, 
dataCenters, hosts, columnFamilies);
+return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL.ordinal() : 
RepairParallelism.PARALLEL.ordinal(), dataCenters, hosts, columnFamilies);
 }
 
-public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, RepairParallelism parallelismDegree, CollectionString 
dataCenters, final CollectionString hosts, final String... columnFamilies)
+public int forceRepairRangeAsync(String beginToken, String endToken, final 
String 

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

2015-01-06 Thread yukim
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/service/StorageService.java
src/java/org/apache/cassandra/service/StorageServiceMBean.java
src/java/org/apache/cassandra/tools/NodeProbe.java


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

Branch: refs/heads/trunk
Commit: f8b43d4a811b0a7d9e88fb19d0aa4a6bf9117cc7
Parents: 136042e e20810c
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 14:26:05 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 14:26:05 2015 -0600

--
 .../cassandra/service/StorageService.java   | 22 ++--
 .../cassandra/service/StorageServiceMBean.java  |  9 
 .../org/apache/cassandra/tools/NodeProbe.java   |  4 ++--
 3 files changed, 23 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8b43d4a/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index cc23712,8085d7b..b961381
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -2495,39 -2412,27 +2495,43 @@@ public class StorageService extends Not
  sendNotification(jmxNotification);
  }
  
 -public int forceRepairAsync(final String keyspace, final boolean 
isSequential, final CollectionString dataCenters, final CollectionString 
hosts, final boolean primaryRange, final String... columnFamilies)
 +public int forceRepairAsync(String keyspace, boolean isSequential, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies) throws IOException
  {
- return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, fullRepair, columnFamilies);
 -return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, columnFamilies);
++return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, fullRepair, columnFamilies);
  }
  
- public int forceRepairAsync(String keyspace, RepairParallelism 
parallelismDegree, CollectionString dataCenters, CollectionString hosts, 
boolean primaryRange, boolean fullRepair, String... columnFamilies)
 -public int forceRepairAsync(final String keyspace, final int 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
++public int forceRepairAsync(String keyspace, int parallelismDegree, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies)
  {
+ if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+ {
+ throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+ }
 -// when repairing only primary range, dataCenter nor hosts can be set
 -if (primaryRange  (dataCenters != null || hosts != null))
 +CollectionRangeToken ranges;
 +if (primaryRange)
 +{
 +// when repairing only primary range, neither dataCenters nor 
hosts can be set
 +if (dataCenters == null  hosts == null)
 +ranges = getPrimaryRanges(keyspace);
 +// except dataCenters only contain local DC (i.e. -local)
 +else if (dataCenters != null  dataCenters.size() == 1  
dataCenters.contains(DatabaseDescriptor.getLocalDataCenter()))
 +ranges = getPrimaryRangesWithinDC(keyspace);
 +else
 +throw new IllegalArgumentException(You need to run primary 
range repair on all nodes in the cluster.);
 +}
 +else
  {
 -throw new IllegalArgumentException(You need to run primary range 
repair on all nodes in the cluster.);
 + ranges = getLocalRanges(keyspace);
  }
 -final CollectionRangeToken ranges = primaryRange ? 
getLocalPrimaryRanges(keyspace) : getLocalRanges(keyspace);
 -return forceRepairAsync(keyspace, 
RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, 
columnFamilies);
 +
- return forceRepairAsync(keyspace, 

[2/6] cassandra git commit: Remove C* specific class from JMX API

2015-01-06 Thread yukim
Remove C* specific class from JMX API

This is follow up for CASSANDRA-8193


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

Branch: refs/heads/cassandra-2.1
Commit: e20810c7bdf81b2ea225d1356ac3237994fb5349
Parents: eb9c5bb
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 14:24:37 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 14:24:37 2015 -0600

--
 .../cassandra/service/StorageService.java   | 25 +---
 .../cassandra/service/StorageServiceMBean.java  |  9 +++
 .../org/apache/cassandra/tools/NodeProbe.java   |  4 ++--
 3 files changed, 24 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e20810c7/src/java/org/apache/cassandra/service/StorageService.java
--
diff --git a/src/java/org/apache/cassandra/service/StorageService.java 
b/src/java/org/apache/cassandra/service/StorageService.java
index 3daa66f..8085d7b 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -2414,18 +2414,22 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairAsync(final String keyspace, final boolean 
isSequential, final CollectionString dataCenters, final CollectionString 
hosts, final boolean primaryRange, final String... columnFamilies)
 {
-return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, columnFamilies);
+return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, columnFamilies);
 }
 
-public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
+public int forceRepairAsync(final String keyspace, final int 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
 {
+if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+{
+throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+}
 // when repairing only primary range, dataCenter nor hosts can be set
 if (primaryRange  (dataCenters != null || hosts != null))
 {
 throw new IllegalArgumentException(You need to run primary range 
repair on all nodes in the cluster.);
 }
 final CollectionRangeToken ranges = primaryRange ? 
getLocalPrimaryRanges(keyspace) : getLocalRanges(keyspace);
-return forceRepairAsync(keyspace, parallelismDegree, dataCenters, 
hosts, ranges, columnFamilies);
+return forceRepairAsync(keyspace, 
RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, 
columnFamilies);
 }
 
 public int forceRepairAsync(final String keyspace, final RepairParallelism 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts,  final CollectionRangeToken ranges, final 
String... columnFamilies)
@@ -2469,22 +2473,27 @@ public class StorageService extends 
NotificationBroadcasterSupport implements IE
 
 public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, boolean isSequential, CollectionString dataCenters, 
final CollectionString hosts, final String... columnFamilies)
 {
-return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, 
dataCenters, hosts, columnFamilies);
+return forceRepairRangeAsync(beginToken, endToken, keyspaceName, 
isSequential ? RepairParallelism.SEQUENTIAL.ordinal() : 
RepairParallelism.PARALLEL.ordinal(), dataCenters, hosts, columnFamilies);
 }
 
-public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, RepairParallelism parallelismDegree, CollectionString 
dataCenters, final CollectionString hosts, final String... columnFamilies)
+public int forceRepairRangeAsync(String beginToken, String endToken, final 
String keyspaceName, int parallelismDegree, CollectionString dataCenters, 
final CollectionString hosts, final String... columnFamilies)
 {
+if (parallelismDegree  0 || 

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

2015-01-06 Thread yukim
Merge branch 'cassandra-2.0' into cassandra-2.1

Conflicts:
src/java/org/apache/cassandra/service/StorageService.java
src/java/org/apache/cassandra/service/StorageServiceMBean.java
src/java/org/apache/cassandra/tools/NodeProbe.java


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

Branch: refs/heads/cassandra-2.1
Commit: f8b43d4a811b0a7d9e88fb19d0aa4a6bf9117cc7
Parents: 136042e e20810c
Author: Yuki Morishita yu...@apache.org
Authored: Tue Jan 6 14:26:05 2015 -0600
Committer: Yuki Morishita yu...@apache.org
Committed: Tue Jan 6 14:26:05 2015 -0600

--
 .../cassandra/service/StorageService.java   | 22 ++--
 .../cassandra/service/StorageServiceMBean.java  |  9 
 .../org/apache/cassandra/tools/NodeProbe.java   |  4 ++--
 3 files changed, 23 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f8b43d4a/src/java/org/apache/cassandra/service/StorageService.java
--
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index cc23712,8085d7b..b961381
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -2495,39 -2412,27 +2495,43 @@@ public class StorageService extends Not
  sendNotification(jmxNotification);
  }
  
 -public int forceRepairAsync(final String keyspace, final boolean 
isSequential, final CollectionString dataCenters, final CollectionString 
hosts, final boolean primaryRange, final String... columnFamilies)
 +public int forceRepairAsync(String keyspace, boolean isSequential, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies) throws IOException
  {
- return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL : RepairParallelism.PARALLEL, dataCenters, hosts, 
primaryRange, fullRepair, columnFamilies);
 -return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, columnFamilies);
++return forceRepairAsync(keyspace, isSequential ? 
RepairParallelism.SEQUENTIAL.ordinal() : RepairParallelism.PARALLEL.ordinal(), 
dataCenters, hosts, primaryRange, fullRepair, columnFamilies);
  }
  
- public int forceRepairAsync(String keyspace, RepairParallelism 
parallelismDegree, CollectionString dataCenters, CollectionString hosts, 
boolean primaryRange, boolean fullRepair, String... columnFamilies)
 -public int forceRepairAsync(final String keyspace, final int 
parallelismDegree, final CollectionString dataCenters, final 
CollectionString hosts, final boolean primaryRange, final String... 
columnFamilies)
++public int forceRepairAsync(String keyspace, int parallelismDegree, 
CollectionString dataCenters, CollectionString hosts, boolean primaryRange, 
boolean fullRepair, String... columnFamilies)
  {
+ if (parallelismDegree  0 || parallelismDegree  
RepairParallelism.values().length - 1)
+ {
+ throw new IllegalArgumentException(Invalid parallelism degree 
specified:  + parallelismDegree);
+ }
 -// when repairing only primary range, dataCenter nor hosts can be set
 -if (primaryRange  (dataCenters != null || hosts != null))
 +CollectionRangeToken ranges;
 +if (primaryRange)
 +{
 +// when repairing only primary range, neither dataCenters nor 
hosts can be set
 +if (dataCenters == null  hosts == null)
 +ranges = getPrimaryRanges(keyspace);
 +// except dataCenters only contain local DC (i.e. -local)
 +else if (dataCenters != null  dataCenters.size() == 1  
dataCenters.contains(DatabaseDescriptor.getLocalDataCenter()))
 +ranges = getPrimaryRangesWithinDC(keyspace);
 +else
 +throw new IllegalArgumentException(You need to run primary 
range repair on all nodes in the cluster.);
 +}
 +else
  {
 -throw new IllegalArgumentException(You need to run primary range 
repair on all nodes in the cluster.);
 + ranges = getLocalRanges(keyspace);
  }
 -final CollectionRangeToken ranges = primaryRange ? 
getLocalPrimaryRanges(keyspace) : getLocalRanges(keyspace);
 -return forceRepairAsync(keyspace, 
RepairParallelism.values()[parallelismDegree], dataCenters, hosts, ranges, 
columnFamilies);
 +
- return 

[jira] [Commented] (CASSANDRA-8566) node crash (while auto-compaction?)

2015-01-06 Thread Dmitri Dmitrienko (JIRA)

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

Dmitri Dmitrienko commented on CASSANDRA-8566:
--

sorry, I have neither root privileges nor even console access to the hosts, 
it's SGE. But if you provide an updated cassandra jar that will grab all info 
necessary to resolve this issue, I'll give it a try.

 node crash (while auto-compaction?)
 ---

 Key: CASSANDRA-8566
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8566
 Project: Cassandra
  Issue Type: Bug
 Environment: Linux CentOS 6.6 64bit, Cassandra 2.1.2 (release)
Reporter: Dmitri Dmitrienko
 Fix For: 2.1.3

 Attachments: 1.log


 As data size became 20-24GB/node this issue started happening quite 
 frequently. With 7GB/node I didn't notice any crashes.
 HEAP size was 10GB, now increased to 16GB and it didn't help.
 Log is attached



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


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

2015-01-06 Thread aleksey
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/edf48f81
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/edf48f81
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/edf48f81

Branch: refs/heads/trunk
Commit: edf48f81739d45978460a3413bad7252a34636d9
Parents: f8b43d4 e27cdf9
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:25:59 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:25:59 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf48f81/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--



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

2015-01-06 Thread aleksey
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/e1e28d0f
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e1e28d0f
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e1e28d0f

Branch: refs/heads/trunk
Commit: e1e28d0f0d9a6b4bca97cfd081c042180814bff3
Parents: 9529fba edf48f8
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:26:43 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:26:43 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1e28d0f/examples/hadoop_cql3_word_count/src/WordCount.java
--

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e1e28d0f/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--



[1/3] cassandra git commit: Revert fix references to defunct CqlPagingInputFormat

2015-01-06 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/trunk 9529fba66 - e1e28d0f0


Revert fix references to defunct CqlPagingInputFormat

This reverts commit e550ea60212e933f3849a11717ba4ef916fc4aa3.


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

Branch: refs/heads/trunk
Commit: e27cdf935c73f5d51ce920cf3245eca58219ceb1
Parents: e20810c
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:25:09 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:25:09 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCount.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCount.java 
b/examples/hadoop_cql3_word_count/src/WordCount.java
index 6a2f846..519a98f 100644
--- a/examples/hadoop_cql3_word_count/src/WordCount.java
+++ b/examples/hadoop_cql3_word_count/src/WordCount.java
@@ -26,6 +26,7 @@ import org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.cassandra.hadoop.ConfigHelper;
 import org.apache.cassandra.utils.ByteBufferUtil;
@@ -246,7 +247,7 @@ public class WordCount extends Configured implements Tool
 else
 {
 job.setMapperClass(TokenizerMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCountCounters.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCountCounters.java 
b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
index 150d18d..74de9ab 100644
--- a/examples/hadoop_cql3_word_count/src/WordCountCounters.java
+++ b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.hadoop.cql3.CqlConfigHelper;
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
@@ -155,7 +156,7 @@ public class WordCountCounters extends Configured 
implements Tool
 else
 {
 job.setMapperClass(SumMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
index 6c50ab2..53f3900 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
@@ -74,7 +74,7 @@ public class CqlStorage extends AbstractCassandraStorage
 {
 super();
 this.pageSize = pageSize;
-DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlInputFormat;
+DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 DEFAULT_OUTPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 }   
 



[jira] [Comment Edited] (CASSANDRA-7970) JSON support for CQL

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis edited comment on CASSANDRA-7970 at 1/6/15 11:35 PM:


I could go either way.  On the one hand, my experience with weak typing (js, 
perl) leads me to think it is a misfeature, so we should limit its scope to the 
json context where the limited spec forces us to do so.  But I'm not sure if 
that objection really applies to a non-procedural language like SQL.  Are there 
other weakly typed SQL dialects for comparison?

Edit: I guess MySQL is the weak-typed SQL poster boy, which doesn't really make 
me warm up to it, but clearly people can live with it.


was (Author: jbellis):
I could go either way.  On the one hand, my experience with weak typing (js, 
perl) leads me to think it is a misfeature, so we should limit its scope to the 
json context where the limited spec forces us to do so.  But I'm not sure if 
that objection really applies to a non-procedural language like SQL.  Are there 
other weakly typed SQL dialects for comparison?



 JSON support for CQL
 

 Key: CASSANDRA-7970
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7970
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 3.0


 JSON is popular enough that not supporting it is becoming a competitive 
 weakness.  We can add JSON support in a way that is compatible with our 
 performance goals by *mapping* JSON to an existing schema: one JSON documents 
 maps to one CQL row.
 Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
 [1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
 document from a service or a user into a CQL row, with all the validation 
 that entails.
 Since we are not looking to support schemaless documents, we will not be 
 adding a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will 
 map the JSON to UDT, collections, and primitive CQL types.
 Here's how this might look:
 {code}
 CREATE TYPE address (
   street text,
   city text,
   zip_code int,
   phones settext
 );
 CREATE TABLE users (
   id uuid PRIMARY KEY,
   name text,
   addresses maptext, address
 );
 INSERT INTO users JSON
 {‘id’: 4b856557-7153,
‘name’: ‘jbellis’,
‘address’: {“home”: {“street”: “123 Cassandra Dr”,
 “city”: “Austin”,
 “zip_code”: 78747,
 “phones”: [2101234567]}}};
 SELECT JSON id, address FROM users;
 {code}
 (We would also want to_json and from_json functions to allow mapping a single 
 column's worth of data.  These would not require extra syntax.)
 [1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
 [2] https://blog.compose.io/schema-less-is-usually-a-lie/
 [3] http://dl.acm.org/citation.cfm?id=2481247



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-7970) JSON support for CQL

2015-01-06 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-7970:
--

Also, sqlite.

 JSON support for CQL
 

 Key: CASSANDRA-7970
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7970
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 3.0


 JSON is popular enough that not supporting it is becoming a competitive 
 weakness.  We can add JSON support in a way that is compatible with our 
 performance goals by *mapping* JSON to an existing schema: one JSON documents 
 maps to one CQL row.
 Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
 [1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
 document from a service or a user into a CQL row, with all the validation 
 that entails.
 Since we are not looking to support schemaless documents, we will not be 
 adding a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will 
 map the JSON to UDT, collections, and primitive CQL types.
 Here's how this might look:
 {code}
 CREATE TYPE address (
   street text,
   city text,
   zip_code int,
   phones settext
 );
 CREATE TABLE users (
   id uuid PRIMARY KEY,
   name text,
   addresses maptext, address
 );
 INSERT INTO users JSON
 {‘id’: 4b856557-7153,
‘name’: ‘jbellis’,
‘address’: {“home”: {“street”: “123 Cassandra Dr”,
 “city”: “Austin”,
 “zip_code”: 78747,
 “phones”: [2101234567]}}};
 SELECT JSON id, address FROM users;
 {code}
 (We would also want to_json and from_json functions to allow mapping a single 
 column's worth of data.  These would not require extra syntax.)
 [1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
 [2] https://blog.compose.io/schema-less-is-usually-a-lie/
 [3] http://dl.acm.org/citation.cfm?id=2481247



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8568) Impose new API on data tracker modifications that makes correct usage obvious and imposes safety

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8568:
---

ISTR [~krummas] also creating a ticket for this but I can't find it.  
Imagination?

 Impose new API on data tracker modifications that makes correct usage obvious 
 and imposes safety
 

 Key: CASSANDRA-8568
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8568
 Project: Cassandra
  Issue Type: Bug
Reporter: Benedict

 DataTracker has become a bit of a quagmire, and not at all obvious to 
 interface with, with many subtly different modifiers. I suspect it is still 
 subtly broken, especially around error recovery.
 I propose piggy-backing on CASSANDRA-7705 to offer RAII (and GC-enforced, for 
 those situations where a try/finally block isn't possible) objects that have 
 transactional behaviour, and with few simple declarative methods that can be 
 composed simply to provide all of the functionality we currently need.
 See CASSANDRA-8399 for context



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8541) References to non-existent/deprecated CqlPagingInputFormat in code

2015-01-06 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-8541:
--

Reverted, as requested.

 References to non-existent/deprecated CqlPagingInputFormat in code
 --

 Key: CASSANDRA-8541
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8541
 Project: Cassandra
  Issue Type: Bug
  Components: Hadoop
Reporter: Rekha Joshi
Assignee: Rekha Joshi
  Labels: hadoop
 Fix For: 2.0.12

 Attachments: CASSANDRA-8541.txt


 On Mac 10.9.5, Java 1.7, latest cassandra trunk -
 References to non-existent/deprecated CqlPagingInputFormat in code.
 As per Changes.txt/7570 both CqlPagingInputFormat and CqlPagingRecordReader 
 are removed, but lingering references in WordCount,CqlStorage..



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8374) Better support of null for UDF

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8374:
---

bq. Defaulting to {{RETURNS NULL ON NULL INPUT}} is surprising behavior, both 
from a programming languages perspective and a database perspective

I agree.  99% of the time nobody will notice, 1% of the time this will cause 
hours of head scratching.

I think the two reasonable options are

# Make {{CALLED ON NULL INPUT}} the default, the way it is everywhere else ever
# Force choosing the behavior explicitly


 Better support of null for UDF
 --

 Key: CASSANDRA-8374
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8374
 Project: Cassandra
  Issue Type: Bug
Reporter: Sylvain Lebresne
Assignee: Robert Stupp
 Fix For: 3.0

 Attachments: 8473-1.txt, 8473-2.txt


 Currently, every function needs to deal with it's argument potentially being 
 {{null}}. There is very many case where that's just annoying, users should be 
 able to define a function like:
 {noformat}
 CREATE FUNCTION addTwo(val int) RETURNS int LANGUAGE JAVA AS 'return val + 2;'
 {noformat}
 without having this crashing as soon as a column it's applied to doesn't a 
 value for some rows (I'll note that this definition apparently cannot be 
 compiled currently, which should be looked into).  
 In fact, I think that by default methods shouldn't have to care about 
 {{null}} values: if the value is {{null}}, we should not call the method at 
 all and return {{null}}. There is still methods that may explicitely want to 
 handle {{null}} (to return a default value for instance), so maybe we can add 
 an {{ALLOW NULLS}} to the creation syntax.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8528) Add an ExecutionException to the protocol

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8528:
---

+1 ExecutionException

 Add an ExecutionException to the protocol
 -

 Key: CASSANDRA-8528
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8528
 Project: Cassandra
  Issue Type: Sub-task
Reporter: Sylvain Lebresne
Assignee: Robert Stupp
  Labels: client-impacting, protocolv4
 Fix For: 3.0

 Attachments: 8528-001.txt


 With the introduction of UDF, we should add an ExecutionException (or 
 FunctionExecutionException or something like that) to the exceptions that can 
 be sent back to client. We can't guarantee that UDFs won't throw and none of 
 our existing exception is terribly adapted to report such event to the client.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8194) Reading from Auth table should not be in the request path

2015-01-06 Thread Vishy Kasar (JIRA)

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

Vishy Kasar commented on CASSANDRA-8194:


Sam,

CassandraAuthorizer executes the SELECT permissions query at 
ConsistencyLevel.LOCAL_ONE. It is quite possible that the query lands up on a 
node that is busy doing java-GC and times out. In our production use case, we 
see these time outs routinely even though our replication factor for 
system_auth is 10. The next user request will trigger reload with the query 
hopefully landing on a less busy node and succeeding. Due to this, I prefer the 
behavior in 8194-V2.patch where it continues to serve the stale entry till the 
SELECT succeeds. Otherwise clients will be confused as to why they are getting 
an AUTH related failure when no AUTH changes have occurred in the cluster. 

Another option is to do a one time retry of SELECT against a different node and 
throw if that fails as well. That will mostly eliminate the case of some busy 
node causing auth failures. 

Let me know what you think of this. 

I agree with your point on dedicated executor here. I had not realized that 
StorageService.tasks operates out of a single thread. 


 Reading from Auth table should not be in the request path
 -

 Key: CASSANDRA-8194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8194
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Assignee: Vishy Kasar
Priority: Minor
 Fix For: 2.0.12, 3.0

 Attachments: 8194-V2.patch, 8194-V3.txt, 8194.patch, CacheTest2.java


 We use PasswordAuthenticator and PasswordAuthorizer. The system_auth has a RF 
 of 10 per DC over 2 DCs. The permissions_validity_in_ms is 5 minutes. 
 We still have few thousand requests failing each day with the trace below. 
 The reason for this is read cache request realizing that cached entry has 
 expired and doing a blocking request to refresh cache. 
 We should have cache refreshed periodically only in the back ground. The user 
 request should simply look at the cache and not try to refresh it. 
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:292)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:172)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:165)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:149)
   at 
 org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:75)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:102)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:113)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1735)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4162)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4150)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:256)
   at org.apache.cassandra.auth.Auth.isSuperuser(Auth.java:84)
   at 
 org.apache.cassandra.auth.AuthenticatedUser.isSuper(AuthenticatedUser.java:50)
   at 
 org.apache.cassandra.auth.CassandraAuthorizer.authorize(CassandraAuthorizer.java:68)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:278)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:275)
   at 
 

[jira] [Updated] (CASSANDRA-8548) Nodetool Cleanup - IllegalArgumentException

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-8548:
--
Assignee: Marcus Eriksson

 Nodetool Cleanup - IllegalArgumentException
 ---

 Key: CASSANDRA-8548
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8548
 Project: Cassandra
  Issue Type: Bug
Reporter: Sebastian Estevez
Assignee: Marcus Eriksson
 Fix For: 2.0.11


 Needed to free up some space on a node but getting the dump below when 
 running nodetool cleanup.
 Tried turning on debug to try to obtain additional details in the logs but 
 nothing gets added to the logs when running cleanup. Added: 
 log4j.logger.org.apache.cassandra.db=DEBUG 
 in log4j-server.properties
 See the stack trace below:
 root@cassandra-019:~# nodetool cleanup
 {code}Error occurred during cleanup
 java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException
 at java.util.concurrent.FutureTask.report(FutureTask.java:122)
 at java.util.concurrent.FutureTask.get(FutureTask.java:188)
 at 
 org.apache.cassandra.db.compaction.CompactionManager.performAllSSTableOperation(CompactionManager.java:228)
 at 
 org.apache.cassandra.db.compaction.CompactionManager.performCleanup(CompactionManager.java:266)
 at 
 org.apache.cassandra.db.ColumnFamilyStore.forceCleanup(ColumnFamilyStore.java:1112)
 at 
 org.apache.cassandra.service.StorageService.forceKeyspaceCleanup(StorageService.java:2162)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75)
 at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279)
 at 
 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
 at 
 com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
 at 
 com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
 at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
 at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
 at 
 com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
 at 
 com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
 at 
 javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1487)
 at 
 javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:97)
 at 
 javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1328)
 at 
 javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1420)
 at 
 javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:848)
 at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
 at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
 at sun.rmi.transport.Transport$1.run(Transport.java:177)
 at sun.rmi.transport.Transport$1.run(Transport.java:174)
 at java.security.AccessController.doPrivileged(Native Method)
 at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
 at 
 sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556)
 at 
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811)
 at 
 sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670)
 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)
 Caused by: java.lang.IllegalArgumentException
 at java.nio.Buffer.limit(Buffer.java:267)
 at 
 org.apache.cassandra.io.compress.CompressedRandomAccessReader.decompressChunk(CompressedRandomAccessReader.java:108)
 at 
 

[jira] [Commented] (CASSANDRA-8520) Prototype thread per core

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8520:
---

You don't think we can get to 2x in a simplified prototype?  To clarify, I'm 
not looking for 2x across the board.  (Range slices will obviously be hard.)  
But surely we should be able to get to 2x on some core single-partition path, 
no?  Remember I'm limiting this to local reads only, so MessagingService is a 
non-factor.  (StorageProxy OTOH is definitely in scope.)

 Prototype thread per core
 -

 Key: CASSANDRA-8520
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8520
 Project: Cassandra
  Issue Type: Task
  Components: Core
Reporter: Jonathan Ellis
  Labels: performance
 Fix For: 3.1


 Let's prototype the best possible scenario for how well we can perform with a 
 thread per core design by simplifying everything we can.  For instance,
 - No HH, no RR, no replication at all
 - No MessagingService
 - No compaction (so test a workload w/o overwrites)
 - No repair
 - Just local writes and reads
 If we can't get a big win (say at least 2x) with these simplifications then I 
 think we can say that it's not worth it.
 If we can get a big win, then we can either refine the prototype to make it 
 more realistic or start working on it in earnest.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8564) Harmless exception logged as ERROR

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8564:
---

We already have a ticket or two for RejectedExecutionException during shutdown.

 Harmless exception logged as ERROR
 --

 Key: CASSANDRA-8564
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8564
 Project: Cassandra
  Issue Type: Bug
Reporter: Philip Thompson
Assignee: Benedict
Priority: Minor
 Fix For: 2.1.3


 After CASSANDRA-8474, when running the dtest 
 counter_test.py:TestCounters.upgrade_test, we now see the following in the 
 log:
 {code}
 ERROR [CompactionExecutor:2] 2015-01-05 13:59:51,003 CassandraDaemon.java:170 
 - Exception in thread Thread[CompactionExecutor:2,1,main]
 java.util.concurrent.RejectedExecutionException: Task 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@5e8ea989 
 rejected from 
 org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor@7fc92f94[Terminated,
  pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 5]
 at 
 java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) 
 ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:325)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:530)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:619)
  ~[na:1.7.0_67]
 at 
 org.apache.cassandra.io.sstable.SSTableReader.scheduleTidy(SSTableReader.java:638)
  ~[main/:na]
 at 
 org.apache.cassandra.io.sstable.SSTableReader.tidy(SSTableReader.java:619) 
 ~[main/:na]
 at 
 org.apache.cassandra.io.sstable.SSTableReader.releaseReference(SSTableReader.java:1650)
  ~[main/:na]
 at 
 org.apache.cassandra.db.DataTracker.replaceReaders(DataTracker.java:409) 
 ~[main/:na]
 at 
 org.apache.cassandra.db.DataTracker.replaceWithNewInstances(DataTracker.java:303)
  ~[main/:na]
 at 
 org.apache.cassandra.io.sstable.SSTableRewriter.moveStarts(SSTableRewriter.java:254)
  ~[main/:na]
 at 
 org.apache.cassandra.io.sstable.SSTableRewriter.abort(SSTableRewriter.java:180)
  ~[main/:na]
 at 
 org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:205)
  ~[main/:na]
 at 
 org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) 
 ~[main/:na]
 at 
 org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:75)
  ~[main/:na]
 at 
 org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:59)
  ~[main/:na]
 at 
 org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionTask.run(CompactionManager.java:226)
  ~[main/:na]
 at 
 java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
 ~[na:1.7.0_67]
 at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
 ~[na:1.7.0_67]
 at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  [na:1.7.0_67]
 at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
 Suppressed: java.util.concurrent.RejectedExecutionException: Task 
 java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@681c91de 
 rejected from 
 org.apache.cassandra.concurrent.DebuggableScheduledThreadPoolExecutor@7fc92f94[Terminated,
  pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 5]
 at 
 java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) 
 ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:325)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:530)
  ~[na:1.7.0_67]
 at 
 java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:619)
  ~[na:1.7.0_67]
 at 
 org.apache.cassandra.io.sstable.SSTableReader.scheduleTidy(SSTableReader.java:638)
  ~[main/:na]
 at 
 org.apache.cassandra.io.sstable.SSTableReader.tidy(SSTableReader.java:619) 
 

[jira] [Resolved] (CASSANDRA-8571) Free space management does not work very well

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis resolved CASSANDRA-8571.
---
   Resolution: Duplicate
Fix Version/s: (was: 2.1.3)

 Free space management does not work very well
 -

 Key: CASSANDRA-8571
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8571
 Project: Cassandra
  Issue Type: Bug
Reporter: Bartłomiej Romański

 Hi all,
 We've got a cluster of 2.1.2 with 18 nodes equipped with 3x 480GB SSD each 
 (JBODs). We mostly use LCS.
 Recently, our nodes starts failing with 'no space left on device'. It all 
 started with our mistake - we let our LCS accumulate too much in L0.
 As a result, STCS woke up and we end with some big sstables on each node 
 (let's say 5-10 sstables, 20-50gb each).
 During normal operation we keep our disks about 50% full. This gives about 
 200 GB free space on each of them. This was too little for compacting all 
 accumulated L0 sstables at once. Cassandra kept trying to do that and keep 
 failing...
 Evantually, we managed to stabilized the situation (with some crazy code 
 hacking, manually moving sstables etc...). However, there are a few things 
 that would be more than helpful in recovering from such situations more 
 automatically... 
 First, please look at DiskAwareRunnable.runMayThrow(). This methods initiates 
 (local) variable: writeSize. I believe we should check somewhere here if we 
 have enough space on a chosen disk. The problem is that writeSize is never 
 read... Am I missing something here?
 Btw, while in STCS we first look for the least overloaded disk, and then (if 
 there are more than one such disks) for the one with the most free space 
 (please note the sort order in Directories.getWriteableLocation()). That's 
 often suboptimal (it's usually better to wait for the bigger disk than to 
 compact fewer sstables now), but probably not crucial.
 Second, the strategy (used by LCS) that we first choose target disk and then 
 use it for whole compaction is not the best one. For big compactions (eg. 
 after some massive operations like bootstrap or repair; or after some issues 
 with LCS like in our case) on small drives (eg. JBOD of SSDs) these will 
 never succeed. Much better strategy would be to choose target drive for each 
 output sstable separately, or at least round robin them.
 Third, it would be helpful if the default check for MAX_COMPACTING_L0 in 
 LeveledManifest.getCandidatesFor() would be expanded to support also limit 
 for total space. After fallback STCS in L0 you end up with very big sstables 
 and 32 of them is just too much for one compaction on a small drives.
 We finally used some hack similar the last option (as it was the easiest one 
 to implement in a hurry), but any improvents described above would save us 
 from all this.
 Thanks,
 BR



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8554) Node where gossip is disabled still shows as UP on that node; other nodes show it as DN

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-8554:
---

Gossip is hardcoded to think of course I'm alive, or I wouldn't be answering 
questions about whether I'm alive.  Should be simple to add a check for 
drain-status.

 Node where gossip is disabled still shows  as UP on that node; other nodes 
 show it as DN
 

 Key: CASSANDRA-8554
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8554
 Project: Cassandra
  Issue Type: Bug
 Environment: Centos 6.5, DSE4.5.1 tarball install
Reporter: Mark Curtis
Priority: Minor

 When running nodetool drain, the drained node will still show the status of 
 itself as UP in nodetool status even after the drain has finished. For 
 example using a 3 node cluster on one of the nodes that is still operating 
 and not drained we see this:
 {code}
 $ ./dse-4.5.1/bin/nodetool status
 Note: Ownership information does not include topology; for complete 
 information, specify a keyspace
 Datacenter: Central
 ===
 Status=Up/Down
 |/ State=Normal/Leaving/Joining/Moving
 --  AddressLoad   Tokens  Owns   Host ID  
  Rack
 UN  192.168.56.21  210.78 KB  256 32.1%  
 82eb2fca-4f57-467b-a972-93096ec5d69f  RAC1
 DN  192.168.56.23  2.22 GB256 33.5%  
 a11bfac1-fad0-440b-bd68-7562a89ce3c7  RAC1
 UN  192.168.56.22  2.22 GB256 34.4%  
 4250cb05-97be-4bac-887a-acc307d1bc0c  RAC1
 {code}
 While on the drained node we see this:
 {code}
 [datastax@DSE4 ~]$ ./dse-4.5.1/bin/nodetool drain
 [datastax@DSE4 ~]$ ./dse-4.5.1/bin/nodetool status
 Note: Ownership information does not include topology; for complete 
 information, specify a keyspace
 Datacenter: Central
 ===
 Status=Up/Down
 |/ State=Normal/Leaving/Joining/Moving
 --  AddressLoad   Tokens  Owns   Host ID  
  Rack
 UN  192.168.56.21  210.78 KB  256 32.1%  
 82eb2fca-4f57-467b-a972-93096ec5d69f  RAC1
 UN  192.168.56.23  2.22 GB256 33.5%  
 a11bfac1-fad0-440b-bd68-7562a89ce3c7  RAC1
 UN  192.168.56.22  2.22 GB256 34.4%  
 4250cb05-97be-4bac-887a-acc307d1bc0c  RAC1
 {code}
 Netstat shows outgoing connections from the drained node to other nodes as 
 still established on port 7000 but the node is no longer listening on port 
 7000 which I believe is expected.
 However the output of nodetool status on the drained node could be 
 interpreted as misleading.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


cassandra git commit: Revert fix references to defunct CqlPagingInputFormat

2015-01-06 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 e20810c7b - e27cdf935


Revert fix references to defunct CqlPagingInputFormat

This reverts commit e550ea60212e933f3849a11717ba4ef916fc4aa3.


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

Branch: refs/heads/cassandra-2.0
Commit: e27cdf935c73f5d51ce920cf3245eca58219ceb1
Parents: e20810c
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:25:09 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:25:09 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCount.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCount.java 
b/examples/hadoop_cql3_word_count/src/WordCount.java
index 6a2f846..519a98f 100644
--- a/examples/hadoop_cql3_word_count/src/WordCount.java
+++ b/examples/hadoop_cql3_word_count/src/WordCount.java
@@ -26,6 +26,7 @@ import org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.cassandra.hadoop.ConfigHelper;
 import org.apache.cassandra.utils.ByteBufferUtil;
@@ -246,7 +247,7 @@ public class WordCount extends Configured implements Tool
 else
 {
 job.setMapperClass(TokenizerMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCountCounters.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCountCounters.java 
b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
index 150d18d..74de9ab 100644
--- a/examples/hadoop_cql3_word_count/src/WordCountCounters.java
+++ b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.hadoop.cql3.CqlConfigHelper;
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
@@ -155,7 +156,7 @@ public class WordCountCounters extends Configured 
implements Tool
 else
 {
 job.setMapperClass(SumMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
index 6c50ab2..53f3900 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
@@ -74,7 +74,7 @@ public class CqlStorage extends AbstractCassandraStorage
 {
 super();
 this.pageSize = pageSize;
-DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlInputFormat;
+DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 DEFAULT_OUTPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 }   
 



[jira] [Commented] (CASSANDRA-7970) JSON support for CQL

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis commented on CASSANDRA-7970:
---

I could go either way.  On the one hand, my experience with weak typing (js, 
perl) leads me to think it is a misfeature, so we should limit its scope to the 
json context where the limited spec forces us to do so.  But I'm not sure if 
that objection really applies to a non-procedural language like SQL.  Are there 
other weakly typed SQL dialects for comparison?



 JSON support for CQL
 

 Key: CASSANDRA-7970
 URL: https://issues.apache.org/jira/browse/CASSANDRA-7970
 Project: Cassandra
  Issue Type: New Feature
  Components: API
Reporter: Jonathan Ellis
Assignee: Tyler Hobbs
 Fix For: 3.0


 JSON is popular enough that not supporting it is becoming a competitive 
 weakness.  We can add JSON support in a way that is compatible with our 
 performance goals by *mapping* JSON to an existing schema: one JSON documents 
 maps to one CQL row.
 Thus, it is NOT a goal to support schemaless documents, which is a misfeature 
 [1] [2] [3].  Rather, it is to allow a convenient way to easily turn a JSON 
 document from a service or a user into a CQL row, with all the validation 
 that entails.
 Since we are not looking to support schemaless documents, we will not be 
 adding a JSON data type (CASSANDRA-6833) a la postgresql.  Rather, we will 
 map the JSON to UDT, collections, and primitive CQL types.
 Here's how this might look:
 {code}
 CREATE TYPE address (
   street text,
   city text,
   zip_code int,
   phones settext
 );
 CREATE TABLE users (
   id uuid PRIMARY KEY,
   name text,
   addresses maptext, address
 );
 INSERT INTO users JSON
 {‘id’: 4b856557-7153,
‘name’: ‘jbellis’,
‘address’: {“home”: {“street”: “123 Cassandra Dr”,
 “city”: “Austin”,
 “zip_code”: 78747,
 “phones”: [2101234567]}}};
 SELECT JSON id, address FROM users;
 {code}
 (We would also want to_json and from_json functions to allow mapping a single 
 column's worth of data.  These would not require extra syntax.)
 [1] http://rustyrazorblade.com/2014/07/the-myth-of-schema-less/
 [2] https://blog.compose.io/schema-less-is-usually-a-lie/
 [3] http://dl.acm.org/citation.cfm?id=2481247



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CASSANDRA-8457) nio MessagingService

2015-01-06 Thread Ariel Weisberg (JIRA)

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

Ariel Weisberg commented on CASSANDRA-8457:
---

I ran on GCE. 11 n1-highcpu-16, 2 clients 9 servers. 
ubuntu-1404-trusty-v20141212

GCE distributes interrupts to all cores by default.

The conclusion is that on GCE at that cluster config coalescing provides some 
benefit, although not to the extreme degree it was beneficial in EC2 without 
enhanced networking. The window to coalesce in doesn't have to be large to get 
the value. Binding interrupts to core 0 has a negative impact on throughput 
that doesn't change depending on whether no delay is enabled/disabled, but 
coalescing and binding yields the same similar throughput as distributing 
interrupts and coalescing.

It's very much an apples to oranges comparison to the EC2 c3.8xlarge which is 
much bigger instance (certainly in terms of RAM and exposed hardware threads) 
and more likely to benefit from more packet throughput. They are also 
completely different virtualization technologies and I guess it shows with 
things like toggling no delay having no impact in GCE even though performing 
the coalescing manually does.

Running with TCP no delay off
132254
132862

With TCP no delay on and coalescing
||Coalesce window microseconds| Throughput||
|200| 149791|
|150| 148755|
|100| 147678|
|50| 142565|
|25| 144542|
|12| 141679|
|6| 142626|
|0| 133905|
|0| 132849|

I then tested with all interrupts bound to core 0

With TCP no delay off 
116157
No delay on, no coalescing
118134
No delay on, coalescing 200 microseconds
147257
146453


 nio MessagingService
 

 Key: CASSANDRA-8457
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8457
 Project: Cassandra
  Issue Type: New Feature
  Components: Core
Reporter: Jonathan Ellis
Assignee: Ariel Weisberg
  Labels: performance
 Fix For: 3.0


 Thread-per-peer (actually two each incoming and outbound) is a big 
 contributor to context switching, especially for larger clusters.  Let's look 
 at switching to nio, possibly via Netty.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Assigned] (CASSANDRA-8194) Reading from Auth table should not be in the request path

2015-01-06 Thread Vishy Kasar (JIRA)

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

Vishy Kasar reassigned CASSANDRA-8194:
--

Assignee: Sam Tunnicliffe  (was: Vishy Kasar)

 Reading from Auth table should not be in the request path
 -

 Key: CASSANDRA-8194
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8194
 Project: Cassandra
  Issue Type: Improvement
Reporter: Vishy Kasar
Assignee: Sam Tunnicliffe
Priority: Minor
 Fix For: 2.0.12, 3.0

 Attachments: 8194-V2.patch, 8194-V3.txt, 8194.patch, CacheTest2.java


 We use PasswordAuthenticator and PasswordAuthorizer. The system_auth has a RF 
 of 10 per DC over 2 DCs. The permissions_validity_in_ms is 5 minutes. 
 We still have few thousand requests failing each day with the trace below. 
 The reason for this is read cache request realizing that cached entry has 
 expired and doing a blocking request to refresh cache. 
 We should have cache refreshed periodically only in the back ground. The user 
 request should simply look at the cache and not try to refresh it. 
 com.google.common.util.concurrent.UncheckedExecutionException: 
 java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2258)
   at com.google.common.cache.LocalCache.get(LocalCache.java:3990)
   at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3994)
   at 
 com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4878)
   at 
 org.apache.cassandra.service.ClientState.authorize(ClientState.java:292)
   at 
 org.apache.cassandra.service.ClientState.ensureHasPermission(ClientState.java:172)
   at 
 org.apache.cassandra.service.ClientState.hasAccess(ClientState.java:165)
   at 
 org.apache.cassandra.service.ClientState.hasColumnFamilyAccess(ClientState.java:149)
   at 
 org.apache.cassandra.cql3.statements.ModificationStatement.checkAccess(ModificationStatement.java:75)
   at 
 org.apache.cassandra.cql3.QueryProcessor.processStatement(QueryProcessor.java:102)
   at 
 org.apache.cassandra.cql3.QueryProcessor.process(QueryProcessor.java:113)
   at 
 org.apache.cassandra.thrift.CassandraServer.execute_cql3_query(CassandraServer.java:1735)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4162)
   at 
 org.apache.cassandra.thrift.Cassandra$Processor$execute_cql3_query.getResult(Cassandra.java:4150)
   at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
   at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
   at 
 org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:206)
   at 
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
   at 
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
   at java.lang.Thread.run(Thread.java:722)
 Caused by: java.lang.RuntimeException: 
 org.apache.cassandra.exceptions.ReadTimeoutException: Operation timed out - 
 received only 0 responses.
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:256)
   at org.apache.cassandra.auth.Auth.isSuperuser(Auth.java:84)
   at 
 org.apache.cassandra.auth.AuthenticatedUser.isSuper(AuthenticatedUser.java:50)
   at 
 org.apache.cassandra.auth.CassandraAuthorizer.authorize(CassandraAuthorizer.java:68)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:278)
   at org.apache.cassandra.service.ClientState$1.load(ClientState.java:275)
   at 
 com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3589)
   at 
 com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2374)
   at 
 com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2337)
   at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2252)
   ... 19 more
 Caused by: org.apache.cassandra.exceptions.ReadTimeoutException: Operation 
 timed out - received only 0 responses.
   at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:105)
   at 
 org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:943)
   at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:828)
   at 
 org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:140)
   at org.apache.cassandra.auth.Auth.selectUser(Auth.java:245)
   ... 28 more
 ERROR [Thrift:17232] 2014-10-24 05:06:51,004 CustomTThreadPoolServer.java 
 (line 224) Error occurred during processing of message.
 

[jira] [Updated] (CASSANDRA-8562) Fix checking available disk space before compaction starts

2015-01-06 Thread Jonathan Ellis (JIRA)

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

Jonathan Ellis updated CASSANDRA-8562:
--
Reviewer: Joshua McKenzie

[~JoshuaMcKenzie] to review

 Fix checking available disk space before compaction starts
 --

 Key: CASSANDRA-8562
 URL: https://issues.apache.org/jira/browse/CASSANDRA-8562
 Project: Cassandra
  Issue Type: Bug
Reporter: Marcus Eriksson
Assignee: Marcus Eriksson
 Fix For: 2.0.12, 2.1.3

 Attachments: 
 0001-Check-for-available-disk-space-before-starting-compa.patch


 When starting a compaction we check if there is enough disk space available 
 to start it, otherwise we might (for STCS) reduce the compaction so that the 
 result could fit. Now (since CASSANDRA-8329) we check for the directory to 
 write to a lot later and this can reduce the compaction after we have created 
 the scanners.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[1/2] cassandra git commit: Revert fix references to defunct CqlPagingInputFormat

2015-01-06 Thread aleksey
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 f8b43d4a8 - edf48f817


Revert fix references to defunct CqlPagingInputFormat

This reverts commit e550ea60212e933f3849a11717ba4ef916fc4aa3.


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

Branch: refs/heads/cassandra-2.1
Commit: e27cdf935c73f5d51ce920cf3245eca58219ceb1
Parents: e20810c
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:25:09 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:25:09 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCount.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCount.java 
b/examples/hadoop_cql3_word_count/src/WordCount.java
index 6a2f846..519a98f 100644
--- a/examples/hadoop_cql3_word_count/src/WordCount.java
+++ b/examples/hadoop_cql3_word_count/src/WordCount.java
@@ -26,6 +26,7 @@ import org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.cassandra.hadoop.ConfigHelper;
 import org.apache.cassandra.utils.ByteBufferUtil;
@@ -246,7 +247,7 @@ public class WordCount extends Configured implements Tool
 else
 {
 job.setMapperClass(TokenizerMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/examples/hadoop_cql3_word_count/src/WordCountCounters.java
--
diff --git a/examples/hadoop_cql3_word_count/src/WordCountCounters.java 
b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
index 150d18d..74de9ab 100644
--- a/examples/hadoop_cql3_word_count/src/WordCountCounters.java
+++ b/examples/hadoop_cql3_word_count/src/WordCountCounters.java
@@ -25,6 +25,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.hadoop.cql3.CqlConfigHelper;
+import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 import org.apache.cassandra.hadoop.cql3.CqlInputFormat;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
@@ -155,7 +156,7 @@ public class WordCountCounters extends Configured 
implements Tool
 else
 {
 job.setMapperClass(SumMapper.class);
-job.setInputFormatClass(CqlInputFormat.class);
+job.setInputFormatClass(CqlPagingInputFormat.class);
 ConfigHelper.setInputRpcPort(job.getConfiguration(), 9160);
 }
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e27cdf93/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--
diff --git a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java 
b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
index 6c50ab2..53f3900 100644
--- a/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
+++ b/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
@@ -74,7 +74,7 @@ public class CqlStorage extends AbstractCassandraStorage
 {
 super();
 this.pageSize = pageSize;
-DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlInputFormat;
+DEFAULT_INPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
 DEFAULT_OUTPUT_FORMAT = 
org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
 }   
 



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

2015-01-06 Thread aleksey
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/edf48f81
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/edf48f81
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/edf48f81

Branch: refs/heads/cassandra-2.1
Commit: edf48f81739d45978460a3413bad7252a34636d9
Parents: f8b43d4 e27cdf9
Author: Aleksey Yeschenko alek...@apache.org
Authored: Wed Jan 7 02:25:59 2015 +0300
Committer: Aleksey Yeschenko alek...@apache.org
Committed: Wed Jan 7 02:25:59 2015 +0300

--
 examples/hadoop_cql3_word_count/src/WordCount.java | 3 ++-
 examples/hadoop_cql3_word_count/src/WordCountCounters.java | 3 ++-
 src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java   | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edf48f81/src/java/org/apache/cassandra/hadoop/pig/CqlStorage.java
--



  1   2   >