accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [08/11] accumulo git commit: ACCUMULO-3869 Explicitly ensure null object was not returned
Date Fri, 29 May 2015 01:28:56 GMT
ACCUMULO-3869 Explicitly ensure null object was not returned


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1ad4bfa0
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1ad4bfa0
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1ad4bfa0

Branch: refs/heads/master
Commit: 1ad4bfa0905b12e7ba2a5d2cc7d47d5130a78e7f
Parents: 7432c5c
Author: Josh Elser <elserj@apache.org>
Authored: Thu May 28 20:15:32 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu May 28 21:14:19 2015 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/master/tableOps/CreateImportDir.java     | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1ad4bfa0/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java
index 69dcc49..cb70c68 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/CreateImportDir.java
@@ -48,6 +48,10 @@ class CreateImportDir extends MasterRepo {
     log.info("Looking for matching filesystem for " + exportDir + " from options " + Arrays.toString(tableDirs));
     Path base = master.getFileSystem().matchingFileSystem(exportDir, tableDirs);
     log.info("Chose base table directory of " + base);
+    // Sanity check that a valid FileSystem was found for the exportDir
+    if (null == base) {
+      throw new RuntimeException("Could not determine matching FileSystem for " + exportDir);
+    }
     Path directory = new Path(base, tableInfo.tableId);
 
     Path newBulkDir = new Path(directory, Constants.BULK_PREFIX + namer.getNextName());


Mime
View raw message