[jira] [Updated] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-09 Thread donal zang (JIRA)

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

donal zang updated CASSANDRA-2231:
--

Comment: was deleted

(was: No, there's no bytes remaining after 0x01.
The exception is raised in the validate(ByteBuffer bytes) function:

215 byte b = bb.get();
216 if (b != 0 && bb.remaining() != 0)
217 throw new MarshalException("Invalid bytes remaining after 
an end-of-component at component" +i);

that means if the byte is not 0x00, then this Exception will be raised?

correct me if I am wrong)

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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


[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-09 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-2231:
---

No, there's no bytes remaining after 0x01.
The exception is raised in the validate(ByteBuffer bytes) function:

215 byte b = bb.get();
216 if (b != 0 && bb.remaining() != 0)
217 throw new MarshalException("Invalid bytes remaining after 
an end-of-component at component" +i);

that means if the byte is not 0x00, then this Exception will be raised?

correct me if I am wrong

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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


[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-09 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-2231:
---

In CompositeType.java I find this:
 37  * 'end-of-component' byte should always be 0 for actual column name.
 38  * However, it can set to 1 for query bounds. This allows to query for the
 39  * equivalent of 'give me the full super-column'. That is, if during a slice
 40  * query uses:
 41  *   start = <3><"foo".getBytes()><0>
 42  *   end   = <3><"foo".getBytes()><1>
 43  * then he will be sure to get *all* the columns whose first component is 
"foo".

Is this also apply to DynamicCompositeType ? When I use it in a  query end with 
'0x01', there's an Exception "Invalid bytes remaining after an end-of-component 
at component0"

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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


[jira] [Commented] (CASSANDRA-1472) Add bitmap secondary indexes

2011-06-06 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-1472:
---

I just have some test on the hash way secondary indexes, and found it really 
slow both for insertion and query, and there's no count APIs.
So I really hope there will be some more efficient way to do the secondary 
index.
Though people are using CF way to do secondary index by there own 
(http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html), but this 
loose the map-reduce advantage, and users may have to do lots of things by 
themselves.

> Add bitmap secondary indexes
> 
>
> Key: CASSANDRA-1472
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1472
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Core
>Reporter: Stu Hood
>Assignee: Stu Hood
> Fix For: 1.0
>
> Attachments: 0.7-1472-v5.tgz, 0.7-1472-v6.tgz, 
> 0001-CASSANDRA-1472-rebased-to-0.7-branch.txt, 
> 0019-Rename-bugfixes-and-fileclose.txt, 1472-v3.tgz, 1472-v4.tgz, 
> 1472-v5.tgz, anatomy.png, v4-bench-c32.txt
>
>
> Bitmap indexes are a very efficient structure for dealing with immutable 
> data. We can take advantage of the fact that SSTables are immutable by 
> attaching them directly to SSTables as a new component (supported by 
> CASSANDRA-1471).

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


[jira] [Commented] (CASSANDRA-2601) should have a get_indexed_slices count api

2011-06-05 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-2601:
---

+1, I would like this API too

> should have a get_indexed_slices count api
> --
>
> Key: CASSANDRA-2601
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2601
> Project: Cassandra
>  Issue Type: Wish
>  Components: API
>Affects Versions: 0.7.5, 0.8 beta 1
>Reporter: muyen lee
>Priority: Minor
>
> it would be nice to have get_indexed_slices count api

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


[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-01 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-2231:
---

Thanks sylvain !

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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


[jira] [Issue Comment Edited] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-01 Thread donal zang (JIRA)

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

donal zang edited comment on CASSANDRA-2231 at 6/1/11 3:16 PM:
---

Hi,
forgive me if the question is naive.
I'm using the release 
0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and  
when I apply the patch , it can't find the file TypeParser.java :
{quote}
$patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch
patching file 
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
can't find file to patch at input line 694
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
|diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java 
b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|index a3fabc5..0b21042 100644
|--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
--
File to patch: 
{quote}
So, am I missing something?

  was (Author: donal):
Hi,
forgive me if the question is naive.
I'm using the release 
0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and  
when I apply the patch , it can't find the file TypeParser.java :
$patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch
patching file 
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
can't find file to patch at input line 694
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
|diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java 
b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|index a3fabc5..0b21042 100644
|--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
--
File to patch: 

So, am I missing something?
  
> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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


[jira] [Commented] (CASSANDRA-2231) Add CompositeType comparer to the comparers provided in org.apache.cassandra.db.marshal

2011-06-01 Thread donal zang (JIRA)

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

donal zang commented on CASSANDRA-2231:
---

Hi,
forgive me if the question is naive.
I'm using the release 
0.7(http://svn.apache.org/repos/asf/cassandra/tags/cassandra-0.7.6-2/) and  
when I apply the patch , it can't find the file TypeParser.java :
$patch -p1 < 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch
patching file 
src/java/org/apache/cassandra/db/marshal/AbstractCompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/CompositeType.java
patching file src/java/org/apache/cassandra/db/marshal/DynamicCompositeType.java
can't find file to patch at input line 694
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--
|diff --git a/src/java/org/apache/cassandra/db/marshal/TypeParser.java 
b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|index a3fabc5..0b21042 100644
|--- a/src/java/org/apache/cassandra/db/marshal/TypeParser.java
|+++ b/src/java/org/apache/cassandra/db/marshal/TypeParser.java
--
File to patch: 

So, am I missing something?

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---
>
> Key: CASSANDRA-2231
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
> Project: Cassandra
>  Issue Type: New Feature
>  Components: Contrib
>Reporter: Ed Anuff
>Assignee: Sylvain Lebresne
>Priority: Minor
> Fix For: 0.8.1
>
> Attachments: 
> 0001-Add-compositeType-and-DynamicCompositeType-v2.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v3.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType-v4.patch, 
> 0001-Add-compositeType-and-DynamicCompositeType_0.7.patch, 
> CompositeType-and-DynamicCompositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

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