You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Andrew Purtell (JIRA)" <ji...@apache.org> on 2011/06/25 03:36:49 UTC

[jira] [Created] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
---------------------------------------------------------------

                 Key: HBASE-4032
                 URL: https://issues.apache.org/jira/browse/HBASE-4032
             Project: HBase
          Issue Type: Bug
            Reporter: Andrew Purtell
            Priority: Blocker
             Fix For: 0.92.0


After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 

One immediate effect is broken unit tests.

That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060059#comment-13060059 ] 

Ted Yu commented on HBASE-4032:
-------------------------------

I am not sure Andrew wanted a 'hack' when he created this JIRA.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4032:
--------------------------

    Attachment:     (was: 4032-v3.txt)

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032-v3.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4032:
--------------------------

    Attachment: 4032-v3.txt

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032-v3.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072490#comment-13072490 ] 

Andrew Purtell commented on HBASE-4032:
---------------------------------------

Not real happy with setTableDesc suddenly throwing UnsupportedOperationException instead of actually changing the HRI.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072172#comment-13072172 ] 

stack commented on HBASE-4032:
------------------------------

Whats the equivalent Ted?

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu updated HBASE-4032:
--------------------------

    Attachment: 4032-v3.txt

Performed minor formatting.
The new test is added to TestHRegionInfo and it passes.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032-v3.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060010#comment-13060010 ] 

Ted Yu commented on HBASE-4032:
-------------------------------

HBASE-451 is an incompatible change.
I wonder why HRegionInfo#getTableDesc should return a meaningful table descriptor after the change where HRegionInfo no longer keeps reference to table descriptor.

Unit test code has been retrofitted to not depend on HRegionInfo#getTableDesc.
I doubt user would write code that explicitly uses HRegionInfo#getTableDesc.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072993#comment-13072993 ] 

stack commented on HBASE-4032:
------------------------------

Need a review please (and someone to commit if +1)

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072179#comment-13072179 ] 

stack commented on HBASE-4032:
------------------------------

I could note that in the deprecated note AND leave this expensive call in place

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072168#comment-13072168 ] 

Ted Yu commented on HBASE-4032:
-------------------------------

The most common usage of HRegionInfo#getTableDesc is hri.getTableDesc().getNameAsString() which has equivalent in TRUNK already.
I think HRegionInfo#getTableDesc returning null is a fail-fast approach so that the caller knows alternative should be sought. This is better than a temporary solution which would cause performance issue.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073011#comment-13073011 ] 

stack commented on HBASE-4032:
------------------------------

Thats my bad.  Copy the method from o.a.h.h.THRI into o.a.h.h.r.THRI?

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072488#comment-13072488 ] 

stack commented on HBASE-4032:
------------------------------

Practise has been to deprecate and remove on next major release.  Lets keep it up.

So sounds like you are +1 on patch Andrew?

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Yu resolved HBASE-4032.
---------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032-v3.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072495#comment-13072495 ] 

stack commented on HBASE-4032:
------------------------------

np. let me fix.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-4032:
-------------------------

    Attachment: 4032-v2.txt

Fix setTableDesc to do as it used to.  Added a unit test to prove that these new methods work as we'd expect.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Subbu M Iyer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060055#comment-13060055 ] 

Subbu M Iyer commented on HBASE-4032:
-------------------------------------

Ted,

Yes. That was the original idea behind the abrupt removal of this API and I totally agree on your interpretation that we might not be able to return the TableDesc from HRI directly with out adding some kludgey band-aid fix.

I can explore a work around temporary hack to support this public API If there is a strong consensus on the need to support this API for one release.

Stack?


> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack updated HBASE-4032:
-------------------------

    Attachment: 4032.txt

This is pretty horrid but might be enough?  What you think Andrew?

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13054802#comment-13054802 ] 

stack commented on HBASE-4032:
------------------------------

Let me fix this.   Thanks for fingering it Andy 

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072487#comment-13072487 ] 

Andrew Purtell commented on HBASE-4032:
---------------------------------------

bq. Substituting something that produces the same result but is more expensive is acceptable.

To be clear I mean the existing API stays in place, the thing you want to deprecate gets decorated with @Deprecated, and the implementation of it can change to do something expensive as necessary to maintain the current contract.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "stack (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

stack reassigned HBASE-4032:
----------------------------

    Assignee: stack

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072174#comment-13072174 ] 

Ted Yu commented on HBASE-4032:
-------------------------------

HRegionInfo#getTableNameAsString() can be used in place of hri.getTableDesc().getNameAsString()


> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Andrew Purtell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072485#comment-13072485 ] 

Andrew Purtell commented on HBASE-4032:
---------------------------------------

It is not "deprecation" to actually break a method until after a release cycle where the API in question is marked as deprecated. So either we agree that public APIs get deprecated, or our users have to assume that anything arbitrarily can break at every release.

Returning null from a method that used to return a valid object is a no no. Substituting something that produces the same result but is more expensive is acceptable.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073280#comment-13073280 ] 

Hudson commented on HBASE-4032:
-------------------------------

Integrated in HBase-TRUNK #2065 (See [https://builds.apache.org/job/HBase-TRUNK/2065/])
    HBASE-4032 HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

tedyu : 
Files : 
* /hbase/trunk/src/main/java/org/apache/hadoop/hbase/HRegionInfo.java
* /hbase/trunk/CHANGES.txt
* /hbase/trunk/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java


> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032-v3.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Ted Yu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073003#comment-13073003 ] 

Ted Yu commented on HBASE-4032:
-------------------------------

There is already hbase/regionserver/TestHRegionInfo.java
Shall we name the test as hbase/regionserver/TestTableDescOfHRegionInfo.java ?

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032-v2.txt, 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HBASE-4032) HBASE-451 improperly breaks public API HRegionInfo#getTableDesc

Posted by "Gary Helmling (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072568#comment-13072568 ] 

Gary Helmling commented on HBASE-4032:
--------------------------------------

{quote}
Returning null from a method that used to return a valid object is a no no. Substituting something that produces the same result but is more expensive is acceptable.
{quote}

I agree.  I would much rather have the deprecated method result in a expensive call which we can provide a javadoc warning for.

Returning null forces any users to deal with a runtime issue with no warning due to the change.  I would rather even see us make a one-time exception to the deprecation rule and remove the the method entirely.  At least then it could be dealt with as a compile time issue.

But would be best if we can keep the functionality in place as deprecated, even if it's a bit ugly and expensive.  Then we can remove on next release.

> HBASE-451 improperly breaks public API HRegionInfo#getTableDesc
> ---------------------------------------------------------------
>
>                 Key: HBASE-4032
>                 URL: https://issues.apache.org/jira/browse/HBASE-4032
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.92.0
>
>         Attachments: 4032.txt
>
>
> After HBASE-451, HRegionInfo#getTableDesc has been modified to always return {{null}}. 
> One immediate effect is broken unit tests.
> That aside, it is not in the spirit of deprecation to actually break the method until after the deprecation cycle, it's a bug.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira