Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Pig >> mail # user >> how can i get the column value? Need help!.. cassandra 1.28 and pig 0.11.1


Copy link to this message
-
Re: how can i get the column value? Need help!.. cassandra 1.28 and pig 0.11.1
hi all:

More info :

https://issues.apache.org/jira/browse/CASSANDRA-5941

I tried this (and gen. cassandra 1.2.9)  but do not work for me,

git clone http://git-wip-us.apache.org/repos/asf/cassandra.git
cd cassandra
git checkout cassandra-1.2
patch -p1 < 5867-bug-fix-filter-push-down-1.2-branch.txt
ant

Miguel Angel Martín Junquera
Analyst Engineer.
[EMAIL PROTECTED]

2013/9/2 Miguel Angel Martin junquera <[EMAIL PROTECTED]>

> hi:
>
> I test this in cassandra 1.2.9 new  version and the issue still persists .
>
> :-(
>
>
>
>
> Miguel Angel Martín Junquera
> Analyst Engineer.
> [EMAIL PROTECTED]
>
>
>
> 2013/8/30 Miguel Angel Martin junquera <[EMAIL PROTECTED]>
>
>> I try this:
>>
>> *rows = LOAD
>> 'cql://keyspace1/test?page_size=1&split_size=4&where_clause=age%3D30' USING
>> CqlStorage();*
>>
>> *dump rows;*
>>
>> *ILLUSTRATE rows;*
>>
>> *describe rows;*
>>
>> *
>> *
>>
>> *values2= FOREACH rows GENERATE  TOTUPLE (id) as
>> (mycolumn:tuple(name,value));*
>>
>> *dump values2;*
>>
>> *describe values2;*
>> *
>> *
>>
>> But I get this results:
>>
>>
>>
>> -------------------------------------------------------------
>> | rows     | id:chararray   | age:int   | title:chararray   |
>> -------------------------------------------------------------
>> |          | (id, 6)        | (age, 30) | (title, QA)       |
>> -------------------------------------------------------------
>>
>> rows: {id: chararray,age: int,title: chararray}
>> 2013-08-30 09:54:37,831 [main] ERROR org.apache.pig.tools.grunt.Grunt -
>> ERROR 1031: Incompatable field schema: left is
>> "tuple_0:tuple(mycolumn:tuple(name:bytearray,value:bytearray))", right is
>> "org.apache.pig.builtin.totuple_id_1:tuple(id:chararray)"
>>
>>
>>
>>
>>
>> or
>>
>>
>>
>> ....
>>
>> *values2= FOREACH rows GENERATE  TOTUPLE (id) ;*
>> *dump values2;*
>> *describe values2;*
>>
>>
>>
>>
>> and  the results are:
>>
>>
>> ...
>> (((id,6)))
>> (((id,5)))
>> values2: {org.apache.pig.builtin.totuple_id_8: (id: chararray)}
>>
>>
>>
>> Aggg!!!!!
>>
>>
>> *
>> *
>>
>>
>>
>>
>> Miguel Angel Martín Junquera
>> Analyst Engineer.
>> [EMAIL PROTECTED]
>>
>>
>>
>> 2013/8/28 Miguel Angel Martin junquera <[EMAIL PROTECTED]>
>>
>>> hi:
>>>
>>> I can not understand why the schema is  define like *"id:chararray,age:int,title:chararray"
>>>  and it does not define like tuples or bag tuples,  if we have pair
>>> key-values  columns*
>>> *
>>> *
>>> *
>>> *
>>> *I try other time to change schema  but it does not work.*
>>> *
>>> *
>>> *any ideas ...*
>>> *
>>> *
>>> *perhaps, is the issue in the definition cql3 tables ?*
>>> *
>>> *
>>> *regards*
>>>
>>>
>>> 2013/8/28 Miguel Angel Martin junquera <[EMAIL PROTECTED]
>>> >
>>>
>>>> hi all:
>>>>
>>>>
>>>> Regards
>>>>
>>>> Still i can resolve this issue. .....
>>>>
>>>> does anybody have this issue or try to test this simple example?
>>>>
>>>>
>>>> i am stumped I can not find a solution working.
>>>>
>>>> I appreciate any comment or help
>>>>
>>>>
>>>> 2013/8/22 Miguel Angel Martin junquera <
>>>> [EMAIL PROTECTED]>
>>>>
>>>>> hi all:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I,m testing the new CqlStorage() with cassandra 1.28 and pig 0.11.1
>>>>>
>>>>>
>>>>> I am using this sample data test:
>>>>>
>>>>>
>>>>> http://frommyworkshop.blogspot.com.es/2013/07/hadoop-map-reduce-with-cassandra.html
>>>>>
>>>>> And I load and dump data Righ with this script:
>>>>>
>>>>> *rows = LOAD
>>>>> 'cql://keyspace1/test?page_size=1&split_size=4&where_clause=age%3D30' USING
>>>>> CqlStorage();*
>>>>> *
>>>>> *
>>>>> *dump rows;*
>>>>> *describe rows;*
>>>>> *
>>>>> *
>>>>>
>>>>> *resutls:
>>>>>
>>>>> ((id,6),(age,30),(title,QA))
>>>>>
>>>>> ((id,5),(age,30),(title,QA))
>>>>>
>>>>> rows: {id: chararray,age: int,title: chararray}
>>>>>
>>>>>
>>>>> *
>>>>>
>>>>>
>>>>> But i can not  get  the column values
>>>>>
>>>>> I try to define   another schemas in Load like I used with