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-2206: Finalization for V2.
Date Wed, 23 Dec 2015 15:25:39 GMT
IGNITE-2206: Finalization for V2.


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

Branch: refs/heads/ignite-2206
Commit: c8755e8747fe076373401e60cc89d3439e89ce41
Parents: 7915c12
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Wed Dec 23 18:26:31 2015 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Wed Dec 23 18:26:31 2015 +0300

----------------------------------------------------------------------
 .../fs/v2/HadoopAbstractFileSystemFactory.java  | 21 ---------
 .../hadoop/fs/v2/IgniteHadoopFileSystem.java    | 47 ++++++++++----------
 2 files changed, 23 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/c8755e87/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/HadoopAbstractFileSystemFactory.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/HadoopAbstractFileSystemFactory.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/HadoopAbstractFileSystemFactory.java
deleted file mode 100644
index cf81e57..0000000
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/v2/HadoopAbstractFileSystemFactory.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.apache.ignite.hadoop.fs.v2;
-
-import java.io.IOException;
-import java.io.Serializable;
-import org.apache.hadoop.fs.AbstractFileSystem;
-
-/**
- * This factory is {@link Serializable} because it should be transferable over the network.
- */
-interface HadoopAbstractFileSystemFactory extends Serializable {
-    /**
-     * Gets the file system, possibly creating it or taking a cached instance.
-     * All the other data needed for the file system creation are expected to be contained
-     * in this object instance.
-     *
-     * @param userName The user name
-     * @return The file system.
-     * @throws IOException On error.
-     */
-    public AbstractFileSystem get(String userName) throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/c8755e87/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 59d870c..347f2ae 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
@@ -35,7 +35,6 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
 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.igfs.IgfsBlockLocation;
 import org.apache.ignite.igfs.IgfsFile;
@@ -58,7 +57,6 @@ import org.apache.ignite.internal.util.typedef.T2;
 import org.apache.ignite.internal.util.typedef.internal.A;
 import org.apache.ignite.internal.util.typedef.internal.S;
 import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.lifecycle.LifecycleAware;
 import org.jetbrains.annotations.Nullable;
 
 import java.io.BufferedOutputStream;
@@ -171,9 +169,6 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements
Closea
     /** Secondary file system instance. */
     private AbstractFileSystem secondaryFs;
 
-    /** Secondary file system factory. */
-    private HadoopAbstractFileSystemFactory factory;
-
     /** Whether custom sequential reads before prefetch value is provided. */
     private boolean seqReadsBeforePrefetchOverride;
 
@@ -338,23 +333,26 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements
Closea
             }
 
             if (initSecondary) {
-                try {
-                    factory = (HadoopAbstractFileSystemFactory) paths.getPayload();
-                }
-                catch (IgniteCheckedException e) {
-                    throw new IOException("Failed to get secondary file system factory.",
e);
-                }
-
-                A.ensure(secondaryUri != null, "File system factory uri should not be null.");
-
-                try {
-                    secondaryFs = factory.get(user);
-
-                    secondaryUri = secondaryFs.getUri();
-                }
-                catch (IOException e) {
-                    throw new IOException("Failed to connect to the secondary file system:
" + secondaryUri, e);
-                }
+                throw new IOException("Proxy mode is not supported for the V2 file system.");
+
+                // TODO: Enable.
+//                try {
+//                    factory = (HadoopAbstractFileSystemFactory) paths.getPayload();
+//                }
+//                catch (IgniteCheckedException e) {
+//                    throw new IOException("Failed to get secondary file system factory.",
e);
+//                }
+//
+//                A.ensure(secondaryUri != null, "File system factory uri should not be null.");
+//
+//                try {
+//                    secondaryFs = factory.get(user);
+//
+//                    secondaryUri = secondaryFs.getUri();
+//                }
+//                catch (IOException e) {
+//                    throw new IOException("Failed to connect to the secondary file system:
" + secondaryUri, e);
+//                }
             }
         }
         finally {
@@ -373,8 +371,9 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements
Closea
             if (clientLog.isLogEnabled())
                 clientLog.close();
 
-            if (factory instanceof LifecycleAware)
-                ((LifecycleAware) factory).stop();
+            // TODO: Enable.
+//            if (factory instanceof LifecycleAware)
+//                ((LifecycleAware) factory).stop();
 
             // Reset initialized resources.
             rmtClient = null;


Mime
View raw message