Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07E969193 for ; Fri, 21 Oct 2011 16:24:55 +0000 (UTC) Received: (qmail 26169 invoked by uid 500); 21 Oct 2011 16:24:54 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 26144 invoked by uid 500); 21 Oct 2011 16:24:54 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 26136 invoked by uid 99); 21 Oct 2011 16:24:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 16:24:54 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Oct 2011 16:24:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id CFC96315663 for ; Fri, 21 Oct 2011 16:22:33 +0000 (UTC) Date: Fri, 21 Oct 2011 16:22:33 +0000 (UTC) From: "Jonathan Ellis (Updated) (JIRA)" To: commits@cassandra.apache.org Message-ID: <1583719646.1638.1319214153852.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <26426129.29594.1308754253683.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (CASSANDRA-2810) RuntimeException in Pig when using "dump" command on column name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-2810?page=3Dcom.atla= ssian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-2810: -------------------------------------- Fix Version/s: 1.0.1 =20 > RuntimeException in Pig when using "dump" command on column name > ---------------------------------------------------------------- > > Key: CASSANDRA-2810 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2810 > Project: Cassandra > Issue Type: Bug > Affects Versions: 0.8.1 > Environment: Ubuntu 10.10, 32 bits > java version "1.6.0_24" > Brisk beta-2 installed from Debian packages > Reporter: Silv=C3=A8re Lestang > Assignee: Brandon Williams > Fix For: 0.8.7 > > Attachments: 2810-v2.txt, 2810-v3.txt, 2810.txt > > > This bug was previously report on [Brisk bug tracker|https://datastax.jir= a.com/browse/BRISK-232]. > In cassandra-cli: > {code} > [default@unknown] create keyspace Test > with placement_strategy =3D 'org.apache.cassandra.locator.SimpleStrat= egy' > and strategy_options =3D [{replication_factor:1}]; > [default@unknown] use Test; > Authenticated to keyspace: Test > [default@Test] create column family test; > [default@Test] set test[ascii('row1')][long(1)]=3Dinteger(35); > set test[ascii('row1')][long(2)]=3Dinteger(36); > set test[ascii('row1')][long(3)]=3Dinteger(38); > set test[ascii('row2')][long(1)]=3Dinteger(45); > set test[ascii('row2')][long(2)]=3Dinteger(42); > set test[ascii('row2')][long(3)]=3Dinteger(33); > [default@Test] list test; > Using default limit of 100 > ------------------- > RowKey: 726f7731 > =3D> (column=3D0000000000000001, value=3D35, timestamp=3D1308744931122000= ) > =3D> (column=3D0000000000000002, value=3D36, timestamp=3D1308744931124000= ) > =3D> (column=3D0000000000000003, value=3D38, timestamp=3D1308744931125000= ) > ------------------- > RowKey: 726f7732 > =3D> (column=3D0000000000000001, value=3D45, timestamp=3D1308744931127000= ) > =3D> (column=3D0000000000000002, value=3D42, timestamp=3D1308744931128000= ) > =3D> (column=3D0000000000000003, value=3D33, timestamp=3D1308744932722000= ) > 2 Rows Returned. > [default@Test] describe keyspace; > Keyspace: Test: > Replication Strategy: org.apache.cassandra.locator.SimpleStrategy > Durable Writes: true > Options: [replication_factor:1] > Column Families: > ColumnFamily: test > Key Validation Class: org.apache.cassandra.db.marshal.BytesType > Default column value validator: org.apache.cassandra.db.marshal.Byt= esType > Columns sorted by: org.apache.cassandra.db.marshal.BytesType > Row cache size / save period in seconds: 0.0/0 > Key cache size / save period in seconds: 200000.0/14400 > Memtable thresholds: 0.571875/122/1440 (millions of ops/MB/minutes) > GC grace seconds: 864000 > Compaction min/max thresholds: 4/32 > Read repair chance: 1.0 > Replicate on write: false > Built indexes: [] > {code} > In Pig command line: > {code} > grunt> test =3D LOAD 'cassandra://Test/test' USING CassandraStorage() AS = (rowkey:chararray, columns: bag {T: (name:long, value:int)}); > grunt> value_test =3D foreach test generate rowkey, columns.name, columns= .value; > grunt> dump value_test; > {code} > In /var/log/cassandra/system.log, I have severals time this exception: > {code} > INFO [IPC Server handler 3 on 8012] 2011-06-22 15:03:28,533 TaskInProgres= s.java (line 551) Error from attempt_201106210955_0051_m_000000_3: java.lan= g.RuntimeException: Unexpected data type -1 found in stream. > =09at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:478= ) > =09at org.apache.pig.data.BinInterSedes.writeTuple(BinInterSedes.java:541= ) > =09at org.apache.pig.data.BinInterSedes.writeBag(BinInterSedes.java:522) > =09at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:361= ) > =09at org.apache.pig.data.BinInterSedes.writeTuple(BinInterSedes.java:541= ) > =09at org.apache.pig.data.BinInterSedes.writeDatum(BinInterSedes.java:357= ) > =09at org.apache.pig.impl.io.InterRecordWriter.write(InterRecordWriter.ja= va:73) > =09at org.apache.pig.impl.io.InterStorage.putNext(InterStorage.java:87) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOut= putFormat$PigRecordWriter.write(PigOutputFormat.java:138) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigOut= putFormat$PigRecordWriter.write(PigOutputFormat.java:97) > =09at org.apache.hadoop.mapred.MapTask$NewDirectOutputCollector.write(Map= Task.java:638) > =09at org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputO= utputContext.java:80) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMap= Only$Map.collect(PigMapOnly.java:48) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMap= Base.runPipeline(PigMapBase.java:239) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMap= Base.map(PigMapBase.java:232) > =09at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMap= Base.map(PigMapBase.java:53) > =09at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144) > =09at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:763) > =09at org.apache.hadoop.mapred.MapTask.run(MapTask.java:369) > =09at org.apache.hadoop.mapred.Child$4.run(Child.java:259) > =09at java.security.AccessController.doPrivileged(Native Method) > =09at javax.security.auth.Subject.doAs(Subject.java:396) > =09at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInfor= mation.java:1059) > =09at org.apache.hadoop.mapred.Child.main(Child.java:253) > {code} > and the request failed. > {code} > grunt> test =3D LOAD 'cassandra://Test/test' USING CassandraStorage() AS = (rowkey:chararray, columns: bag {T: (name:long, value:int)}); > grunt> value_test =3D foreach test generate rowkey, columns.value; > grunt> dump value_test; > {code} > This time, without the column name, it's work (but the value are displaye= d as char instead of integer). Result: > {code} > (row1,{(#),($),(&)}) > (row2,{(-),(*),(!)}) > {code} > Now we do the same test but we set a comparator to the CF. > {code} > [default@Test] create column family test with comparator =3D 'LongType'; > [default@Test] set test[ascii('row1')][long(1)]=3Dinteger(35); > set test[ascii('row1')][long(2)]=3Dinteger(36); > set test[ascii('row1')][long(3)]=3Dinteger(38); > set test[ascii('row2')][long(1)]=3Dinteger(45); > set test[ascii('row2')][long(2)]=3Dinteger(42); > set test[ascii('row2')][long(3)]=3Dinteger(33); > [default@Test] list test; > Using default limit of 100 > ------------------- > RowKey: 726f7731 > =3D> (column=3D1, value=3D35, timestamp=3D1308748643506000) > =3D> (column=3D2, value=3D36, timestamp=3D1308748643508000) > =3D> (column=3D3, value=3D38, timestamp=3D1308748643509000) > ------------------- > RowKey: 726f7732 > =3D> (column=3D1, value=3D45, timestamp=3D1308748643510000) > =3D> (column=3D2, value=3D42, timestamp=3D1308748643512000) > =3D> (column=3D3, value=3D33, timestamp=3D1308748645138000) > 2 Rows Returned. > [default@Test] describe keyspace; > Keyspace: Test: > Replication Strategy: org.apache.cassandra.locator.SimpleStrategy > Durable Writes: true > Options: [replication_factor:1] > Column Families: > ColumnFamily: test > Key Validation Class: org.apache.cassandra.db.marshal.BytesType > Default column value validator: org.apache.cassandra.db.marshal.Byt= esType > Columns sorted by: org.apache.cassandra.db.marshal.LongType > Row cache size / save period in seconds: 0.0/0 > Key cache size / save period in seconds: 200000.0/14400 > Memtable thresholds: 0.571875/122/1440 (millions of ops/MB/minutes) > GC grace seconds: 864000 > Compaction min/max thresholds: 4/32 > Read repair chance: 1.0 > Replicate on write: false > Built indexes: [] > {code} > {code} > grunt> test =3D LOAD 'cassandra://Test/test' USING CassandraStorage() AS = (rowkey:chararray, columns: bag {T: (name:long, value:int)}); > grunt> value_test =3D foreach test generate rowkey, columns.name, columns= .value; > grunt> dump value_test; > {code} > This time it's work as expected (appart from the value displayed as char)= . Result: > {code} > (row1,{(1),(2),(3)},{(#),($),(&)}) > (row2,{(1),(2),(3)},{(-),(*),(!)}) > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira