You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Tristen Georgiou (JIRA)" <ji...@apache.org> on 2014/08/02 01:11:38 UTC

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

Tristen Georgiou created ACCUMULO-3041:
------------------------------------------

             Summary: 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


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
(v6.2#6252)