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

Hudson commented on CASSANDRA-3327:
-----------------------------------

Integrated in Cassandra-0.8 #420 (See 
[https://builds.apache.org/job/Cassandra-0.8/420/])
    TimeUUID support in CassandraStorage.
Patch by brandonwilliams, reviewed by Rick Branson for CASSANDRA-3327

brandonwilliams : 
http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1220926
Files : 
* 
/cassandra/branches/cassandra-0.8/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java

                
> Support TimeUUID in CassandraStorage
> ------------------------------------
>
>                 Key: CASSANDRA-3327
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3327
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Contrib
>    Affects Versions: 0.8.7
>         Environment: Cassandra 0.8.6 Build #348 (CASSANDRA-2777 + 
> CASSANDRA-2810)
>            Reporter: Manuel Kreutz
>            Assignee: Brandon Williams
>              Labels: pig
>             Fix For: 0.8.10, 1.0.7
>
>         Attachments: 3327-v2.txt, 3327.txt
>
>
> Cassandra CLI:
> {code}
> grunt> raw = LOAD 'cassandra://TEST/CF'
> >>     USING CassandraStorage()
> >>     AS (
> >>         key:chararray,
> >>         columns:bag {
> >>             column:tuple(
> >>                 name,
> >>                 value
> >>             )
> >>         });
> grunt> describe raw;
> raw: {key: chararray,columns: {(name: bytearray,value: bytearray)}}
> log_test =
>     FOREACH raw
>     GENERATE
>         (CHARARRAY) key,
>         flatten(columns);
> grunt> DUMP log_test;
> {code}
> Returns:
> {code}
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to 
> open iterator for alias log_test. Backend error : Unexpected data type 
> java.util.UUID found in stream. Note only standard Pig type is supported when 
> you output from UDF/LoadFunc
>         at org.apache.pig.PigServer.openIterator(PigServer.java:890)
>         at 
> org.apache.pig.tools.grunt.GruntParser.processDump(GruntParser.java:655)
>         at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:303)
>         at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:188)
>         at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:164)
>         at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:67)
>         at org.apache.pig.Main.run(Main.java:487)
>         at org.apache.pig.Main.main(Main.java:108)
> Caused by: java.lang.RuntimeException: Unexpected data type java.util.UUID 
> found in stream. Note only standard Pig type is supported when you output 
> from UDF/LoadFunc
>         at 
> org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:478)
>         at 
> org.apache.pig.data.BinInterSedes.writeTuple(BinInterSedes.java:542)
>         at 
> org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:357)
>         at 
> org.apache.pig.impl.io.InterRecordWriter.write(InterRecordWriter.java:73)
>         at org.apache.pig.impl.io.InterStorage.putNext(InterStorage.java:87)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:138)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOutputFormat$PigRecordWriter.write(PigOutputFormat.java:97)
>         at 
> org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(MapTask.java:498)
>         at 
> org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.collect(PigMapOnly.java:48)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:263)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:256)
>         at 
> org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:58)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:621)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:305)
> {code}
> According to driftx on IRC the setTupleValue function in CassandraStorage 
> needs to handle the uuid case and cast it to a DataByteArray.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to