You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "eBugs in Cloud Systems (JIRA)" <ji...@apache.org> on 2019/05/06 12:34:00 UTC

[jira] [Updated] (HBASE-22369) CoprocessorClassLoader.init() throws a RuntimeException when it fails to create a directory

     [ https://issues.apache.org/jira/browse/HBASE-22369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

eBugs in Cloud Systems updated HBASE-22369:
-------------------------------------------
    Summary: CoprocessorClassLoader.init() throws a RuntimeException when it fails to create a directory  (was: CoprocessorClassLoader.init() throws RuntimeException when it fails to create a directory)

> CoprocessorClassLoader.init() throws a RuntimeException when it fails to create a directory
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-22369
>                 URL: https://issues.apache.org/jira/browse/HBASE-22369
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.1.4
>            Reporter: eBugs in Cloud Systems
>            Priority: Minor
>
> Dear HBase developers, we are developing a tool to detect exception-related bugs in Java. Our prototype has spotted the following {{throw}} statement whose exception class and error message seem to indicate different error conditions. Since we are not very familiar with HBase's internal work flow, could you please help us verify if this is a bug, i.e., will the callers have trouble handling the exception, and will the users/admins have trouble diagnosing the failure?
>  
> Version: HBase-2.1.4 
> File: HBASE-ROOT/hbase-common/src/java/org/apache/hbase/utils/obs/CoprocessorClassLoader.java
> Line: 160-161
> {code:java}
> throw new RuntimeException("Failed to create local dir " + parentDirStr
>   + ", CoprocessorClassLoader failed to init");{code}
> Reason: {{RuntimeException}} is usually used to represent errors in the program logic (think of one of its subclasses, {{NullPointerException}}), while the error message indicates that {{init()}} failed to create a directory. Will this mismatch be a problem? For example, will the callers miss the case where {{init()}} fails to create a directory? Or, will the callers try to handle other {{RuntimeException}} accidentally (and incorrectly) handle the directory creation failure?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)