Return-Path: Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: (qmail 28449 invoked from network); 20 Jan 2011 09:00:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2011 09:00:09 -0000 Received: (qmail 51628 invoked by uid 500); 20 Jan 2011 09:00:09 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 51463 invoked by uid 500); 20 Jan 2011 09:00:06 -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 51455 invoked by uid 99); 20 Jan 2011 09:00:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 09:00:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jan 2011 09:00:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0K8xh1p016555 for ; Thu, 20 Jan 2011 08:59:44 GMT Message-ID: <24787362.77831295513983852.JavaMail.jira@thor> Date: Thu, 20 Jan 2011 03:59:43 -0500 (EST) From: "Patrik Modesto (JIRA)" To: commits@cassandra.apache.org Subject: [jira] Updated: (CASSANDRA-2014) Can't delete whole row from Hadoop MapReduce In-Reply-To: <17908907.77771295513744308.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Patrik Modesto updated CASSANDRA-2014: -------------------------------------- Description: 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 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 > > 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 // 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.