You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2011/02/17 16:09:24 UTC
[jira] Resolved: (CASSANDRA-2014) Can't delete whole row from
Hadoop MapReduce
[ https://issues.apache.org/jira/browse/CASSANDRA-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Ellis resolved CASSANDRA-2014.
---------------------------------------
Resolution: Fixed
Fix Version/s: (was: 0.7.2)
0.7.3
Reviewer: jbellis (was: stuhood)
Assignee: Patrik Modesto
committed, thanks!
> 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
> Assignee: Patrik Modesto
> Fix For: 0.7.3
>
> 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.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira