Re: How to delete regions from a table

2015-05-11 Thread rahul malviya
The steps in this email thread might be useful too. This does not require
disabling table.

http://mail-archives.apache.org/mod_mbox/hbase-user/201501.mbox/%3cca+vo6iukca-es0-auy+jfi4nhgmvkxb1t_ogg8kdpwnxxov...@mail.gmail.com%3E

Thanks,
Rahul

On Mon, May 11, 2015 at 2:06 AM, Gaurav Agarwal  wrote:

> Thanks! Will try these steps and update how it went..
>
>
>
> --
> View this message in context:
> http://apache-hbase.679495.n3.nabble.com/How-to-delete-regions-from-a-table-tp4071226p4071239.html
> Sent from the HBase User mailing list archive at Nabble.com.
>


Re: How to delete regions from a table

2015-05-11 Thread Gaurav Agarwal
Thanks! Will try these steps and update how it went..



--
View this message in context: 
http://apache-hbase.679495.n3.nabble.com/How-to-delete-regions-from-a-table-tp4071226p4071239.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: How to delete regions from a table

2015-05-11 Thread Talat Uyarer
Hi Gaurav,

When you disable your table, it does not accept any connection.
1. Disable table
2. delete your meta row
3. move/delete the data folders at hdfs://.../user/hbase//
4. run hbck
5. enable your table.

- If you follow this instruction, hbck fix your holes.

HTH
Talat

2015-05-11 8:43 GMT+03:00 Gaurav Agarwal :
> Hi Talat,
>
> Thanks for the reply! Few specific followup questions:
>
> 1. Do I need to disable and enable table for these operations? what would be
> exact sequence?
> 2. I guess somewhere in between these steps, I need to manually delete the
> real data files corresponding to these regions, from hdfs?
> 3. What would hbck -repair do in this case? Would it recreate the deleted
> regions in meta or would the rowkey space of existing regions be expanded to
> fill the holes?
>
> --cheers, gaurav
>
>
>
> --
> View this message in context: 
> http://apache-hbase.679495.n3.nabble.com/How-to-delete-regions-from-a-table-tp4071226p4071237.html
> Sent from the HBase User mailing list archive at Nabble.com.



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


Re: How to delete regions from a table

2015-05-10 Thread Gaurav Agarwal
Hi Talat,

Thanks for the reply! Few specific followup questions:

1. Do I need to disable and enable table for these operations? what would be
exact sequence?
2. I guess somewhere in between these steps, I need to manually delete the
real data files corresponding to these regions, from hdfs?
3. What would hbck -repair do in this case? Would it recreate the deleted
regions in meta or would the rowkey space of existing regions be expanded to
fill the holes?

--cheers, gaurav



--
View this message in context: 
http://apache-hbase.679495.n3.nabble.com/How-to-delete-regions-from-a-table-tp4071226p4071237.html
Sent from the HBase User mailing list archive at Nabble.com.


Re: How to delete regions from a table

2015-05-10 Thread Talat Uyarer
Hi Gaurav,

Region information of Table is stored in meta table. If you want to delete
a region, actually you should delete a row in meta table. In HBase shell:

deleteall 'hbase:meta', 'ROW_FROM_META_WITH_YOUR_TABLE'

If you are not sure what the row you want to delete run a scan on the META
or dump its value into a file:

echo "scan 'hbase:meta' "| hbase shell &> dump.txt

then find your row and delete it. As you asked after region delete
operation table has some holes. make sure you run hbase hbck -repair to fix
those.

Hth
On May 10, 2015 10:11 PM, "Gaurav Agarwal"  wrote:

> Hi All,
>
> We are using hbase version 0.96.1.1-cdh5.0.0 and need to selectively delete
> some regions from a table.
> I can afford to disable the table for sometime in order to perform this
> activity but absolutely cannot risk loosing the data stored in active
> regions (other than ones that need to be delete) on this table.
>
> How can this be done? I did not find any direct command from hbase shell to
> delete a region. Also, after deletes of the regions is there any other
> fsck/repair like activity that needs to be done in order to update the
> updated region server meta info with the master?
>
>
> --cheers, gaurav
>