ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [4/4] ignite git commit: IGNITE-2340: Improved error thrown when PROXY mode exists, but secondary file system is not IgniteHadoopIgfsSecondaryFileSystem.
Date Mon, 18 Jan 2016 08:39:18 GMT
IGNITE-2340: Improved error thrown when PROXY mode exists, but secondary file system is not
IgniteHadoopIgfsSecondaryFileSystem.


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

Branch: refs/heads/master
Commit: b20dc40feba82424934e11afa7d2baded1fb06bb
Parents: 9c9b719
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Fri Jan 8 11:26:03 2016 +0400
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon Jan 18 11:36:17 2016 +0300

----------------------------------------------------------------------
 .../apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java    | 7 ++++++-
 .../apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java    | 7 +++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/b20dc40f/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
index 71f6435..45b968c 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java
@@ -32,7 +32,9 @@ import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.util.Progressable;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.hadoop.fs.HadoopFileSystemFactory;
+import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
 import org.apache.ignite.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsException;
 import org.apache.ignite.igfs.IgfsFile;
@@ -335,7 +337,10 @@ public class IgniteHadoopFileSystem extends FileSystem {
                     throw new IOException("Failed to get secondary file system factory.",
e);
                 }
 
-                assert factory != null;
+                if (factory == null)
+                    throw new IOException("Failed to get secondary file system factory (did
you set " +
+                        IgniteHadoopIgfsSecondaryFileSystem.class.getName() + " as \"secondaryFIleSystem\"
in " +
+                        FileSystemConfiguration.class.getName() + "?)");
 
                 if (factory instanceof LifecycleAware)
                     ((LifecycleAware) factory).start();

http://git-wip-us.apache.org/repos/asf/ignite/blob/b20dc40f/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java
index 0d7de86..ac457a4 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java
@@ -38,7 +38,9 @@ import org.apache.hadoop.util.DataChecksum;
 import org.apache.hadoop.util.Progressable;
 import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
+import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.hadoop.fs.HadoopFileSystemFactory;
+import org.apache.ignite.hadoop.fs.IgniteHadoopIgfsSecondaryFileSystem;
 import org.apache.ignite.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsFile;
 import org.apache.ignite.igfs.IgfsMode;
@@ -344,6 +346,11 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements
Closea
                     throw new IOException("Failed to get secondary file system factory.",
e);
                 }
 
+                if (factory == null)
+                    throw new IOException("Failed to get secondary file system factory (did
you set " +
+                        IgniteHadoopIgfsSecondaryFileSystem.class.getName() + " as \"secondaryFIleSystem\"
in " +
+                        FileSystemConfiguration.class.getName() + "?)");
+
                 assert factory != null;
 
                 if (factory instanceof LifecycleAware)


Mime
View raw message