You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Jeffrey Manno (Jira)" <ji...@apache.org> on 2021/05/28 15:04:00 UTC

[jira] [Resolved] (ACCUMULO-3041) Unhandled null pointer exception in BulkImport.createNewBulkDir()

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

Jeffrey Manno resolved ACCUMULO-3041.
-------------------------------------
    Resolution: Not A Problem

This appears to have been originally fixed back in ACCUMULO-2854.

> Unhandled null pointer exception in BulkImport.createNewBulkDir()
> -----------------------------------------------------------------
>
>                 Key: ACCUMULO-3041
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-3041
>             Project: Accumulo
>          Issue Type: Bug
>          Components: master
>    Affects Versions: 1.6.0
>            Reporter: Tristen Georgiou
>            Priority: Major
>
> File:
> org.apache.accumulo.master.tableOps.BulkImport
> line 188
> {code:title=BulkImport.java|borderStyle=solid}
> String tableDir = fs.matchingFileSystem(new Path(sourceDir), ServerConstants.getTablesDirs()).toString();
> if (tableDir == null)
>       throw new IllegalStateException(sourceDir + " is not in a known namespace");
> Path directory = new Path(tableDir + "/" + tableId);
> {code}
> It is possible that fs.matchingFileSystem() can return null, so calling toString() will cause a NullPointerException. (See org.apache.accumulo.server.fs.VolumeManagerImpl on line 512) 
> The following lines check for a null return, but by this time its too late. 
> I think in my case, I've mis-configured something such that the function is unable to get a matching file system, so I will probably be able to get around this without a code update.
> Perhaps the fix is as simple as this:
> {code:title=BulkImport.java|borderStyle=solid}
> String tableDir = fs.matchingFileSystem(new Path(sourceDir), ServerConstants.getTablesDirs());
> if (tableDir == null)
>       throw new IllegalStateException(sourceDir + " is not in a known namespace");
> Path directory = new Path(tableDir.toString() + "/" + tableId);
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)