hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jiajun Chen <cjjvict...@gmail.com>
Subject Re: terrible! I can't drop the table
Date Mon, 07 May 2012 14:57:06 GMT
I deleted all rows of cjjWaitHash in .META. used deleteall in shell ,and
output nothing after echo "scan '.META.'" | hbase shell | grep cjjWaitHash .

but why ?

> count 'cjjWaitHash'
ERROR: Unknown table cjjWaitHash!

> enable 'cjjWaitHash'
ERROR: Table cjjWaitHash does not exist.'

> disable 'cjjWaitHash'
ERROR: Table cjjWaitHash does not exist.'

> create 'cjjWaitHash',{NAME => 'c',COMPRESSION =>'LZO', VERSIONS => '1'}
ERROR: Table already exists: cjjWaitHash!


On 7 May 2012 22:34, Jiajun Chen <cjjvictory@gmail.com> wrote:

> But I can't find the key contains cjjWaitHash use the following code:
>
> public void printMETA() throws IOException
>     {
>         final HTable table = MyHBaseConfiguration.getTable(".META.");
>         final Scan scan = new Scan();
>         final ResultScanner scanner = table.getScanner(scan);
>
>         while (true)
>         {
>             final Result next = scanner.next();
>             if (null == next)
>             {
>
>                  return;
>             }
>             final String row = Bytes.toString(next.getRow());
>             if (row.contains("cjjWaitHash"))
>             {
>                 System.err.println(row);
>             }
>             System.out.println(row);
>
>         }
>     }
>
>  On 7 May 2012 22:30, Doug Meil <doug.meil@explorysmedical.com> wrote:
>
>>
>> This is why Harsh was suggesting that you look at what is in META for that
>> table.  Those records have to get cleaned out of META because HBase thinks
>> that table still exists.
>>
>>
>>
>>
>>
>> On 5/7/12 10:23 AM, "Jiajun Chen" <cjjvictory@gmail.com> wrote:
>>
>> >I can lost the data , how to create the table with no data ?
>> >
>> >On 7 May 2012 22:19, Doug Meil <doug.meil@explorysmedical.com> wrote:
>> >
>> >>
>> >> Because you did this... "hadoop fs -rmr /hbase/cjjWaitHash"
>> >>
>> >> ... your data is gone.
>> >>
>> >> Per...
>> >>
>> >> http://hbase.apache.org/book.html#trouble.namenode
>> >>
>> >>
>> >> ... that's where StoreFiles are kept for that particular table.
>> >>
>> >>
>> >> On 5/7/12 10:05 AM, "Jiajun Chen" <cjjvictory@gmail.com> wrote:
>> >>
>> >> > which temp directory ?
>> >> > lose the data of all tables ?
>> >> >
>> >> >On 7 May 2012 22:01, Tom Brown <tombrown52@gmail.com> wrote:
>> >> >
>> >> >> I made a very similar mistake myself the other day when trying
to
>> >>reset
>> >> >>my
>> >> >> cluster.  What finally solved it was deleting the temp directory
>> used
>> >> >>by my
>> >> >> data nodes (in my case I wanted to loose all my data, so it was
ok
>> to
>> >> >> delete everything... In your case, you may have to figure out how
to
>> >> >>export
>> >> >> some data first, as I don't know exactly what effect deleting that
>> >>temp
>> >> >> directory will have)
>> >> >>
>> >> >> Good luck!
>> >> >>
>> >> >> --Tom
>> >> >>
>> >> >> On Monday, May 7, 2012, Doug Meil wrote:
>> >> >>
>> >> >> >
>> >> >> > Harsh pretty much summed it up already (e.g., "don't do that")
but
>> >> >>below
>> >> >> > is some further reading of what just happened...
>> >> >> >
>> >> >> > http://hbase.apache.org/book.html#arch.catalog
>> >> >> > http://hbase.apache.org/book.html#trouble.namenode
>> >> >> >
>> >> >> > ... META is just an HBase table under the covers. By deleting
the
>> >> >>table
>> >> >> on
>> >> >> > the HDFS filesystem, it did nothing with the table metadata
in
>> >>META.
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > On 5/7/12 9:18 AM, "Harsh J" <harsh@cloudera.com <javascript:;>>
>> >> >>wrote:
>> >> >> >
>> >> >> > >The drop is what you ought to have done first, before
removing
>> >>the FS
>> >> >> > >folder and the meta entries. It does all those actions
for you.
>> >>Why
>> >> >> > >did you do it this way?
>> >> >> > >
>> >> >> > >Do you see the table still appearing in the list outputs?
Can you
>> >> >> > >provide us a paste bin link of:
>> >> >> > >
>> >> >> > >echo "scan '.META.'" | hbase shell | grep cjjWaitHash
>> >> >> > >
>> >> >> > >On Mon, May 7, 2012 at 6:44 PM, Jiajun Chen <
>> cjjvictory@gmail.com
>> >> >> <javascript:;>>
>> >> >> > wrote:
>> >> >> > >> I deleted the folder use bin/hadoop fs -rmr /hbase/cjjWaitHash
>> >>,and
>> >> >> > >>deleted
>> >> >> > >> the row with prefix cjjWaitHash in .META.
>> >> >> > >> Now how can I drop the table cjjWaitHash ?
>> >> >> > >
>> >> >> > >
>> >> >> > >
>> >> >> > >--
>> >> >> > >Harsh J
>> >> >> > >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> >--
>> >> >
>> >>
>> >>
>> >--
>>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message