[jira] [Commented] (CASSANDRA-6366) Corrupt SSTables

2013-11-24 Thread Matt Jurik (JIRA)

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

Matt Jurik commented on CASSANDRA-6366:
---

[~jbellis], would I have likely seen CASSANDRA-4206 if my nodes had assertions 
enabled?

In my case, the impossible dataSize value is because cassandra reads the 
sstable at the wrong offset since the previous row's dataSize is incorrect. The 
previous row dataSize as written into the sstable row header is 29626634 but 
the actual size is 29626679. Correcting this value, I see that the apparently 
corrupt row's dataSize is 7785289, not 72339146324312065.

> Corrupt SSTables
> 
>
> Key: CASSANDRA-6366
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6366
> Project: Cassandra
>  Issue Type: Bug
> Environment: 1.2.10, LeveledCompaction, CQL3
>Reporter: Matt Jurik
>Priority: Minor
>
> We ran into some corrupt sstables on one of our 8-node clusters running 
> 1.2.10 (since upgraded to 1.2.11). Initially, we saw one corrupt sstable on a 
> single node. After doing a "nodetool scrub" and then a "nodetool -pr repair" 
> for the cluster, we were left with 2 nodes reporting 3 corrupt sstables.
> All nodes appear healthy; fsck and our raid controllers report no issues. The 
> sstables were written out during normal operation; there were no machine 
> restarts or failures anywhere near the sstable file timestamps.
> Curiously, I figured out how to read all 3 of our corrupt sstables, though I 
> have no idea why this works. Additionally, it seems that I'm able to read all 
> OnDiskAtoms as specified in the row header, so the data seems intact.
> {code}
> diff --git 
> a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java 
> b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
> index 381fdb9..8fce5f7 100644
> --- a/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
> +++ b/src/java/org/apache/cassandra/io/sstable/SSTableIdentityIterator.java
> @@ -180,6 +180,11 @@ public class SSTableIdentityIterator implements 
> Comparable  
>  public boolean hasNext()
>  {
> + /*
> + * For each row where corruption is reported, it is the case that we 
> read more data from the preceeding row
> + * than specified by dataSize. That is, this iterator will terminate 
> with:
> + * inputWithTracker.getBytesRead() > dataSize
> + */
>  return inputWithTracker.getBytesRead() < dataSize;
>  }
>  
> diff --git a/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java 
> b/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java
> index 1df5842..718324c 100644
> --- a/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java
> +++ b/src/java/org/apache/cassandra/io/sstable/SSTableScanner.java
> @@ -167,8 +167,9 @@ public class SSTableScanner implements ICompactionScanner
>  {
>  try
>  {
> -if (row != null)
> -dfile.seek(finishedAt);
> +// Magically read corrupt sstables...
> +// if (row != null)
> +// dfile.seek(finishedAt);
>  assert !dfile.isEOF();
>  
>  // Read data header
> diff --git a/src/java/org/apache/cassandra/tools/SSTableExport.java 
> b/src/java/org/apache/cassandra/tools/SSTableExport.java
> index 05fe9f6..ed61010 100644
> --- a/src/java/org/apache/cassandra/tools/SSTableExport.java
> +++ b/src/java/org/apache/cassandra/tools/SSTableExport.java
> @@ -432,7 +432,7 @@ public class SSTableExport
>   */
>  public static void export(Descriptor desc, String[] excludes) throws 
> IOException
>  {
> -export(desc, System.out, excludes);
> +export(desc, new PrintStream("json"), excludes);
>  }
>  
>  /**
> {code}
> Otherwise, I get a stacktrace such as:
> {code}
> org.apache.cassandra.io.sstable.CorruptSSTableException: java.io.IOException: 
> dataSize of 72339146324312065 starting at 80476328 would be larger than file 
> /Users/exabytes18/development/yay/corrupt-sstables/corrupt-files3/my_keyspace-my_table-ic-40693-Data.db
>  length 109073657
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.(SSTableIdentityIterator.java:176)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.(SSTableIdentityIterator.java:84)
> at 
> org.apache.cassandra.io.sstable.SSTableIdentityIterator.(SSTableIdentityIterator.java:70)
> at 
> org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:203)
> at 
> org.apache.cassandra.io.sstable.SSTableScanner$KeyScanningIterator.next(SSTableScanner.java:157)
> at 
> org.apache.cassandra.io.sstable.SSTableScanner.next(SSTableScanner.java:144)
> at org.apach

[jira] [Commented] (CASSANDRA-5906) Avoid allocating over-large bloom filters

2013-11-24 Thread Matt Abrams (JIRA)

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

Matt Abrams commented on CASSANDRA-5906:


We recently resolved a concurrency bug and improved performance of HLL++.  
We'll push a new release of stream-lib soon and I recommend using the updated 
version for this patch.

> Avoid allocating over-large bloom filters
> -
>
> Key: CASSANDRA-5906
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5906
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Yuki Morishita
> Fix For: 2.1
>
>
> We conservatively estimate the number of partitions post-compaction to be the 
> total number of partitions pre-compaction.  That is, we assume the worst-case 
> scenario of no partition overlap at all.
> This can result in substantial memory wasted in sstables resulting from 
> highly overlapping compactions.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-5906) Avoid allocating over-large bloom filters

2013-11-24 Thread Matt Abrams (JIRA)

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

Matt Abrams commented on CASSANDRA-5906:


Link to bug I mentioned in previous comment:

https://github.com/addthis/stream-lib/commit/5a9e9cc7f71e1eb49635df29bba67d905903f1b8

> Avoid allocating over-large bloom filters
> -
>
> Key: CASSANDRA-5906
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5906
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Jonathan Ellis
>Assignee: Yuki Morishita
> Fix For: 2.1
>
>
> We conservatively estimate the number of partitions post-compaction to be the 
> total number of partitions pre-compaction.  That is, we assume the worst-case 
> scenario of no partition overlap at all.
> This can result in substantial memory wasted in sstables resulting from 
> highly overlapping compactions.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-5417) Push composites support in the storage engine

2013-11-24 Thread Benedict (JIRA)

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

Benedict commented on CASSANDRA-5417:
-

Took me a while to really understand everything that was going on here, but 
whilst I wouldn't say everything is intuitive to someone without much prior 
knowledge, I think the patch addresses the concerns pretty well for this round 
of changes. Normalising the storage of the prefix would certainly make the code 
cleaner and more understandable in future, though. Have a couple of minor 
functional concerns, some general nits I've cleaned up in 
[iss-5417-3|https://github.com/belliottsmith/cassandra/iss-5417-v3] and some 
nomenclature suggestions:

Concerns:
- AbstractCompoundCellNameType.fromByteBuffer: & 0xFF looks suspicious 
to me - should perhaps be 0x?
- It looks like we're interning TimeUUIDType column identifiers, which 
probably isn't safe?

Nomenclature Suggestions:

* CellName is confusing, as it isn't a name-of-a-cell, but a 
Cell-with-a-name. Prefer NamedCell.
* Compound(.*)CellName was also a little confusing (to me, at least), 
suggest either Prefixed/Clustered and (Blank)/Unclustered
* Remove Sparse from *SparseCellName - misleading, really it is just 
!Dense, so leave out Dense from the name.
* I would possibly suggest removing CellName interface, and having 
SimpleSparseCellName be simply NamedCell, which others override, to keep 
nomenclature cleaner still.
* In summary, suggest the following or some mix thereof:
** NamedPrefixedCell/NamedClusteredCell
** NamedPrefixedDenseCell/NamedClusteredDenseCell
** NamedCell
** NamedDenseCell
* Also, suggest renaming CompositeBound to one of BoundedComposite, 
CompositeBounded, or CompositeInequality, due to ambiguity of meaning for 
"Bound" vs "Bounded"

General Minor Nits:

- isSameCQL3RowThan => isSameCQL3RowAs
- minor code cleanups (and some unnecessary removal of unecessary type 
parameters)
- Changed toByteBuffer to always return a ByteBuffer that cannot affect 
the state of the callee, and modified callers that were using .duplicate() to 
no longer do so
- Following code comment in CompositeType appears to be incomplete, as 
it suggests different outcomes for same spec:

/*
 * Given the rules for eoc (end-of-component, see 
AbstractCompositeType.compare()),
 * We can select:
 *   - = 'a' by using <'a'><0>
 *   - < 'a' by using <'a'><-1>
 *   - <= 'a' by using <'a'><1>
 *   - > 'a' by using <'a'><1>
 *   - >= 'a' by using <'a'><0>
 */


> Push composites support in the storage engine
> -
>
> Key: CASSANDRA-5417
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5417
> Project: Cassandra
>  Issue Type: Improvement
>Reporter: Sylvain Lebresne
>Assignee: Sylvain Lebresne
>  Labels: performance
> Fix For: 2.1
>
>
> CompositeType happens to be very useful and is now widely used: CQL3 heavily 
> rely on it, and super columns are now using it too internally. Besides, 
> CompositeType has been advised as a replacement of super columns on the 
> thrift side for a while, so it's safe to assume that it's generally used 
> there too.
> CompositeType has initially been introduced as just another AbstractType.  
> Meaning that the storage engine has no nothing whatsoever of composites 
> being, well, composite. This has the following drawbacks:
> * Because internally a composite value is handled as just a ByteBuffer, we 
> end up doing a lot of extra work. Typically, each time we compare 2 composite 
> value, we end up "deserializing" the components (which, while it doesn't copy 
> data per-se because we just slice the global ByteBuffer, still waste some cpu 
> cycles and allocate a bunch of ByteBuffer objects). And since compare can be 
> called *a lot*, this is likely not negligible.
> * This make CQL3 code uglier than necessary. Basically, CQL3 makes extensive 
> use of composites, and since it gets backs ByteBuffer from the internal 
> columns, it always have to check if it's actually a compositeType or not, and 
> then split it and pick the different parts it needs. It's only an API 
> problem, but having things exposed as composites directly would definitively 
> make thinks cleaner. In particular, in most cases, CQL3 don't care whether it 
> has a composite with only one component or a non-really-composite value, but 
> we still always distinguishes both cases.  Lastly, if we do expose composites 
> more directly internally, it's not a lot more work to "internalize" better 
> the different parts of the cell name that C

[jira] [Commented] (CASSANDRA-4206) AssertionError: originally calculated column size of 629444349 but now it is 588008950

2013-11-24 Thread Patricio Echague (JIRA)

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

Patricio Echague commented on CASSANDRA-4206:
-

Seen the same error in 1.2.10 with multithreaded_compaction disabled. It causes 
"nodetool rebuild" to fail making it really hard to rebuild a DC fully.

> AssertionError: originally calculated column size of 629444349 but now it is 
> 588008950
> --
>
> Key: CASSANDRA-4206
> URL: https://issues.apache.org/jira/browse/CASSANDRA-4206
> Project: Cassandra
>  Issue Type: Bug
>  Components: Core
>Affects Versions: 1.0.9
> Environment: Debian Squeeze Linux, kernel 2.6.32, sun-java6-bin 
> 6.26-0squeeze1
>Reporter: Patrik Modesto
>
> I've 4 node cluster of Cassandra 1.0.9. There is a rfTest3 keyspace with RF=3 
> and one CF with two secondary indexes. I'm importing data into this CF using 
> Hadoop Mapreduce job, each row has less than 10 colkumns. From JMX:
> MaxRowSize:  1597
> MeanRowSize: 369
> And there are some tens of millions of rows.
> It's write-heavy usage and there is a big pressure on each node, there are 
> quite some dropped mutations on each node. After ~12 hours of inserting I see 
> these assertion exceptiona on 3 out of four nodes:
> {noformat}
> ERROR 06:25:40,124 Fatal exception in thread Thread[HintedHandoff:1,1,main]
> java.lang.RuntimeException: java.util.concurrent.ExecutionException:
> java.lang.AssertionError: originally calculated column size of 629444349 but 
> now it is 588008950
>at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:388)
>at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpoint(HintedHandOffManager.java:256)
>at 
> org.apache.cassandra.db.HintedHandOffManager.access$300(HintedHandOffManager.java:84)
>at 
> org.apache.cassandra.db.HintedHandOffManager$3.runMayThrow(HintedHandOffManager.java:437)
>at 
> org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:30)
>at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>at java.lang.Thread.run(Thread.java:662)
> Caused by: java.util.concurrent.ExecutionException:
> java.lang.AssertionError: originally calculated column size of
> 629444349 but now it is 588008950
>at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:222)
>at java.util.concurrent.FutureTask.get(FutureTask.java:83)
>at 
> org.apache.cassandra.db.HintedHandOffManager.deliverHintsToEndpointInternal(HintedHandOffManager.java:384)
>... 7 more
> Caused by: java.lang.AssertionError: originally calculated column size
> of 629444349 but now it is 588008950
>at 
> org.apache.cassandra.db.compaction.LazilyCompactedRow.write(LazilyCompactedRow.java:124)
>at 
> org.apache.cassandra.io.sstable.SSTableWriter.append(SSTableWriter.java:160)
>at 
> org.apache.cassandra.db.compaction.CompactionTask.execute(CompactionTask.java:161)
>at 
> org.apache.cassandra.db.compaction.CompactionManager$7.call(CompactionManager.java:380)
>at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>... 3 more
> {noformat}
> Few lines regarding Hints from the output.log:
> {noformat}
>  INFO 06:21:26,202 Compacting large row 
> system/HintsColumnFamily:7000 (1712834057 bytes) 
> incrementally
>  INFO 06:22:52,610 Compacting large row 
> system/HintsColumnFamily:1000 (2616073981 bytes) 
> incrementally
>  INFO 06:22:59,111 flushing high-traffic column family CFS(Keyspace='system', 
> ColumnFamily='HintsColumnFamily') (estimated 305147360 bytes)
>  INFO 06:22:59,813 Enqueuing flush of 
> Memtable-HintsColumnFamily@833933926(3814342/305147360 serialized/live bytes, 
> 7452 ops)
>  INFO 06:22:59,814 Writing 
> Memtable-HintsColumnFamily@833933926(3814342/305147360 serialized/live bytes, 
> 7452 ops)
> {noformat}
> I think the problem may be somehow connected to an IntegerType secondary 
> index. I had a different problem with CF with two secondary indexes, the 
> first UTF8Type, the second IntegerType. After a few hours of inserting data 
> in the afternoon and midnight repair+compact, the next day I couldn't find 
> any row using the IntegerType secondary index. The output was like this:
> {noformat}
> [default@rfTest3] get IndexTest where col1 = 
> '3230727:http://zaskolak.cz/download.php';
> ---
> RowKey: 3230727:8383582:http://zaskolak.cz/download.php
> 

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

2013-11-24 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
CHANGES.txt


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

Branch: refs/heads/trunk
Commit: 5eaa2164e168b0d3a02d3fa4310c3e051a5cac5e
Parents: 9aebf9d aec8f16
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:54:57 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:54:57 2013 +0300

--
 CHANGES.txt  | 2 ++
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5eaa2164/CHANGES.txt
--
diff --cc CHANGES.txt
index 46f592e,57c1896..34dc7a5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,45 -1,11 +1,47 @@@
 -1.2.13
 - * Optimize FD phi calculation (CASSANDRA-6386)
 - * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
 - * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
 +2.0.4
 + * Fix divide-by-zero in PCI (CASSANDRA-6403)
 + * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
 + * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
++Merged from 1.2:
+  * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
  
  
 -1.2.12
 +2.0.3
 + * Fix FD leak on slice read path (CASSANDRA-6275)
 + * Cancel read meter task when closing SSTR (CASSANDRA-6358)
 + * free off-heap IndexSummary during bulk (CASSANDRA-6359)
 + * Recover from IOException in accept() thread (CASSANDRA-6349)
 + * Improve Gossip tolerance of abnormally slow tasks (CASSANDRA-6338)
 + * Fix trying to hint timed out counter writes (CASSANDRA-6322)
 + * Allow restoring specific columnfamilies from archived CL (CASSANDRA-4809)
 + * Avoid flushing compaction_history after each operation (CASSANDRA-6287)
 + * Fix repair assertion error when tombstones expire (CASSANDRA-6277)
 + * Skip loading corrupt key cache (CASSANDRA-6260)
 + * Fixes for compacting larger-than-memory rows (CASSANDRA-6274)
 + * Compact hottest sstables first and optionally omit coldest from
 +   compaction entirely (CASSANDRA-6109)
 + * Fix modifying column_metadata from thrift (CASSANDRA-6182)
 + * cqlsh: fix LIST USERS output (CASSANDRA-6242)
 + * Add IRequestSink interface (CASSANDRA-6248)
 + * Update memtable size while flushing (CASSANDRA-6249)
 + * Provide hooks around CQL2/CQL3 statement execution (CASSANDRA-6252)
 + * Require Permission.SELECT for CAS updates (CASSANDRA-6247)
 + * New CQL-aware SSTableWriter (CASSANDRA-5894)
 + * Reject CAS operation when the protocol v1 is used (CASSANDRA-6270)
 + * Correctly throw error when frame too large (CASSANDRA-5981)
 + * Fix serialization bug in PagedRange with 2ndary indexes (CASSANDRA-6299)
 + * Fix CQL3 table validation in Thrift (CASSANDRA-6140)
 + * Fix bug missing results with IN clauses (CASSANDRA-6327)
 + * Fix paging with reversed slices (CASSANDRA-6343)
 + * Set minTimestamp correctly to be able to drop expired sstables 
(CASSANDRA-6337)
 + * Support NaN and Infinity as float literals (CASSANDRA-6003)
 + * Remove RF from nodetool ring output (CASSANDRA-6289)
 + * Fix attempting to flush empty rows (CASSANDRA-6374)
 + * Fix potential out of bounds exception when paging (CASSANDRA-6333)
 +Merged from 1.2:
 + * Optimize FD phi calculation (CASSANDRA-6386)
 + * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
 + * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
   * Invalidate row cache when dropping CF (CASSANDRA-6351)
   * add non-jamm path for cached statements (CASSANDRA-6293)
   * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5eaa2164/pylib/cqlshlib/formatting.py
--



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

2013-11-24 Thread aleksey
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: f69e043ce4a4c8ecba6682fcd7ddf771a773afea
Parents: dc95675 5eaa216
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:55:26 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:55:26 2013 +0300

--
 CHANGES.txt  | 2 ++
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f69e043c/CHANGES.txt
--
diff --cc CHANGES.txt
index eb0bc91,34dc7a5..ef3aa17
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,23 -1,9 +1,25 @@@
 +2.1
 + * allocate fixed index summary memory pool and resample cold index summaries 
 +   to use less memory (CASSANDRA-5519)
 + * Removed multithreaded compaction (CASSANDRA-6142)
 + * Parallelize fetching rows for low-cardinality indexes (CASSANDRA-1337)
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 + * Remove CFDefinition (CASSANDRA-6253)
 + * Use AtomicIntegerFieldUpdater in RefCountedMemory (CASSANDRA-6278)
 + * User-defined types for CQL3 (CASSANDRA-5590)
 + * Use of o.a.c.metrics in nodetool (CASSANDRA-5871)
 + * Batch read from OTC's queue and cleanup (CASSANDRA-1632)
 +
 +
  2.0.4
 - * Fix divide-by-zero in PCI (CASSANDRA-6403)
   * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
   * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
+ Merged from 1.2:
+  * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
  
  
  2.0.3



[1/3] git commit: cqlsh: quote single quotes in strings inside collections

2013-11-24 Thread aleksey
Updated Branches:
  refs/heads/trunk dc956751f -> f69e043ce


cqlsh: quote single quotes in strings inside collections

patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for
CASSANDRA-6172


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

Branch: refs/heads/trunk
Commit: aec8f16705a4fea6c33e84d5a40d370b99c518e4
Parents: da5ff08
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:51:26 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:53:16 2013 +0300

--
 CHANGES.txt  | 1 +
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c012148..57c1896 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Optimize FD phi calculation (CASSANDRA-6386)
  * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
  * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
+ * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
 
 
 1.2.12

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/pylib/cqlshlib/formatting.py
--
diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
index b571033..44392ce 100644
--- a/pylib/cqlshlib/formatting.py
+++ b/pylib/cqlshlib/formatting.py
@@ -180,6 +180,8 @@ def strftime(time_format, seconds):
 @formatter_for('text')
 def format_value_text(val, encoding, colormap, quote=False, **_):
 escapedval = val.replace(u'\\', u'')
+if quote:
+escapedval = escapedval.replace("'", "''")
 escapedval = unicode_controlchars_re.sub(_show_control_chars, escapedval)
 bval = escapedval.encode(encoding, 'backslashreplace')
 if quote:



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

2013-11-24 Thread aleksey
Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
CHANGES.txt


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

Branch: refs/heads/cassandra-2.0
Commit: 5eaa2164e168b0d3a02d3fa4310c3e051a5cac5e
Parents: 9aebf9d aec8f16
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:54:57 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:54:57 2013 +0300

--
 CHANGES.txt  | 2 ++
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/5eaa2164/CHANGES.txt
--
diff --cc CHANGES.txt
index 46f592e,57c1896..34dc7a5
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,45 -1,11 +1,47 @@@
 -1.2.13
 - * Optimize FD phi calculation (CASSANDRA-6386)
 - * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
 - * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
 +2.0.4
 + * Fix divide-by-zero in PCI (CASSANDRA-6403)
 + * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
 + * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
++Merged from 1.2:
+  * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
  
  
 -1.2.12
 +2.0.3
 + * Fix FD leak on slice read path (CASSANDRA-6275)
 + * Cancel read meter task when closing SSTR (CASSANDRA-6358)
 + * free off-heap IndexSummary during bulk (CASSANDRA-6359)
 + * Recover from IOException in accept() thread (CASSANDRA-6349)
 + * Improve Gossip tolerance of abnormally slow tasks (CASSANDRA-6338)
 + * Fix trying to hint timed out counter writes (CASSANDRA-6322)
 + * Allow restoring specific columnfamilies from archived CL (CASSANDRA-4809)
 + * Avoid flushing compaction_history after each operation (CASSANDRA-6287)
 + * Fix repair assertion error when tombstones expire (CASSANDRA-6277)
 + * Skip loading corrupt key cache (CASSANDRA-6260)
 + * Fixes for compacting larger-than-memory rows (CASSANDRA-6274)
 + * Compact hottest sstables first and optionally omit coldest from
 +   compaction entirely (CASSANDRA-6109)
 + * Fix modifying column_metadata from thrift (CASSANDRA-6182)
 + * cqlsh: fix LIST USERS output (CASSANDRA-6242)
 + * Add IRequestSink interface (CASSANDRA-6248)
 + * Update memtable size while flushing (CASSANDRA-6249)
 + * Provide hooks around CQL2/CQL3 statement execution (CASSANDRA-6252)
 + * Require Permission.SELECT for CAS updates (CASSANDRA-6247)
 + * New CQL-aware SSTableWriter (CASSANDRA-5894)
 + * Reject CAS operation when the protocol v1 is used (CASSANDRA-6270)
 + * Correctly throw error when frame too large (CASSANDRA-5981)
 + * Fix serialization bug in PagedRange with 2ndary indexes (CASSANDRA-6299)
 + * Fix CQL3 table validation in Thrift (CASSANDRA-6140)
 + * Fix bug missing results with IN clauses (CASSANDRA-6327)
 + * Fix paging with reversed slices (CASSANDRA-6343)
 + * Set minTimestamp correctly to be able to drop expired sstables 
(CASSANDRA-6337)
 + * Support NaN and Infinity as float literals (CASSANDRA-6003)
 + * Remove RF from nodetool ring output (CASSANDRA-6289)
 + * Fix attempting to flush empty rows (CASSANDRA-6374)
 + * Fix potential out of bounds exception when paging (CASSANDRA-6333)
 +Merged from 1.2:
 + * Optimize FD phi calculation (CASSANDRA-6386)
 + * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
 + * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
   * Invalidate row cache when dropping CF (CASSANDRA-6351)
   * add non-jamm path for cached statements (CASSANDRA-6293)
   * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/5eaa2164/pylib/cqlshlib/formatting.py
--



[1/2] git commit: cqlsh: quote single quotes in strings inside collections

2013-11-24 Thread aleksey
Updated Branches:
  refs/heads/cassandra-2.0 9aebf9daf -> 5eaa2164e


cqlsh: quote single quotes in strings inside collections

patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for
CASSANDRA-6172


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

Branch: refs/heads/cassandra-2.0
Commit: aec8f16705a4fea6c33e84d5a40d370b99c518e4
Parents: da5ff08
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:51:26 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:53:16 2013 +0300

--
 CHANGES.txt  | 1 +
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c012148..57c1896 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Optimize FD phi calculation (CASSANDRA-6386)
  * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
  * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
+ * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
 
 
 1.2.12

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/pylib/cqlshlib/formatting.py
--
diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
index b571033..44392ce 100644
--- a/pylib/cqlshlib/formatting.py
+++ b/pylib/cqlshlib/formatting.py
@@ -180,6 +180,8 @@ def strftime(time_format, seconds):
 @formatter_for('text')
 def format_value_text(val, encoding, colormap, quote=False, **_):
 escapedval = val.replace(u'\\', u'')
+if quote:
+escapedval = escapedval.replace("'", "''")
 escapedval = unicode_controlchars_re.sub(_show_control_chars, escapedval)
 bval = escapedval.encode(encoding, 'backslashreplace')
 if quote:



git commit: cqlsh: quote single quotes in strings inside collections

2013-11-24 Thread aleksey
Updated Branches:
  refs/heads/cassandra-1.2 da5ff0805 -> aec8f1670


cqlsh: quote single quotes in strings inside collections

patch by Mikhail Stepura; reviewed by Aleksey Yeschenko for
CASSANDRA-6172


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

Branch: refs/heads/cassandra-1.2
Commit: aec8f16705a4fea6c33e84d5a40d370b99c518e4
Parents: da5ff08
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:51:26 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:53:16 2013 +0300

--
 CHANGES.txt  | 1 +
 pylib/cqlshlib/formatting.py | 2 ++
 2 files changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index c012148..57c1896 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,7 @@
  * Optimize FD phi calculation (CASSANDRA-6386)
  * Improve initial FD phi estimate when starting up (CASSANDRA-6385)
  * Don't list CQL3 table in CLI describe even if named explicitely 
(CASSANDRA-5750)
+ * cqlsh: quote single quotes in strings inside collections (CASSANDRA-6172)
 
 
 1.2.12

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aec8f167/pylib/cqlshlib/formatting.py
--
diff --git a/pylib/cqlshlib/formatting.py b/pylib/cqlshlib/formatting.py
index b571033..44392ce 100644
--- a/pylib/cqlshlib/formatting.py
+++ b/pylib/cqlshlib/formatting.py
@@ -180,6 +180,8 @@ def strftime(time_format, seconds):
 @formatter_for('text')
 def format_value_text(val, encoding, colormap, quote=False, **_):
 escapedval = val.replace(u'\\', u'')
+if quote:
+escapedval = escapedval.replace("'", "''")
 escapedval = unicode_controlchars_re.sub(_show_control_chars, escapedval)
 bval = escapedval.encode(encoding, 'backslashreplace')
 if quote:



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

2013-11-24 Thread aleksey
Merge branch 'cassandra-2.0' into trunk


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

Branch: refs/heads/trunk
Commit: dc956751f8338acd049cfc85c7d67032fdba136e
Parents: 5bbcaa4 9aebf9d
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:23:47 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:23:47 2013 +0300

--
 CHANGES.txt  | 1 +
 .../org/apache/cassandra/serializers/TimestampSerializer.java| 4 
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/dc956751/CHANGES.txt
--
diff --cc CHANGES.txt
index 3fdb8e7,46f592e..eb0bc91
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,22 -1,7 +1,23 @@@
 +2.1
 + * allocate fixed index summary memory pool and resample cold index summaries 
 +   to use less memory (CASSANDRA-5519)
 + * Removed multithreaded compaction (CASSANDRA-6142)
 + * Parallelize fetching rows for low-cardinality indexes (CASSANDRA-1337)
 + * change logging from log4j to logback (CASSANDRA-5883)
 + * switch to LZ4 compression for internode communication (CASSANDRA-5887)
 + * Stop using Thrift-generated Index* classes internally (CASSANDRA-5971)
 + * Remove 1.2 network compatibility code (CASSANDRA-5960)
 + * Remove leveled json manifest migration code (CASSANDRA-5996)
 + * Remove CFDefinition (CASSANDRA-6253)
 + * Use AtomicIntegerFieldUpdater in RefCountedMemory (CASSANDRA-6278)
 + * User-defined types for CQL3 (CASSANDRA-5590)
 + * Use of o.a.c.metrics in nodetool (CASSANDRA-5871)
 + * Batch read from OTC's queue and cleanup (CASSANDRA-1632)
 +
 +
  2.0.4
 - * Fix divide-by-zero in PCI (CASSANDRA-6403)
   * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
+  * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
  
  
  2.0.3



[1/2] git commit: Add sub-ms precision formats to the timestamp parser

2013-11-24 Thread aleksey
Updated Branches:
  refs/heads/trunk 5bbcaa4da -> dc956751f


Add sub-ms precision formats to the timestamp parser

patch by Lorcan Coyle; reviewed by Aleksey Yeschenko for CASSANDRA-6395


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

Branch: refs/heads/trunk
Commit: 9aebf9daf81b6888db99a3439733aa8b52dcc001
Parents: 9ebb091
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:22:49 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:22:49 2013 +0300

--
 CHANGES.txt  | 1 +
 .../org/apache/cassandra/serializers/TimestampSerializer.java| 4 
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aebf9da/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 77d2841..46f592e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 2.0.4
  * Fix divide-by-zero in PCI (CASSANDRA-6403)
  * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
+ * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
 
 
 2.0.3

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aebf9da/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
--
diff --git a/src/java/org/apache/cassandra/serializers/TimestampSerializer.java 
b/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
index 77bd59a..6203427 100644
--- a/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
+++ b/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
@@ -30,10 +30,14 @@ public class TimestampSerializer implements 
TypeSerializer
 "-MM-dd HH:mm:ss",
 "-MM-dd HH:mmZ",
 "-MM-dd HH:mm:ssZ",
+"-MM-dd HH:mm:ss.SSS",
+"-MM-dd HH:mm:ss.SSSZ",
 "-MM-dd'T'HH:mm",
 "-MM-dd'T'HH:mmZ",
 "-MM-dd'T'HH:mm:ss",
 "-MM-dd'T'HH:mm:ssZ",
+"-MM-dd'T'HH:mm:ss.SSS",
+"-MM-dd'T'HH:mm:ss.SSSZ",
 "-MM-dd",
 "-MM-ddZ"
 };



git commit: Add sub-ms precision formats to the timestamp parser

2013-11-24 Thread aleksey
Updated Branches:
  refs/heads/cassandra-2.0 9ebb09182 -> 9aebf9daf


Add sub-ms precision formats to the timestamp parser

patch by Lorcan Coyle; reviewed by Aleksey Yeschenko for CASSANDRA-6395


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

Branch: refs/heads/cassandra-2.0
Commit: 9aebf9daf81b6888db99a3439733aa8b52dcc001
Parents: 9ebb091
Author: Aleksey Yeschenko 
Authored: Sun Nov 24 21:22:49 2013 +0300
Committer: Aleksey Yeschenko 
Committed: Sun Nov 24 21:22:49 2013 +0300

--
 CHANGES.txt  | 1 +
 .../org/apache/cassandra/serializers/TimestampSerializer.java| 4 
 2 files changed, 5 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aebf9da/CHANGES.txt
--
diff --git a/CHANGES.txt b/CHANGES.txt
index 77d2841..46f592e 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,7 @@
 2.0.4
  * Fix divide-by-zero in PCI (CASSANDRA-6403)
  * Fix setting last compacted key in the wrong level for LCS (CASSANDRA-6284)
+ * Add sub-ms precision formats to the timestamp parser (CASSANDRA-6395)
 
 
 2.0.3

http://git-wip-us.apache.org/repos/asf/cassandra/blob/9aebf9da/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
--
diff --git a/src/java/org/apache/cassandra/serializers/TimestampSerializer.java 
b/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
index 77bd59a..6203427 100644
--- a/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
+++ b/src/java/org/apache/cassandra/serializers/TimestampSerializer.java
@@ -30,10 +30,14 @@ public class TimestampSerializer implements 
TypeSerializer
 "-MM-dd HH:mm:ss",
 "-MM-dd HH:mmZ",
 "-MM-dd HH:mm:ssZ",
+"-MM-dd HH:mm:ss.SSS",
+"-MM-dd HH:mm:ss.SSSZ",
 "-MM-dd'T'HH:mm",
 "-MM-dd'T'HH:mmZ",
 "-MM-dd'T'HH:mm:ss",
 "-MM-dd'T'HH:mm:ssZ",
+"-MM-dd'T'HH:mm:ss.SSS",
+"-MM-dd'T'HH:mm:ss.SSSZ",
 "-MM-dd",
 "-MM-ddZ"
 };



[jira] [Updated] (CASSANDRA-6395) Add the ability to query by TimeUUIDs with milisecond granularity

2013-11-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-6395:
-

Reviewer: Aleksey Yeschenko
Assignee: Lorcan Coyle

> Add the ability to query by TimeUUIDs with milisecond granularity
> -
>
> Key: CASSANDRA-6395
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6395
> Project: Cassandra
>  Issue Type: New Feature
>Reporter: Lorcan Coyle
>Assignee: Lorcan Coyle
>Priority: Minor
>  Labels: lhf
>
> Currently it is impossible to query for dates with the minTimeuuid and 
> maxTimeuuid functions with sub-second accuracy from cqlsh because the parser 
> doesn't recognise dates formatted at that granularity (e.g., 2013-09-30 
> 22:19:06.591). By adding the following ISO8601 patterns to 
> TimestampSerializer this functionality is unlocked:
> "-MM-dd HH:mm:ss.SSS",
> "-MM-dd HH:mm:ss.SSSZ",
> "-MM-dd'T'HH:mm:ss.SSS",
> "-MM-dd'T'HH:mm:ss.SSSZ".
> I submitted this as a pull-request on the github mirror 
> (https://github.com/apache/cassandra/pull/23), which I'll close now. I'll 
> submit a patch to address this here.



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Resolved] (CASSANDRA-6402) cannot query using DynamicCompositeType

2013-11-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko resolved CASSANDRA-6402.
--

Resolution: Won't Fix

> cannot query using DynamicCompositeType
> ---
>
> Key: CASSANDRA-6402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6402
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: victorsosa
>Priority: Minor
>
> HI,
> I cannot query using DynamicCompositeType. 
> And this is how it is define the column family:
> DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))
> this code is from the project countandra:
> csdb.createColumnFamily(
>   CassandraStorage.s_keySpace,
>   countandraCF,
>   "UTF8Type",
>   "DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))",
>   "CounterColumnType");
> you can get the code for test from:
> https://github.com/milindparikh/Countandra
> The Hector api is calling the same column family with data and it is WORKING 
> FINE, the issue is only when I am trying to use CQL to query the table "ddcc".
> NOTE: the project is using cassandra 1.0.1, I updated it to cassandra 2.0.2
> If I try something like:
> select * from ddcc; 
> Error get trying to query a table that have a DynamicCompositeType
> 
> cqlsh> use countandra;
> cqlsh:countandra> select * from ddcc;
> Traceback (most recent call last):
>   File "./cqlsh", line 901, in perform_statement_untraced
> self.cursor.execute(statement, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 81, in execute
> return self.process_execution_results(response, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", 
> line 116, in process_execution_results
> self.get_metadata_info(self.result[0])
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 97, in get_metadata_info
> name, nbytes, vtype, ctype = self.get_column_metadata(colid)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 104, in get_column_metadata
> return self.decoder.decode_metadata_and_type(column_id)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 
> 40, in decode_metadata_and_type
> valdtype = cqltypes.lookup_casstype(validator)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 
> 145, in lookup_casstype
> raise ValueError("Don't know how to parse type string %r: %s" % 
> (casstype, e))
> ValueError: Don't know how to parse type string 
> 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
>  weird characters 
> '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
>  at end



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Updated] (CASSANDRA-6402) cannot query using DynamicCompositeType

2013-11-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-6402:
-

Priority: Minor  (was: Major)

> cannot query using DynamicCompositeType
> ---
>
> Key: CASSANDRA-6402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6402
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: victorsosa
>Priority: Minor
>
> HI,
> I cannot query using DynamicCompositeType. 
> And this is how it is define the column family:
> DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))
> this code is from the project countandra:
> csdb.createColumnFamily(
>   CassandraStorage.s_keySpace,
>   countandraCF,
>   "UTF8Type",
>   "DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))",
>   "CounterColumnType");
> you can get the code for test from:
> https://github.com/milindparikh/Countandra
> The Hector api is calling the same column family with data and it is WORKING 
> FINE, the issue is only when I am trying to use CQL to query the table "ddcc".
> NOTE: the project is using cassandra 1.0.1, I updated it to cassandra 2.0.2
> If I try something like:
> select * from ddcc; 
> Error get trying to query a table that have a DynamicCompositeType
> 
> cqlsh> use countandra;
> cqlsh:countandra> select * from ddcc;
> Traceback (most recent call last):
>   File "./cqlsh", line 901, in perform_statement_untraced
> self.cursor.execute(statement, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 81, in execute
> return self.process_execution_results(response, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", 
> line 116, in process_execution_results
> self.get_metadata_info(self.result[0])
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 97, in get_metadata_info
> name, nbytes, vtype, ctype = self.get_column_metadata(colid)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 104, in get_column_metadata
> return self.decoder.decode_metadata_and_type(column_id)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 
> 40, in decode_metadata_and_type
> valdtype = cqltypes.lookup_casstype(validator)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 
> 145, in lookup_casstype
> raise ValueError("Don't know how to parse type string %r: %s" % 
> (casstype, e))
> ValueError: Don't know how to parse type string 
> 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
>  weird characters 
> '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
>  at end



--
This message was sent by Atlassian JIRA
(v6.1#6144)


[jira] [Commented] (CASSANDRA-6402) cannot query using DynamicCompositeType

2013-11-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-6402:
--

You can with CQL3, it's cqlsh that doesn't support DynamicCompositeType. And 
isn't going to any time soon - you shouldn't be using DCT, use regular 
composites instead.

Feel free to reopen if you have a working patch. Not going to fix this one 
otherwise. 

> cannot query using DynamicCompositeType
> ---
>
> Key: CASSANDRA-6402
> URL: https://issues.apache.org/jira/browse/CASSANDRA-6402
> Project: Cassandra
>  Issue Type: Bug
>  Components: API, Core
>Reporter: victorsosa
>
> HI,
> I cannot query using DynamicCompositeType. 
> And this is how it is define the column family:
> DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))
> this code is from the project countandra:
> csdb.createColumnFamily(
>   CassandraStorage.s_keySpace,
>   countandraCF,
>   "UTF8Type",
>   "DynamicCompositeType 
> (l=>LongType,t=>TimeUUIDType,s=>UTF8Type,S=>UTF8Type(reversed=true),L=>LongType(reversed=true),T=>TimeUUIDType(reversed=true))",
>   "CounterColumnType");
> you can get the code for test from:
> https://github.com/milindparikh/Countandra
> The Hector api is calling the same column family with data and it is WORKING 
> FINE, the issue is only when I am trying to use CQL to query the table "ddcc".
> NOTE: the project is using cassandra 1.0.1, I updated it to cassandra 2.0.2
> If I try something like:
> select * from ddcc; 
> Error get trying to query a table that have a DynamicCompositeType
> 
> cqlsh> use countandra;
> cqlsh:countandra> select * from ddcc;
> Traceback (most recent call last):
>   File "./cqlsh", line 901, in perform_statement_untraced
> self.cursor.execute(statement, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 81, in execute
> return self.process_execution_results(response, decoder=decoder)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/thrifteries.py", 
> line 116, in process_execution_results
> self.get_metadata_info(self.result[0])
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 97, in get_metadata_info
> name, nbytes, vtype, ctype = self.get_column_metadata(colid)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cursor.py", line 
> 104, in get_column_metadata
> return self.decoder.decode_metadata_and_type(column_id)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/decoders.py", line 
> 40, in decode_metadata_and_type
> valdtype = cqltypes.lookup_casstype(validator)
>   File "./../lib/cql-internal-only-1.4.1.zip/cql-1.4.1/cql/cqltypes.py", line 
> 145, in lookup_casstype
> raise ValueError("Don't know how to parse type string %r: %s" % 
> (casstype, e))
> ValueError: Don't know how to parse type string 
> 'org.apache.cassandra.db.marshal.DynamicCompositeType(T=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)':
>  weird characters 
> '=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.TimeUUIDType),t=>org.apache.cassandra.db.marshal.TimeUUIDType,s=>org.apache.cassandra.db.marshal.UTF8Type,S=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.UTF8Type),L=>org.apache.cassandra.db.marshal.ReversedType(org.apache.cassandra.db.marshal.LongType),l=>org.apache.cassandra.db.marshal.LongType)'
>  at end



--
This message was sent by Atlassian JIRA
(v6.1#6144)