[ https://issues.apache.org/jira/browse/CASSANDRA-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis updated CASSANDRA-2014: -------------------------------------- Reviewer: stuhood Fix Version/s: 0.7.1 > Can't delete whole row from Hadoop MapReduce > -------------------------------------------- > > Key: CASSANDRA-2014 > URL: https://issues.apache.org/jira/browse/CASSANDRA-2014 > Project: Cassandra > Issue Type: Bug > Components: Hadoop > Affects Versions: 0.7.0 > Environment: Debian Linux 2.6.32 amd64 > Reporter: Patrik Modesto > Fix For: 0.7.1 > > Attachments: 2014-mr-delete-whole-row.patch > > > ColumnFamilyRecordWriter.java doesn't support Mutation with Deletion without > slice_predicat and super_column to delete whole row. The other way I tried is > to specify SlicePredicate with empty start and finish and I got: > {code} > java.io.IOException: InvalidRequestException(why:Deletion does not yet > support SliceRange predicates.) > at > org.apache.cassandra.hadoop.ColumnFamilyRecordWriter$RangeClient.run(ColumnFamilyRecordWriter.java:355) > {code} > I tryied to patch the ColumnFamilyRecordWriter.java like this: > {code} > --- a/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java > +++ b/src/java/org/apache/cassandra/hadoop/ColumnFamilyRecordWriter.java > @@ -166,10 +166,17 @@ implements > org.apache.hadoop.mapred.RecordWriter<ByteBuffer,List<org.apache.cass > // deletion > Deletion deletion = new Deletion(amut.deletion.timestamp); > mutation.setDeletion(deletion); > + > org.apache.cassandra.avro.SlicePredicate apred = > amut.deletion.predicate; > - if (amut.deletion.super_column != null) > + if (apred == null && amut.deletion.super_column == null) > + { > + // epmty; delete whole row > + } > + else if (amut.deletion.super_column != null) > + { > // super column > deletion.setSuper_column(copy(amut.deletion.super_column)); > + } > else if (apred.column_names != null) > { > // column names > {code} > but that didn't work as well. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.