ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject ignite git commit: WIP 3.
Date Mon, 30 May 2016 19:29:18 GMT
Repository: ignite
Updated Branches:
  refs/heads/ignite-3202 9706668bb -> 6195303b5


WIP 3.


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

Branch: refs/heads/ignite-3202
Commit: 6195303b5b5e62fe512f86b9589e4cb694d3e394
Parents: 9706668
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon May 30 22:29:10 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon May 30 22:29:10 2016 +0300

----------------------------------------------------------------------
 .../hadoop/fs/BasicHadoopFileSystemFactory.java | 38 ++++++++++----------
 .../fs/CachingHadoopFileSystemFactory.java      |  4 ++-
 2 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/6195303b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
index 659cea6..6f30316 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/BasicHadoopFileSystemFactory.java
@@ -71,16 +71,18 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
 
     /** {@inheritDoc} */
     @Override public final FileSystem get(String name) throws IOException {
-        String name0 = IgfsUtils.fixUserName(name);
-
-        if (usrNameMapper != null) {
-            name0 = usrNameMapper.map(name0);
-
-            // If mapper returned null, we will use current user, so we "fix" user name again.
-            name0 = IgfsUtils.fixUserName(name0);
-        }
-
-        return getWithMappedName(name0);
+//        String name0 = IgfsUtils.fixUserName(name);
+//
+//        if (usrNameMapper != null) {
+//            name0 = usrNameMapper.map(name0);
+//
+//            // If mapper returned null, we will use current user, so we "fix" user name
again.
+//            name0 = IgfsUtils.fixUserName(name0);
+//        }
+//
+//        return getWithMappedName(name0);
+
+        return getWithMappedName(IgfsUtils.fixUserName(name));
     }
 
     /**
@@ -242,16 +244,14 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
             }
         }
 
-        // TODO
-//        if (usrNameMapper != null && usrNameMapper instanceof LifecycleAware)
-//            ((LifecycleAware)usrNameMapper).start();
+        if (usrNameMapper != null && usrNameMapper instanceof LifecycleAware)
+            ((LifecycleAware)usrNameMapper).start();
     }
 
     /** {@inheritDoc} */
     @Override public void stop() throws IgniteException {
-        // TODO
-//        if (usrNameMapper != null && usrNameMapper instanceof LifecycleAware)
-//            ((LifecycleAware)usrNameMapper).stop();
+        if (usrNameMapper != null && usrNameMapper instanceof LifecycleAware)
+            ((LifecycleAware)usrNameMapper).stop();
     }
 
     /** {@inheritDoc} */
@@ -267,8 +267,7 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
         else
             out.writeInt(-1);
 
-        // TODO: Return
-        //out.writeObject(usrNameMapper);
+        out.writeObject(usrNameMapper);
     }
 
     /** {@inheritDoc} */
@@ -284,7 +283,6 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
                 cfgPaths[i] = U.readString(in);
         }
 
-        // TODO: Return
-        // usrNameMapper = (UserNameMapper) in.readObject();
+        usrNameMapper = (UserNameMapper) in.readObject();
     }
 }

http://git-wip-us.apache.org/repos/asf/ignite/blob/6195303b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/CachingHadoopFileSystemFactory.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/CachingHadoopFileSystemFactory.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/CachingHadoopFileSystemFactory.java
index 727681d..01c51a2 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/CachingHadoopFileSystemFactory.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/CachingHadoopFileSystemFactory.java
@@ -23,6 +23,7 @@ import org.apache.ignite.IgniteCheckedException;
 import org.apache.ignite.IgniteException;
 import org.apache.ignite.internal.processors.hadoop.fs.HadoopFileSystemsUtils;
 import org.apache.ignite.internal.processors.hadoop.fs.HadoopLazyConcurrentMap;
+import org.apache.ignite.internal.processors.igfs.IgfsUtils;
 
 import java.io.IOException;
 import java.net.URI;
@@ -60,7 +61,8 @@ public class CachingHadoopFileSystemFactory extends BasicHadoopFileSystemFactory
 
     /** {@inheritDoc} */
     @Override public FileSystem getWithMappedName(String name) throws IOException {
-        return cache.getOrCreate(name);
+//        return cache.getOrCreate(name);
+        return cache.getOrCreate(IgfsUtils.fixUserName(name));
     }
 
     /** {@inheritDoc} */


Mime
View raw message