You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by "S. Zhou" <my...@yahoo.com> on 2013/12/31 02:18:36 UTC
How to delete multiple columns in the same row?
I try to delete multiple columns for the same row in HBase. I checked the API for the "Delete" class, method "deleteColumns", and have some confusion. Basically, I am not sure: if I should call "deleteColumns" on the same "Delete" object multiple times (to delete multiple columns), or create multiple "Delete" objects and each such object is for one column deletion.
Thanks
Senqiang
Re: How to delete multiple columns in the same row?
Posted by "S. Zhou" <my...@yahoo.com>.
Thanks Ted & Lars. For the clarification of Java doc for "Delete", I would say: adding some statement like "call this method once for each column to be deleted"
On Monday, December 30, 2013 5:39 PM, lars hofhansl <la...@apache.org> wrote:
You should call deleteColumns on the same Delete object multiple times.
If you like, could you suggest how we can improve the Javadoc to make it more clear?
-- Lars
________________________________
From: S. Zhou <my...@yahoo.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org>
Sent: Monday, December 30, 2013 5:18 PM
Subject: How to delete multiple columns in the same row?
I try to delete multiple columns for the same row in HBase. I checked the API for the "Delete" class, method "deleteColumns", and have some confusion. Basically, I am not sure: if I should call "deleteColumns" on the same "Delete" object multiple times (to delete multiple columns), or create multiple "Delete" objects and each such object is for one column deletion.
Thanks
Senqiang
Re: How to delete multiple columns in the same row?
Posted by lars hofhansl <la...@apache.org>.
You should call deleteColumns on the same Delete object multiple times.
If you like, could you suggest how we can improve the Javadoc to make it more clear?
-- Lars
________________________________
From: S. Zhou <my...@yahoo.com>
To: "user@hbase.apache.org" <us...@hbase.apache.org>
Sent: Monday, December 30, 2013 5:18 PM
Subject: How to delete multiple columns in the same row?
I try to delete multiple columns for the same row in HBase. I checked the API for the "Delete" class, method "deleteColumns", and have some confusion. Basically, I am not sure: if I should call "deleteColumns" on the same "Delete" object multiple times (to delete multiple columns), or create multiple "Delete" objects and each such object is for one column deletion.
Thanks
Senqiang
Re: How to delete multiple columns in the same row?
Posted by Ted Yu <yu...@gmail.com>.
Option #1 should do - one Delete for each row.
Take a look at:
hbase-server/src/test//java/org/apache/hadoop/hbase/rest/TestScannersWithFilters.java
Cheers
On Mon, Dec 30, 2013 at 5:18 PM, S. Zhou <my...@yahoo.com> wrote:
> I try to delete multiple columns for the same row in HBase. I checked the
> API for the "Delete" class, method "deleteColumns", and have some
> confusion. Basically, I am not sure: if I should call "deleteColumns" on
> the same "Delete" object multiple times (to delete multiple columns), or
> create multiple "Delete" objects and each such object is for one column
> deletion.
>
> Thanks
> Senqiang
>