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

[jira] [Resolved] (HBASE-22371) DynamicClassLoader.initTempDir() throws a RuntimeException when it fails to create a local directory

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

Sean Busbey resolved HBASE-22371.
---------------------------------
    Resolution: Invalid

Thanks for your interest in Apache HBase. Please raise questions on the mailing list(s).

> DynamicClassLoader.initTempDir() throws a RuntimeException when it fails to create a local directory
> ----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-22371
>                 URL: https://issues.apache.org/jira/browse/HBASE-22371
>             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/DynamicClassLoader.java
> Line: 110-111
> {code:java}
> throw new RuntimeException("Failed to create local dir " + localDir.getPath() + ", DynamicClassLoader 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 {{initTempDir()}} failed to create a directory. Will this mismatch be a problem? For example, will the callers miss the case where {{initTempDir()}} 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)