You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Mohit Anchlia <mo...@gmail.com> on 2012/07/23 22:08:29 UTC

drop table

I am trying to drop one of the tables but on the shell I get run
major_compact. I have couple of questions:

1. How to see if this table has more than one region?
2. And why do I need to run major compact


hbase(main):010:0* drop 'SESSION_TIMELINE'

ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'

Here is some help for this command:

Drop the named table. Table must first be disabled. If table has

more than one region, run a major compaction on .META.:

hbase> major_compact ".META."

Re: drop table

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
1) http://URL_OF_YOUR_MASTER:60010/table.jsp?name=NAME_OF_YOUR_TABLE
will should you all the regions of your table.
2) I have no clue ;)

2012/7/23, Mohit Anchlia <mo...@gmail.com>:
> Thanks! but I am still trying to understand these 2 questions:
>
> 1. How to see if this table has more than one region?
> 2. And why do I need to run major compact if I have more than one region?
>
> On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com> wrote:
>
>> Hi Mohit,
>>
>>       A table must be disabled first in order to get deleted.
>> Regards,
>>     Mohammad Tariq
>>
>>
>> On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com>
>> wrote:
>> > I am trying to drop one of the tables but on the shell I get run
>> > major_compact. I have couple of questions:
>> >
>> > 1. How to see if this table has more than one region?
>> > 2. And why do I need to run major compact
>> >
>> >
>> > hbase(main):010:0* drop 'SESSION_TIMELINE'
>> >
>> > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
>> >
>> > Here is some help for this command:
>> >
>> > Drop the named table. Table must first be disabled. If table has
>> >
>> > more than one region, run a major compaction on .META.:
>> >
>> > hbase> major_compact ".META."
>>
>

Re: drop table

Posted by Mohit Anchlia <mo...@gmail.com>.
Thanks everyone for your help

On Mon, Jul 23, 2012 at 1:40 PM, Mohammad Tariq <do...@gmail.com> wrote:

> Also, we don't have to worry about compaction under normal conditions.
> When something is written to HBase, it is first written to an
> in-memory store (memstore), once this memstore reaches a certain size,
> it is flushed to disk into a store file (everything is also written
> immediately to a log file for durability). The store files created on
> disk are immutable. Sometimes the store files are merged together,
> this is done by a process called compaction.
>
> Regards,
>     Mohammad Tariq
>
>
> On Tue, Jul 24, 2012 at 2:00 AM, Mohammad Tariq <do...@gmail.com>
> wrote:
> > The HBase processes exposes a web-based user interface (in short UI),
> > which you can use to gain insight into the cluster's state, as well as
> > the tables it hosts. Just point your web browser to
> > "http://hmaster:60010". Although majority of the functionality is
> > read-only, but there are a few selected operation you can trigger
> > through the UI(like splitting and compaction).
> >
> > Regards,
> >     Mohammad Tariq
> >
> >
> > On Tue, Jul 24, 2012 at 1:56 AM, Rob Roland <ro...@simplymeasured.com>
> wrote:
> >> You don't have to run the major compaction - the shell is doing that for
> >> you.  You must disable the table first, like:
> >>
> >> disable 'session_timeline'
> >> drop 'session_timeline'
> >>
> >> See the admin.rb file:
> >>
> >>     def drop(table_name)
> >>       tableExists(table_name)
> >>       raise ArgumentError, "Table #{table_name} is enabled. Disable it
> >> first.'" if enabled?(table_name)
> >>
> >>       @admin.deleteTable(table_name)
> >>       flush(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
> >>       major_compact(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
> >>     end
> >>
> >> On Mon, Jul 23, 2012 at 1:22 PM, Mohit Anchlia <mohitanchlia@gmail.com
> >wrote:
> >>
> >>> Thanks! but I am still trying to understand these 2 questions:
> >>>
> >>> 1. How to see if this table has more than one region?
> >>> 2. And why do I need to run major compact if I have more than one
> region?
> >>>
> >>> On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com>
> >>> wrote:
> >>>
> >>> > Hi Mohit,
> >>> >
> >>> >       A table must be disabled first in order to get deleted.
> >>> > Regards,
> >>> >     Mohammad Tariq
> >>> >
> >>> >
> >>> > On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <
> mohitanchlia@gmail.com>
> >>> > wrote:
> >>> > > I am trying to drop one of the tables but on the shell I get run
> >>> > > major_compact. I have couple of questions:
> >>> > >
> >>> > > 1. How to see if this table has more than one region?
> >>> > > 2. And why do I need to run major compact
> >>> > >
> >>> > >
> >>> > > hbase(main):010:0* drop 'SESSION_TIMELINE'
> >>> > >
> >>> > > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
> >>> > >
> >>> > > Here is some help for this command:
> >>> > >
> >>> > > Drop the named table. Table must first be disabled. If table has
> >>> > >
> >>> > > more than one region, run a major compaction on .META.:
> >>> > >
> >>> > > hbase> major_compact ".META."
> >>> >
> >>>
>

Re: drop table

Posted by Mohammad Tariq <do...@gmail.com>.
Also, we don't have to worry about compaction under normal conditions.
When something is written to HBase, it is first written to an
in-memory store (memstore), once this memstore reaches a certain size,
it is flushed to disk into a store file (everything is also written
immediately to a log file for durability). The store files created on
disk are immutable. Sometimes the store files are merged together,
this is done by a process called compaction.

Regards,
    Mohammad Tariq


On Tue, Jul 24, 2012 at 2:00 AM, Mohammad Tariq <do...@gmail.com> wrote:
> The HBase processes exposes a web-based user interface (in short UI),
> which you can use to gain insight into the cluster's state, as well as
> the tables it hosts. Just point your web browser to
> "http://hmaster:60010". Although majority of the functionality is
> read-only, but there are a few selected operation you can trigger
> through the UI(like splitting and compaction).
>
> Regards,
>     Mohammad Tariq
>
>
> On Tue, Jul 24, 2012 at 1:56 AM, Rob Roland <ro...@simplymeasured.com> wrote:
>> You don't have to run the major compaction - the shell is doing that for
>> you.  You must disable the table first, like:
>>
>> disable 'session_timeline'
>> drop 'session_timeline'
>>
>> See the admin.rb file:
>>
>>     def drop(table_name)
>>       tableExists(table_name)
>>       raise ArgumentError, "Table #{table_name} is enabled. Disable it
>> first.'" if enabled?(table_name)
>>
>>       @admin.deleteTable(table_name)
>>       flush(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
>>       major_compact(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
>>     end
>>
>> On Mon, Jul 23, 2012 at 1:22 PM, Mohit Anchlia <mo...@gmail.com>wrote:
>>
>>> Thanks! but I am still trying to understand these 2 questions:
>>>
>>> 1. How to see if this table has more than one region?
>>> 2. And why do I need to run major compact if I have more than one region?
>>>
>>> On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com>
>>> wrote:
>>>
>>> > Hi Mohit,
>>> >
>>> >       A table must be disabled first in order to get deleted.
>>> > Regards,
>>> >     Mohammad Tariq
>>> >
>>> >
>>> > On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com>
>>> > wrote:
>>> > > I am trying to drop one of the tables but on the shell I get run
>>> > > major_compact. I have couple of questions:
>>> > >
>>> > > 1. How to see if this table has more than one region?
>>> > > 2. And why do I need to run major compact
>>> > >
>>> > >
>>> > > hbase(main):010:0* drop 'SESSION_TIMELINE'
>>> > >
>>> > > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
>>> > >
>>> > > Here is some help for this command:
>>> > >
>>> > > Drop the named table. Table must first be disabled. If table has
>>> > >
>>> > > more than one region, run a major compaction on .META.:
>>> > >
>>> > > hbase> major_compact ".META."
>>> >
>>>

Re: drop table

Posted by Mohammad Tariq <do...@gmail.com>.
The HBase processes exposes a web-based user interface (in short UI),
which you can use to gain insight into the cluster's state, as well as
the tables it hosts. Just point your web browser to
"http://hmaster:60010". Although majority of the functionality is
read-only, but there are a few selected operation you can trigger
through the UI(like splitting and compaction).

Regards,
    Mohammad Tariq


On Tue, Jul 24, 2012 at 1:56 AM, Rob Roland <ro...@simplymeasured.com> wrote:
> You don't have to run the major compaction - the shell is doing that for
> you.  You must disable the table first, like:
>
> disable 'session_timeline'
> drop 'session_timeline'
>
> See the admin.rb file:
>
>     def drop(table_name)
>       tableExists(table_name)
>       raise ArgumentError, "Table #{table_name} is enabled. Disable it
> first.'" if enabled?(table_name)
>
>       @admin.deleteTable(table_name)
>       flush(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
>       major_compact(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
>     end
>
> On Mon, Jul 23, 2012 at 1:22 PM, Mohit Anchlia <mo...@gmail.com>wrote:
>
>> Thanks! but I am still trying to understand these 2 questions:
>>
>> 1. How to see if this table has more than one region?
>> 2. And why do I need to run major compact if I have more than one region?
>>
>> On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com>
>> wrote:
>>
>> > Hi Mohit,
>> >
>> >       A table must be disabled first in order to get deleted.
>> > Regards,
>> >     Mohammad Tariq
>> >
>> >
>> > On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com>
>> > wrote:
>> > > I am trying to drop one of the tables but on the shell I get run
>> > > major_compact. I have couple of questions:
>> > >
>> > > 1. How to see if this table has more than one region?
>> > > 2. And why do I need to run major compact
>> > >
>> > >
>> > > hbase(main):010:0* drop 'SESSION_TIMELINE'
>> > >
>> > > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
>> > >
>> > > Here is some help for this command:
>> > >
>> > > Drop the named table. Table must first be disabled. If table has
>> > >
>> > > more than one region, run a major compaction on .META.:
>> > >
>> > > hbase> major_compact ".META."
>> >
>>

Re: drop table

Posted by Rob Roland <ro...@simplymeasured.com>.
You don't have to run the major compaction - the shell is doing that for
you.  You must disable the table first, like:

disable 'session_timeline'
drop 'session_timeline'

See the admin.rb file:

    def drop(table_name)
      tableExists(table_name)
      raise ArgumentError, "Table #{table_name} is enabled. Disable it
first.'" if enabled?(table_name)

      @admin.deleteTable(table_name)
      flush(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
      major_compact(org.apache.hadoop.hbase.HConstants::META_TABLE_NAME)
    end

On Mon, Jul 23, 2012 at 1:22 PM, Mohit Anchlia <mo...@gmail.com>wrote:

> Thanks! but I am still trying to understand these 2 questions:
>
> 1. How to see if this table has more than one region?
> 2. And why do I need to run major compact if I have more than one region?
>
> On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com>
> wrote:
>
> > Hi Mohit,
> >
> >       A table must be disabled first in order to get deleted.
> > Regards,
> >     Mohammad Tariq
> >
> >
> > On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com>
> > wrote:
> > > I am trying to drop one of the tables but on the shell I get run
> > > major_compact. I have couple of questions:
> > >
> > > 1. How to see if this table has more than one region?
> > > 2. And why do I need to run major compact
> > >
> > >
> > > hbase(main):010:0* drop 'SESSION_TIMELINE'
> > >
> > > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
> > >
> > > Here is some help for this command:
> > >
> > > Drop the named table. Table must first be disabled. If table has
> > >
> > > more than one region, run a major compaction on .META.:
> > >
> > > hbase> major_compact ".META."
> >
>

Re: drop table

Posted by Mohit Anchlia <mo...@gmail.com>.
Thanks! but I am still trying to understand these 2 questions:

1. How to see if this table has more than one region?
2. And why do I need to run major compact if I have more than one region?

On Mon, Jul 23, 2012 at 1:14 PM, Mohammad Tariq <do...@gmail.com> wrote:

> Hi Mohit,
>
>       A table must be disabled first in order to get deleted.
> Regards,
>     Mohammad Tariq
>
>
> On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com>
> wrote:
> > I am trying to drop one of the tables but on the shell I get run
> > major_compact. I have couple of questions:
> >
> > 1. How to see if this table has more than one region?
> > 2. And why do I need to run major compact
> >
> >
> > hbase(main):010:0* drop 'SESSION_TIMELINE'
> >
> > ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
> >
> > Here is some help for this command:
> >
> > Drop the named table. Table must first be disabled. If table has
> >
> > more than one region, run a major compaction on .META.:
> >
> > hbase> major_compact ".META."
>

Re: drop table

Posted by Mohammad Tariq <do...@gmail.com>.
Hi Mohit,

      A table must be disabled first in order to get deleted.
Regards,
    Mohammad Tariq


On Tue, Jul 24, 2012 at 1:38 AM, Mohit Anchlia <mo...@gmail.com> wrote:
> I am trying to drop one of the tables but on the shell I get run
> major_compact. I have couple of questions:
>
> 1. How to see if this table has more than one region?
> 2. And why do I need to run major compact
>
>
> hbase(main):010:0* drop 'SESSION_TIMELINE'
>
> ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
>
> Here is some help for this command:
>
> Drop the named table. Table must first be disabled. If table has
>
> more than one region, run a major compaction on .META.:
>
> hbase> major_compact ".META."

Re: drop table

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi Mohit,

You have the respons int your question ;)

Simple type:

major_compact ".META."

On the shell.

To drop your table, just do:
disable 'SESSION_TIMELINE'
drop 'SESSION_TIMELINE'


--
JM

2012/7/23, Mohit Anchlia <mo...@gmail.com>:
> I am trying to drop one of the tables but on the shell I get run
> major_compact. I have couple of questions:
>
> 1. How to see if this table has more than one region?
> 2. And why do I need to run major compact
>
>
> hbase(main):010:0* drop 'SESSION_TIMELINE'
>
> ERROR: Table SESSION_TIMELINE is enabled. Disable it first.'
>
> Here is some help for this command:
>
> Drop the named table. Table must first be disabled. If table has
>
> more than one region, run a major compaction on .META.:
>
> hbase> major_compact ".META."
>