You are viewing a plain text version of this content. The canonical link for it is here.
Posted to submarine-dev@hadoop.apache.org by "Szilard Nemeth (JIRA)" <ji...@apache.org> on 2019/05/15 14:52:00 UTC

[jira] [Created] (SUBMARINE-79) Cleanup MockRemoteDirectoryManager

Szilard Nemeth created SUBMARINE-79:
---------------------------------------

             Summary: Cleanup MockRemoteDirectoryManager
                 Key: SUBMARINE-79
                 URL: https://issues.apache.org/jira/browse/SUBMARINE-79
             Project: Hadoop Submarine
          Issue Type: Improvement
            Reporter: Szilard Nemeth
            Assignee: Szilard Nemeth


Many methods in MockRemoteDirectoryManager are declaring unnecessary throws clause for IOException.

Also, there are 2 dangerous NPE candidates: 
1. MockRemoteDirectoryManager#getJobStagingArea: 

{code:java}
this.jobDir = new File(jobsParentDir.getAbsolutePath(), jobName);
{code}
If jobsParentDir is null, we could have an NPE easily.

2. MockRemoteDirectoryManager#getModelDir: 

{code:java}
File modelDir = new File(modelParentDir.getAbsolutePath(), modelName);
{code}
If modelParentDir is null, we could have an NPE easily.




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