You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Mike Spertus (JIRA)" <ji...@apache.org> on 2013/12/23 06:25:50 UTC

[jira] [Commented] (CASSANDRA-6420) CassandraStorage should not assume all DataBags are DefaultDataBags

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

Mike Spertus commented on CASSANDRA-6420:
-----------------------------------------

Thanks, Brandon!

> CassandraStorage should not assume all DataBags are DefaultDataBags
> -------------------------------------------------------------------
>
>                 Key: CASSANDRA-6420
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6420
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>         Environment: All environments
>            Reporter: Mike Spertus
>            Assignee: Mike Spertus
>              Labels: pig
>             Fix For: 1.2.14, 2.0.4
>
>         Attachments: patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> CassandraStorage improperly assumes all DataBags are DefaultDataBags. As a result, natural Pig code can't be used with CassandraStorage. For example:
> {quote}
> {{B = FOREACH A GENERATE $0, TOBAG(TOTUPLE($1, $2));}}
> {{STORE B into  'cassandra://MyKeySpace/MyColumnFamily' using CassandraStorage();}}
> {quote}
> fails with a complaint that a {{NonSpillableDataBag}} can't be converted into a {{DefaultDataBag}}.
> Since the {{CassandraStorage}} code only calls methods from {{DataBag}}, there is no need for this artifical restriction. After applying the attached patch, the above code works fine, making CassandraStorage much easier to use.
> This is my first submission to Cassandra, so I apologize for any incorrect process. Please let me know what I should do differently. In particular, I am a little unclear where I should put the test. I am thinking I should put it in ThriftColumnFamilyTest.java. Is this correct or should it be somewhere else? I'll create a test as soon as I understand. 



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)