You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by Talat Uyarer <ta...@uyarer.com> on 2014/04/03 18:17:08 UTC

Deleting Column Family

Hi All,

I want to delete a column family and its owned all column quilfier and
values.

Is it possible ?

Thanks
Talat

RE: Deleting Column Family

Posted by Talat Uyarer <ta...@uyarer.com>.
Hi Bob,

Sorry give mis information. I use mutuator for connectimg accumulo.

Talat
3 Nis 2014 19:34 tarihinde <Bo...@l-3com.com> yazdı:

>  In the accumulo shell use deletemany -c <colfam>:<colqual>
>
>
>
> *From:* Talat Uyarer [mailto:talat@uyarer.com]
> *Sent:* Thursday, April 03, 2014 11:18 AM
> *To:* user@accumulo.apache.org
> *Subject:* Deleting Column Family
>
>
>
> Hi All,
>
> I want to delete a column family and its owned all column quilfier and
> values.
>
> Is it possible ?
>
> Thanks
> Talat
>

RE: Deleting Column Family

Posted by Bo...@l-3com.com.
In the accumulo shell use deletemany -c <colfam>:<colqual>

From: Talat Uyarer [mailto:talat@uyarer.com]
Sent: Thursday, April 03, 2014 11:18 AM
To: user@accumulo.apache.org
Subject: Deleting Column Family


Hi All,

I want to delete a column family and its owned all column quilfier and values.

Is it possible ?

Thanks
Talat

Re: Deleting Column Family

Posted by Josh Elser <jo...@gmail.com>.
If you really want to re-implement it using Mutations on your own, you 
can, but this is what the BatchDeleter is already doing for you.

You can use a (Batch)Scanner and a BatchWriter to read Key-Values, 
create new Mutations from those Key-Values, and then submit them as 
deletes with the BatchWriter. This is what the BatchDeleter is already 
doing.

The 'new Authorizations("myauths")' was to remind you that, if you have 
non-empty visibilities on the data you are reading, you need to provide 
the correct authorizations to see that data. If you have empty 
visibilities, you can just provide 'new Authorizations()'.

On 4/5/2014 12:54 AM, Talat Uyarer wrote:
> Ok I Will change my code design for using. Thanks for reply. May I
> learn new Authorizations("myauths") ? what does it need for me ? What
> should I write ?
>
> 2014-04-05 7:26 GMT+03:00 Talat Uyarer <ta...@uyarer.com>:
>> Hi,
>>
>> Thanks for reply. This worked. But my design use Mutation. Can I do
>> with Mutation ?
>>
>> Thanks
>>
>> 2014-04-03 19:50 GMT+03:00 Josh Elser <jo...@gmail.com>:
>>> Yes, use the Ranges that you provide to BatchDeleter#setRanges() to control
>>> what data is deleted.
>>>
>>> e.g. if you want to delete "colfam1" from "row5"
>>>
>>> bd.setRanges(Collections.singleton(Range.exact(new Text("row5"))));
>>> bd.fetchColumnFamily(new Text("colfam1"));
>>>
>>>
>>> On 4/3/14, 12:47 PM, Talat Uyarer wrote:
>>>>
>>>> Thanks Josh,
>>>>
>>>> I will try this. Can i delete column family of one row with this ?
>>>>
>>>> 3 Nis 2014 19:37 tarihinde "Josh Elser" <josh.elser@gmail.com
>>>> <ma...@gmail.com>> yazdı:
>>>>
>>>>
>>>>      Wrong list, Ted? Looks like an HBase API.
>>>>
>>>>      I believe the easiest way to accomplish this is to use the
>>>> BatchDeleter.
>>>>
>>>>      BatchDeleter bd = connector.createBatchDeleter("__table", new
>>>>
>>>>      Authorizations("myauths"), 1, new BatchWriterConfig());
>>>>      try {
>>>>         bd.setRanges(Collections.__singleton(new Range()));
>>>>
>>>>         bd.fetchColumnFamily(new Text("colfam"));
>>>>         bd.delete();
>>>>      } finally {
>>>>         bd.close();
>>>>      }
>>>>
>>>>      On 4/3/14, 12:28 PM, Ted Yu wrote:
>>>>
>>>>          Take a look at the following method in Delete:
>>>>
>>>>          public Delete deleteFamily(byte [] family) {
>>>>
>>>>          Cheers
>>>>
>>>>
>>>>
>>>>          On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
>>>>          <ma...@uyarer.com>
>>>>          <mailto:talat@uyarer.com <ma...@uyarer.com>>> wrote:
>>>>
>>>>               Hi All,
>>>>
>>>>               I want to delete a column family and its owned all column
>>>>          quilfier
>>>>               and values.
>>>>
>>>>               Is it possible ?
>>>>
>>>>               Thanks
>>>>               Talat
>>>>
>>>>
>>>
>>
>>
>>
>> --
>> Talat UYARER
>> Websitesi: http://talat.uyarer.com
>> Twitter: http://twitter.com/talatuyarer
>> Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304
>
>
>

Re: Deleting Column Family

Posted by Talat Uyarer <ta...@uyarer.com>.
Ok I Will change my code design for using. Thanks for reply. May I
learn new Authorizations("myauths") ? what does it need for me ? What
should I write ?

2014-04-05 7:26 GMT+03:00 Talat Uyarer <ta...@uyarer.com>:
> Hi,
>
> Thanks for reply. This worked. But my design use Mutation. Can I do
> with Mutation ?
>
> Thanks
>
> 2014-04-03 19:50 GMT+03:00 Josh Elser <jo...@gmail.com>:
>> Yes, use the Ranges that you provide to BatchDeleter#setRanges() to control
>> what data is deleted.
>>
>> e.g. if you want to delete "colfam1" from "row5"
>>
>> bd.setRanges(Collections.singleton(Range.exact(new Text("row5"))));
>> bd.fetchColumnFamily(new Text("colfam1"));
>>
>>
>> On 4/3/14, 12:47 PM, Talat Uyarer wrote:
>>>
>>> Thanks Josh,
>>>
>>> I will try this. Can i delete column family of one row with this ?
>>>
>>> 3 Nis 2014 19:37 tarihinde "Josh Elser" <josh.elser@gmail.com
>>> <ma...@gmail.com>> yazdı:
>>>
>>>
>>>     Wrong list, Ted? Looks like an HBase API.
>>>
>>>     I believe the easiest way to accomplish this is to use the
>>> BatchDeleter.
>>>
>>>     BatchDeleter bd = connector.createBatchDeleter("__table", new
>>>
>>>     Authorizations("myauths"), 1, new BatchWriterConfig());
>>>     try {
>>>        bd.setRanges(Collections.__singleton(new Range()));
>>>
>>>        bd.fetchColumnFamily(new Text("colfam"));
>>>        bd.delete();
>>>     } finally {
>>>        bd.close();
>>>     }
>>>
>>>     On 4/3/14, 12:28 PM, Ted Yu wrote:
>>>
>>>         Take a look at the following method in Delete:
>>>
>>>         public Delete deleteFamily(byte [] family) {
>>>
>>>         Cheers
>>>
>>>
>>>
>>>         On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
>>>         <ma...@uyarer.com>
>>>         <mailto:talat@uyarer.com <ma...@uyarer.com>>> wrote:
>>>
>>>              Hi All,
>>>
>>>              I want to delete a column family and its owned all column
>>>         quilfier
>>>              and values.
>>>
>>>              Is it possible ?
>>>
>>>              Thanks
>>>              Talat
>>>
>>>
>>
>
>
>
> --
> Talat UYARER
> Websitesi: http://talat.uyarer.com
> Twitter: http://twitter.com/talatuyarer
> Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304



-- 
Talat UYARER
Websitesi: http://talat.uyarer.com
Twitter: http://twitter.com/talatuyarer
Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304

Re: Deleting Column Family

Posted by Talat Uyarer <ta...@uyarer.com>.
Hi,

Thanks for reply. This worked. But my design use Mutation. Can I do
with Mutation ?

Thanks

2014-04-03 19:50 GMT+03:00 Josh Elser <jo...@gmail.com>:
> Yes, use the Ranges that you provide to BatchDeleter#setRanges() to control
> what data is deleted.
>
> e.g. if you want to delete "colfam1" from "row5"
>
> bd.setRanges(Collections.singleton(Range.exact(new Text("row5"))));
> bd.fetchColumnFamily(new Text("colfam1"));
>
>
> On 4/3/14, 12:47 PM, Talat Uyarer wrote:
>>
>> Thanks Josh,
>>
>> I will try this. Can i delete column family of one row with this ?
>>
>> 3 Nis 2014 19:37 tarihinde "Josh Elser" <josh.elser@gmail.com
>> <ma...@gmail.com>> yazdı:
>>
>>
>>     Wrong list, Ted? Looks like an HBase API.
>>
>>     I believe the easiest way to accomplish this is to use the
>> BatchDeleter.
>>
>>     BatchDeleter bd = connector.createBatchDeleter("__table", new
>>
>>     Authorizations("myauths"), 1, new BatchWriterConfig());
>>     try {
>>        bd.setRanges(Collections.__singleton(new Range()));
>>
>>        bd.fetchColumnFamily(new Text("colfam"));
>>        bd.delete();
>>     } finally {
>>        bd.close();
>>     }
>>
>>     On 4/3/14, 12:28 PM, Ted Yu wrote:
>>
>>         Take a look at the following method in Delete:
>>
>>         public Delete deleteFamily(byte [] family) {
>>
>>         Cheers
>>
>>
>>
>>         On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
>>         <ma...@uyarer.com>
>>         <mailto:talat@uyarer.com <ma...@uyarer.com>>> wrote:
>>
>>              Hi All,
>>
>>              I want to delete a column family and its owned all column
>>         quilfier
>>              and values.
>>
>>              Is it possible ?
>>
>>              Thanks
>>              Talat
>>
>>
>



-- 
Talat UYARER
Websitesi: http://talat.uyarer.com
Twitter: http://twitter.com/talatuyarer
Linkedin: http://tr.linkedin.com/pub/talat-uyarer/10/142/304

Re: Deleting Column Family

Posted by Josh Elser <jo...@gmail.com>.
Yes, use the Ranges that you provide to BatchDeleter#setRanges() to 
control what data is deleted.

e.g. if you want to delete "colfam1" from "row5"

bd.setRanges(Collections.singleton(Range.exact(new Text("row5"))));
bd.fetchColumnFamily(new Text("colfam1"));

On 4/3/14, 12:47 PM, Talat Uyarer wrote:
> Thanks Josh,
>
> I will try this. Can i delete column family of one row with this ?
>
> 3 Nis 2014 19:37 tarihinde "Josh Elser" <josh.elser@gmail.com
> <ma...@gmail.com>> yazdı:
>
>     Wrong list, Ted? Looks like an HBase API.
>
>     I believe the easiest way to accomplish this is to use the BatchDeleter.
>
>     BatchDeleter bd = connector.createBatchDeleter("__table", new
>     Authorizations("myauths"), 1, new BatchWriterConfig());
>     try {
>        bd.setRanges(Collections.__singleton(new Range()));
>        bd.fetchColumnFamily(new Text("colfam"));
>        bd.delete();
>     } finally {
>        bd.close();
>     }
>
>     On 4/3/14, 12:28 PM, Ted Yu wrote:
>
>         Take a look at the following method in Delete:
>
>         public Delete deleteFamily(byte [] family) {
>
>         Cheers
>
>
>
>         On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
>         <ma...@uyarer.com>
>         <mailto:talat@uyarer.com <ma...@uyarer.com>>> wrote:
>
>              Hi All,
>
>              I want to delete a column family and its owned all column
>         quilfier
>              and values.
>
>              Is it possible ?
>
>              Thanks
>              Talat
>
>

Re: Deleting Column Family

Posted by Talat Uyarer <ta...@uyarer.com>.
Thanks Josh,

I will try this. Can i delete column family of one row with this ?
3 Nis 2014 19:37 tarihinde "Josh Elser" <jo...@gmail.com> yazdı:

> Wrong list, Ted? Looks like an HBase API.
>
> I believe the easiest way to accomplish this is to use the BatchDeleter.
>
> BatchDeleter bd = connector.createBatchDeleter("table", new
> Authorizations("myauths"), 1, new BatchWriterConfig());
> try {
>   bd.setRanges(Collections.singleton(new Range()));
>   bd.fetchColumnFamily(new Text("colfam"));
>   bd.delete();
> } finally {
>   bd.close();
> }
>
> On 4/3/14, 12:28 PM, Ted Yu wrote:
>
>> Take a look at the following method in Delete:
>>
>> public Delete deleteFamily(byte [] family) {
>>
>> Cheers
>>
>>
>>
>> On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
>> <ma...@uyarer.com>> wrote:
>>
>>     Hi All,
>>
>>     I want to delete a column family and its owned all column quilfier
>>     and values.
>>
>>     Is it possible ?
>>
>>     Thanks
>>     Talat
>>
>>
>>

Re: Deleting Column Family

Posted by Josh Elser <jo...@gmail.com>.
Wrong list, Ted? Looks like an HBase API.

I believe the easiest way to accomplish this is to use the BatchDeleter.

BatchDeleter bd = connector.createBatchDeleter("table", new 
Authorizations("myauths"), 1, new BatchWriterConfig());
try {
   bd.setRanges(Collections.singleton(new Range()));
   bd.fetchColumnFamily(new Text("colfam"));
   bd.delete();
} finally {
   bd.close();
}

On 4/3/14, 12:28 PM, Ted Yu wrote:
> Take a look at the following method in Delete:
>
> public Delete deleteFamily(byte [] family) {
>
> Cheers
>
>
>
> On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <talat@uyarer.com
> <ma...@uyarer.com>> wrote:
>
>     Hi All,
>
>     I want to delete a column family and its owned all column quilfier
>     and values.
>
>     Is it possible ?
>
>     Thanks
>     Talat
>
>

Re: Deleting Column Family

Posted by Talat Uyarer <ta...@uyarer.com>.
Hi Ted,

I didnt find this method. Can you share package, javadoc etc ?

Thanks
3 Nis 2014 19:29 tarihinde "Ted Yu" <yu...@gmail.com> yazdı:

> Take a look at the following method in Delete:
>
>   public Delete deleteFamily(byte [] family) {
>
> Cheers
>
>
> On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <ta...@uyarer.com> wrote:
>
>> Hi All,
>>
>> I want to delete a column family and its owned all column quilfier and
>> values.
>>
>> Is it possible ?
>>
>> Thanks
>> Talat
>>
>
>

Re: Deleting Column Family

Posted by Ted Yu <yu...@gmail.com>.
Take a look at the following method in Delete:

  public Delete deleteFamily(byte [] family) {

Cheers


On Thu, Apr 3, 2014 at 9:17 AM, Talat Uyarer <ta...@uyarer.com> wrote:

> Hi All,
>
> I want to delete a column family and its owned all column quilfier and
> values.
>
> Is it possible ?
>
> Thanks
> Talat
>