You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Ted Yu <yu...@gmail.com> on 2011/07/23 06:24:40 UTC

Re: [jira] [Commented] (HBASE-4127) HBaseAdmin : Don't modify table's name away

My proposal below would make default HTableDescriptor ctor package private.

If there is no object, I will log a new JIRA.

On Fri, Jul 22, 2011 at 4:27 PM, Ted Yu (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/HBASE-4127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069840#comment-13069840]
>
> Ted Yu commented on HBASE-4127:
> -------------------------------
>
> +1 on the patch.
>
> Long term, we should hide this ctor, HTableDescriptor().
> Its existence is to support the following pattern:
> {code}
>      hTableDescriptor = new HTableDescriptor();
>      hTableDescriptor.readFields(fsDataInputStream);
> {code}
> I think we should replace this ctor with the following:
> {code}
> public HTableDescriptor getTableDescriptor(DataInputStream dataInputStream)
> {code}
>
> > HBaseAdmin : Don't modify table's name away
> > -------------------------------------------
> >
> >                 Key: HBASE-4127
> >                 URL: https://issues.apache.org/jira/browse/HBASE-4127
> >             Project: HBase
> >          Issue Type: Bug
> >          Components: client, master
> >    Affects Versions: 0.92.0
> >            Reporter: Nicolas Spiegelberg
> >            Assignee: Nicolas Spiegelberg
> >            Priority: Blocker
> >         Attachments: HBASE-4127.patch
> >
> >
> > One of the developers was using the default constructor for
> HTableDescriptor, which is sadly a bad constructor that should never be
> used. It made the tablename empty in META & caused an ERROR cycle as region
> onlining kept failing. We should have never let this happen. Don't do table
> modifications if the HTableDescriptor name doesn't match the table name
> passed in.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

Re: [jira] [Commented] (HBASE-4127) HBaseAdmin : Don't modify table's name away

Posted by Stack <st...@duboce.net>.
Try your proposal.  I don't think it will work.  It'll fail over in
RPC where expectation is that there is a null/default constructor on
every Writable.
St.Ack

On Fri, Jul 22, 2011 at 9:24 PM, Ted Yu <yu...@gmail.com> wrote:
> My proposal below would make default HTableDescriptor ctor package private.
>
> If there is no object, I will log a new JIRA.
>
> On Fri, Jul 22, 2011 at 4:27 PM, Ted Yu (JIRA) <ji...@apache.org> wrote:
>
>>
>>    [
>> https://issues.apache.org/jira/browse/HBASE-4127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13069840#comment-13069840]
>>
>> Ted Yu commented on HBASE-4127:
>> -------------------------------
>>
>> +1 on the patch.
>>
>> Long term, we should hide this ctor, HTableDescriptor().
>> Its existence is to support the following pattern:
>> {code}
>>      hTableDescriptor = new HTableDescriptor();
>>      hTableDescriptor.readFields(fsDataInputStream);
>> {code}
>> I think we should replace this ctor with the following:
>> {code}
>> public HTableDescriptor getTableDescriptor(DataInputStream dataInputStream)
>> {code}
>>
>> > HBaseAdmin : Don't modify table's name away
>> > -------------------------------------------
>> >
>> >                 Key: HBASE-4127
>> >                 URL: https://issues.apache.org/jira/browse/HBASE-4127
>> >             Project: HBase
>> >          Issue Type: Bug
>> >          Components: client, master
>> >    Affects Versions: 0.92.0
>> >            Reporter: Nicolas Spiegelberg
>> >            Assignee: Nicolas Spiegelberg
>> >            Priority: Blocker
>> >         Attachments: HBASE-4127.patch
>> >
>> >
>> > One of the developers was using the default constructor for
>> HTableDescriptor, which is sadly a bad constructor that should never be
>> used. It made the tablename empty in META & caused an ERROR cycle as region
>> onlining kept failing. We should have never let this happen. Don't do table
>> modifications if the HTableDescriptor name doesn't match the table name
>> passed in.
>>
>> --
>> This message is automatically generated by JIRA.
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>