accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tristen Georgiou (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ACCUMULO-3041) Unhandled null pointer exception in BulkImport.createNewBulkDir()
Date Fri, 01 Aug 2014 23:11:38 GMT
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)

Mime
View raw message