cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Spertus (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-6420) CassandraStorage should not assume all DataBags are DefaultDataBags
Date Sat, 30 Nov 2013 19:54:35 GMT

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

Mike Spertus updated CASSANDRA-6420:
------------------------------------

    Description: 
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. 

  was:

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. 

     Issue Type: Bug  (was: Improvement)

When I initially filed this issue, I wasn't sure whether it should be classified as a bug
or and improvement. After reading http://www.datastax.com/docs/datastax_enterprise1.0/about_pig,
I think it should be classified as a bug, because the data {{B}} in the issue description
is in a form that this link says should be suitable for storing into Cassandra.

> 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
>              Labels: pig
>             Fix For: 1.2.12, 2.0.2, 2.1
>
>         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#6144)

Mime
View raw message