You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sam William <sa...@stumbleupon.com> on 2015/10/26 21:18:04 UTC

Purging an Hbase table after accidentally deleting the store files

Hi,
 I accidentally deleted  the HDFS location '/hbase/mytable' before I dropped the table from the hbase shell.  This table was a candidate for deleting anyway and I don't care about getting it back. I just want to purge it out of the system completely.   I can't disable or describe the table as the file '.tableinfo' is missing.  I don't think hbck is going to help.  Can I just delete the tables entries from the .META table. Will that solve the issue ? 

Re: Purging an Hbase table after accidentally deleting the store files

Posted by Sam William <sa...@stumbleupon.com>.
Stack,
   The trick worked. I created a table with the same name in a different cluster and just copied the .tableinfo... file . I was able to disable and drop the table from the shell.  Thank you very much.

Sam



> On Oct 27, 2015, at 10:47, Sam William <sa...@stumbleupon.com> wrote:
> 
> 
> 
>> On Oct 26, 2015, at 15:44, Stack <st...@duboce.net> wrote:
>> 
>> On Mon, Oct 26, 2015 at 1:18 PM, Sam William <sa...@stumbleupon.com> wrote:
>> 
>>> Hi,
>>> I accidentally deleted  the HDFS location '/hbase/mytable' before I
>>> dropped the table from the hbase shell.  This table was a candidate for
>>> deleting anyway and I don't care about getting it back. I just want to
>>> purge it out of the system completely.   I can't disable or describe the
>>> table as the file '.tableinfo' is missing.  I don't think hbck is going to
>>> help.  Can I just delete the tables entries from the .META table. Will that
>>> solve the issue ?
>> 
>> 
>> 
>> Hey Sam:
>> 
>> This stuff is pretty dumb. Have you tried adding back a dir named for the
>> table under hdfs and then putting under it an appropriate .tableinfo file
>> (you could make the .tableinfo offline in a little standalone instance by
>> creating the table there and copying its .tableinfo across -- or just copy
>> across the whole created table dir).  That might get you a little further.
>> Be careful! Paste in here your next obstacle....
>> 
>> St.Ack
> 
> I had tried something very close.  I did hbck -fixHdfsHoles this created some dummy region directories, but not the '.tableinfo' file.  So created another table with a very similar name and edited to the file to replace the name (on vim).  However the cluster did not like this (complained of some malformed blah... exception). May be it was I opened it on vim and it might created some formatting changes. 
> 
>  Now, let me try exactly what you said ( same table name on an other cluster  and copy the exact same file over)  and see what happens.
> 
> 
> Sam
> 


Re: Purging an Hbase table after accidentally deleting the store files

Posted by Sam William <sa...@stumbleupon.com>.

> On Oct 26, 2015, at 15:44, Stack <st...@duboce.net> wrote:
> 
> On Mon, Oct 26, 2015 at 1:18 PM, Sam William <sa...@stumbleupon.com> wrote:
> 
>> Hi,
>> I accidentally deleted  the HDFS location '/hbase/mytable' before I
>> dropped the table from the hbase shell.  This table was a candidate for
>> deleting anyway and I don't care about getting it back. I just want to
>> purge it out of the system completely.   I can't disable or describe the
>> table as the file '.tableinfo' is missing.  I don't think hbck is going to
>> help.  Can I just delete the tables entries from the .META table. Will that
>> solve the issue ?
> 
> 
> 
> Hey Sam:
> 
> This stuff is pretty dumb. Have you tried adding back a dir named for the
> table under hdfs and then putting under it an appropriate .tableinfo file
> (you could make the .tableinfo offline in a little standalone instance by
> creating the table there and copying its .tableinfo across -- or just copy
> across the whole created table dir).  That might get you a little further.
> Be careful! Paste in here your next obstacle....
> 
> St.Ack

I had tried something very close.  I did hbck -fixHdfsHoles this created some dummy region directories, but not the '.tableinfo' file.  So created another table with a very similar name and edited to the file to replace the name (on vim).  However the cluster did not like this (complained of some malformed blah... exception). May be it was I opened it on vim and it might created some formatting changes. 

  Now, let me try exactly what you said ( same table name on an other cluster  and copy the exact same file over)  and see what happens.


Sam


Re: Purging an Hbase table after accidentally deleting the store files

Posted by Stack <st...@duboce.net>.
On Mon, Oct 26, 2015 at 1:18 PM, Sam William <sa...@stumbleupon.com> wrote:

> Hi,
>  I accidentally deleted  the HDFS location '/hbase/mytable' before I
> dropped the table from the hbase shell.  This table was a candidate for
> deleting anyway and I don't care about getting it back. I just want to
> purge it out of the system completely.   I can't disable or describe the
> table as the file '.tableinfo' is missing.  I don't think hbck is going to
> help.  Can I just delete the tables entries from the .META table. Will that
> solve the issue ?



Hey Sam:

This stuff is pretty dumb. Have you tried adding back a dir named for the
table under hdfs and then putting under it an appropriate .tableinfo file
(you could make the .tableinfo offline in a little standalone instance by
creating the table there and copying its .tableinfo across -- or just copy
across the whole created table dir).  That might get you a little further.
Be careful! Paste in here your next obstacle....

St.Ack

Re: Purging an Hbase table after accidentally deleting the store files

Posted by Sam William <sa...@stumbleupon.com>.
Nope. Its long gone.
> On Oct 26, 2015, at 13:41, Artem Ervits <ar...@gmail.com> wrote:
> 
> See if its still in hdfs trash
> On Oct 26, 2015 4:18 PM, "Sam William" <sa...@stumbleupon.com> wrote:
> 
>> Hi,
>> I accidentally deleted  the HDFS location '/hbase/mytable' before I
>> dropped the table from the hbase shell.  This table was a candidate for
>> deleting anyway and I don't care about getting it back. I just want to
>> purge it out of the system completely.   I can't disable or describe the
>> table as the file '.tableinfo' is missing.  I don't think hbck is going to
>> help.  Can I just delete the tables entries from the .META table. Will that
>> solve the issue ?


Re: Purging an Hbase table after accidentally deleting the store files

Posted by Artem Ervits <ar...@gmail.com>.
See if its still in hdfs trash
On Oct 26, 2015 4:18 PM, "Sam William" <sa...@stumbleupon.com> wrote:

> Hi,
>  I accidentally deleted  the HDFS location '/hbase/mytable' before I
> dropped the table from the hbase shell.  This table was a candidate for
> deleting anyway and I don't care about getting it back. I just want to
> purge it out of the system completely.   I can't disable or describe the
> table as the file '.tableinfo' is missing.  I don't think hbck is going to
> help.  Can I just delete the tables entries from the .META table. Will that
> solve the issue ?