cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6309) Pig CqlStorage generates ERROR 1108: Duplicate schema alias
Date Fri, 06 Dec 2013 00:30:35 GMT

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

Alex Liu commented on CASSANDRA-6309:
-------------------------------------

Trunk bumped Pig version to 0.11.0, the pig unit tests fail

{code}
    [junit] ------------- ---------------- ---------------
    [junit] Testcase: testCqlStorageListType(org.apache.cassandra.pig.CqlTableDataTypeTest):
Caused an ERROR
    [junit] Unable to open iterator for alias list_rows
    [junit] org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1066: Unable to open
iterator for alias list_rows
    [junit] 	at org.apache.pig.PigServer.openIterator(PigServer.java:836)
    [junit] 	at org.apache.cassandra.pig.CqlTableDataTypeTest.testCqlStorageListType(CqlTableDataTypeTest.java:332)
    [junit] Caused by: org.apache.pig.PigException: ERROR 1002: Unable to store alias list_rows
    [junit] 	at org.apache.pig.PigServer.storeEx(PigServer.java:935)
    [junit] 	at org.apache.pig.PigServer.store(PigServer.java:898)
    [junit] 	at org.apache.pig.PigServer.openIterator(PigServer.java:811)
    [junit] Caused by: org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobCreationException:
ERROR 2017: Internal error creating job configuration.
    [junit] 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:848)
    [junit] 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.compile(JobControlCompiler.java:294)
    [junit] 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher.launchPig(MapReduceLauncher.java:177)
    [junit] 	at org.apache.pig.PigServer.launchPlan(PigServer.java:1264)
    [junit] 	at org.apache.pig.PigServer.executeCompiledLogicalPlan(PigServer.java:1249)
    [junit] 	at org.apache.pig.PigServer.storeEx(PigServer.java:931)
    [junit] Caused by: java.io.IOException: Serialization error: org.apache.log4j.Level
    [junit] 	at org.apache.pig.impl.util.ObjectSerializer.serialize(ObjectSerializer.java:47)
    [junit] 	at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.JobControlCompiler.getJob(JobControlCompiler.java:526)
    [junit] Caused by: java.io.NotSerializableException: org.apache.log4j.Level
    [junit] 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1180)
    [junit] 	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1528)
    [junit] 	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
    [junit] 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1416)
    [junit] 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1174)
    [junit] 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:346)
    [junit] 	at org.apache.pig.impl.util.ObjectSerializer.serialize(ObjectSerializer.java:43)
{code}

> Pig CqlStorage generates  ERROR 1108: Duplicate schema alias
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-6309
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6309
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Hadoop
>            Reporter: Thunder Stumpges
>            Assignee: Alex Liu
>         Attachments: 6309-2.0.txt, 6309-fix-pig-test-compiling.txt, 6309-v2-2.0-branch.txt,
6309-v3.txt, LOCAL_ONE-write-for-all-strategies-v2.txt, LOCAL_ONE-write-for-all-strategies.txt
>
>
> In Pig after loading a simple CQL3 table from Cassandra 2.0.1, and dumping contents,
I receive:
> Caused by: org.apache.pig.impl.plan.PlanValidationException: ERROR 1108: Duplicate schema
alias: author in "cm"
>  cm = load 'cql://thunder_test/cassandra_messages' USING CqlStorage;
>  dump cm
> ERROR org.apache.pig.tools.grunt.Grunt - org.apache.pig.impl.logicalLayer.FrontendException:
ERROR 1066: Unable to open iterator for alias cm
> ...
> Caused by: org.apache.pig.impl.plan.PlanValidationException: ERROR 1108: Duplicate schema
alias: author in "cm"
>         at org.apache.pig.newplan.logical.visitor.SchemaAliasVisitor.validate(SchemaAliasVisitor.java:75)
> running 'describe cm' gives:
> cm: {message_id: chararray,author: chararray,author: chararray,body: chararray,message_id:
chararray}
> The original table schema in Cassandra is:
> CREATE TABLE cassandra_messages (
>   message_id text,
>   author text,
>   body text,
>   PRIMARY KEY (message_id, author)
> ) WITH
>   bloom_filter_fp_chance=0.010000 AND
>   caching='KEYS_ONLY' AND
>   comment='null' AND
>   dclocal_read_repair_chance=0.000000 AND
>   gc_grace_seconds=864000 AND
>   index_interval=128 AND
>   read_repair_chance=0.100000 AND
>   replicate_on_write='true' AND
>   populate_io_cache_on_flush='false' AND
>   default_time_to_live=0 AND
>   speculative_retry='NONE' AND
>   memtable_flush_period_in_ms=0 AND
>   compaction={'class': 'SizeTieredCompactionStrategy'} AND
>   compression={'sstable_compression': 'LZ4Compressor'};
> it appears that the code in CqlStorage.getColumnMetadata at ~line 478 takes the "keys"
columns (in my case, message_id and author) and appends the columns from getColumnMeta (which
has all three columns). Thus the keys columns are duplicated.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message