You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Daniel Gómez Ferro (JIRA)" <ji...@apache.org> on 2012/11/13 10:49:14 UTC

[jira] [Created] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

Daniel Gómez Ferro created HBASE-7155:
-----------------------------------------

             Summary: Excessive usage of InterruptedException where it can't be thrown
                 Key: HBASE-7155
                 URL: https://issues.apache.org/jira/browse/HBASE-7155
             Project: HBase
          Issue Type: Bug
            Reporter: Daniel Gómez Ferro


RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.

If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.

Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

Posted by "Daniel Gómez Ferro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13501807#comment-13501807 ] 

Daniel Gómez Ferro commented on HBASE-7155:
-------------------------------------------

Is there interest on changing this? If RootRegionTracker.getRootRegionLocation() can block, we should at least fix the documentation.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

stack commented on HBASE-7155:
------------------------------

bq. The problem is that the IE is being suppressed in ZKUtil, which swallows the IEs in all its methods.

Which is kinda broke I'd say.

bq. If we were to expose all those IEs the change would be huge.

Yes.  Agree.  An ugly big change for what likes little value.

bq. If you want to go that route I suggest opening a new ticket and closing this one.

What you think we should do D?
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

Hadoop QA commented on HBASE-7155:
----------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12553295/HBASE-7155.patch
  against trunk revision .

    {color:green}+1 @author{color}.  The patch does not contain any @author tags.

    {color:green}+1 tests included{color}.  The patch appears to include 6 new or modified tests.

    {color:green}+1 hadoop2.0{color}.  The patch compiles against the hadoop 2.0 profile.

    {color:red}-1 javadoc{color}.  The javadoc tool appears to have generated 93 warning messages.

    {color:green}+1 javac{color}.  The applied patch does not increase the total number of javac compiler warnings.

    {color:red}-1 findbugs{color}.  The patch appears to introduce 16 new Findbugs (version 1.3.9) warnings.

    {color:green}+1 release audit{color}.  The applied patch does not increase the total number of release audit warnings.

     {color:red}-1 core tests{color}.  The patch failed these unit tests:
                       org.apache.hadoop.hbase.client.TestShell

Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html
Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/3326//console

This message is automatically generated.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

stack updated HBASE-7155:
-------------------------

    Resolution: Won't Fix
        Status: Resolved  (was: Patch Available)

This is a problem but too much ugly work to fix.  Thanks Daniel for bringing it up.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

Daniel Gómez Ferro updated HBASE-7155:
--------------------------------------

        Assignee: Daniel Gómez Ferro
    Release Note: Some HBaseAdmin methods don't throw InterruptedException any longer, this could break existing code that tries to catch it.
          Status: Patch Available  (was: Open)
    
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

Posted by "Daniel Gómez Ferro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503196#comment-13503196 ] 

Daniel Gómez Ferro commented on HBASE-7155:
-------------------------------------------

[~stack] The problem is that the IE is being suppressed in ZKUtil, which swallows the IEs in all its methods. If we were to expose all those IEs the change would be huge. If you want to go that route I suggest opening a new ticket and closing this one.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

Posted by "Daniel Gómez Ferro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13497943#comment-13497943 ] 

Daniel Gómez Ferro commented on HBASE-7155:
-------------------------------------------

Hi Stack,

Since the documentation claimed RootRegionTracker.getRootRegionLocation() would not block, I assumed it made no sense to throw an IE. But it seems the method can block waiting for ZK and an IE can be swallowed in ZKUtil.getDataInternal(). 

I see several options:
# Swallow the IE and apply the proposed changes (removing the IE from the upper layers)
# Expose the IE to RootRegionTracker.getRootRegionLocation() 
# Make RootRegionTracker.getRootRegionLocation() truly non blocking.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

Daniel Gómez Ferro updated HBASE-7155:
--------------------------------------

    Attachment: HBASE-7155.patch

I did a quick cleaning of InterruptedExceptions. If you think this should be merged I'll do an in depth pass to check I didn't miss anything.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

Posted by "Daniel Gómez Ferro (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-7155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13507422#comment-13507422 ] 

Daniel Gómez Ferro commented on HBASE-7155:
-------------------------------------------

[~stack] I guess we can just close this ticket, no? 
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

stack commented on HBASE-7155:
------------------------------

For sure we are not suppresssing the IE at a lower level?

If not, this change would be good for hbase 0.96/trunk.  Thanks Daniel.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-7155) Excessive usage of InterruptedException where it can't be thrown

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

stack commented on HBASE-7155:
------------------------------

[~dferro] How hard to do your option #2 above. Rather than remove all IEs., given the client isa blocking client, ideally it should be interruptible if it is stuck.  That'd mean that IE could come up and out of our APIs?

Agree fix doc. at least.  Thanks for digging in here Daniel.
                
> Excessive usage of InterruptedException where it can't be thrown
> ----------------------------------------------------------------
>
>                 Key: HBASE-7155
>                 URL: https://issues.apache.org/jira/browse/HBASE-7155
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Daniel Gómez Ferro
>            Assignee: Daniel Gómez Ferro
>         Attachments: HBASE-7155.patch
>
>
> RootRegionTracker.getRootRegionLocation() declares that it can throw an InterruptedException, but it can't. This exception is rethrown by many other functions reaching the HBaseAdmin API.
> If we remove the throws statement from the HBaseAdmin API libraries already compiled will work fine, but if the user is trying to catch an InterruptedException around one of those methods the compiler will complain.
> Should we clean this up?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira