ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From voze...@apache.org
Subject [11/11] ignite git commit: IGNITE-3202: Minors.
Date Mon, 30 May 2016 16:05:21 GMT
IGNITE-3202: Minors.


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

Branch: refs/heads/ignite-3202
Commit: 30f129e9e6b6a81b8bea0b350d8b7fc3316af21b
Parents: 7ca483c
Author: vozerov-gridgain <vozerov@gridgain.com>
Authored: Mon May 30 17:09:22 2016 +0300
Committer: vozerov-gridgain <vozerov@gridgain.com>
Committed: Mon May 30 17:09:22 2016 +0300

----------------------------------------------------------------------
 .../hadoop/fs/BasicHadoopFileSystemFactory.java | 32 +++++++-------------
 .../fs/CachingHadoopFileSystemFactory.java      |  3 +-
 2 files changed, 12 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/30f129e9/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 1eae7dd..a17e4a1 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
@@ -73,24 +73,14 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
     @Override public final FileSystem get(String name) throws IOException {
         String name0 = IgfsUtils.fixUserName(name);
 
-        if (usrNameMapper != null)
+        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 getWithConvertedName0(name0);
-    }
+            // If mapper returned null, we will use current user, so we "fix" user name again.
+            name0 = IgfsUtils.fixUserName(name0);
+        }
 
-    /**
-     * Get file system.
-     *
-     * @param usrName Converted user name.
-     * @return File system.
-     * @throws IOException If failed.
-     */
-    protected FileSystem getWithMappedName(String usrName) throws IOException {
-        return getWithConvertedName0(usrName);
+        return getWithMappedName(name0);
     }
 
     /**
@@ -100,7 +90,7 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
      * @return File system.
      * @throws IOException If failed.
      */
-    protected FileSystem getWithConvertedName0(String usrName) throws IOException {
+    protected FileSystem getWithMappedName(String usrName) throws IOException {
         assert cfg != null;
 
         try {
@@ -205,17 +195,17 @@ public class BasicHadoopFileSystemFactory implements HadoopFileSystemFactory,
Ex
      *
      * @return User name mapper.
      */
-    @Nullable public UserNameMapper getUserNameConverter() {
+    @Nullable public UserNameMapper getUserNameMapper() {
         return usrNameMapper;
     }
 
     /**
-     * Set optional user name mapper. See {@link #getUserNameConverter()} for more information.
+     * Set optional user name mapper. See {@link #getUserNameMapper()} for more information.
      *
-     * @param usrNameConverter User name mapper.
+     * @param usrNameMapper User name mapper.
      */
-    public void setUserNameConverter(@Nullable UserNameMapper usrNameConverter) {
-        this.usrNameMapper = usrNameConverter;
+    public void setUserNameMapper(@Nullable UserNameMapper usrNameMapper) {
+        this.usrNameMapper = usrNameMapper;
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/30f129e9/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 8995feb..727681d 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,7 +23,6 @@ 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;
@@ -47,7 +46,7 @@ public class CachingHadoopFileSystemFactory extends BasicHadoopFileSystemFactory
     private final transient HadoopLazyConcurrentMap<String, FileSystem> cache = new
HadoopLazyConcurrentMap<>(
         new HadoopLazyConcurrentMap.ValueFactory<String, FileSystem>() {
             @Override public FileSystem createValue(String key) throws IOException {
-                return getWithConvertedName0(key);
+                return getWithMappedName(key);
             }
         }
     );


Mime
View raw message