ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [06/17] ignite git commit: IGNITE-4208: Hadoop: Fixed a bug preventing normal secondary file system start. This closes #1228.
Date Fri, 11 Nov 2016 14:18:55 GMT
IGNITE-4208: Hadoop: Fixed a bug preventing normal secondary file system start. This closes
#1228.


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

Branch: refs/heads/ignite-4154-opt2
Commit: ef9d6cf9e334c35b03dfa42e4ce0680c85a693a4
Parents: b749982
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Thu Nov 10 18:47:09 2016 +0300
Committer: devozerov <vozerov@gridgain.com>
Committed: Thu Nov 10 18:48:48 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/hadoop/fs/v1/IgniteHadoopFileSystem.java   | 2 +-
 .../org/apache/ignite/hadoop/fs/v2/IgniteHadoopFileSystem.java   | 2 +-
 .../internal/processors/hadoop/delegate/HadoopDelegateUtils.java | 4 ++--
 .../impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java | 3 +--
 .../hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java  | 3 ++-
 .../hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java        | 2 +-
 .../impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java      | 3 +--
 .../impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java    | 4 ++--
 8 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/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 7133c08..866fc1a 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
@@ -336,7 +336,7 @@ public class IgniteHadoopFileSystem extends FileSystem {
                     HadoopFileSystemFactory factory0 =
                         (HadoopFileSystemFactory)paths.getPayload(getClass().getClassLoader());
 
-                    factory = HadoopDelegateUtils.fileSystemFactoryDelegate(factory0);
+                    factory = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(),
factory0);
                 }
                 catch (IgniteCheckedException e) {
                     throw new IOException("Failed to get secondary file system factory.",
e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/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 18b8bf9..82ad683 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
@@ -345,7 +345,7 @@ public class IgniteHadoopFileSystem extends AbstractFileSystem implements
Closea
                     HadoopFileSystemFactory factory0 =
                         (HadoopFileSystemFactory) paths.getPayload(getClass().getClassLoader());
 
-                    factory = HadoopDelegateUtils.fileSystemFactoryDelegate(factory0);
+                    factory = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(),
factory0);
                 }
                 catch (IgniteCheckedException e) {
                     throw new IOException("Failed to get secondary file system factory.",
e);

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/delegate/HadoopDelegateUtils.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/delegate/HadoopDelegateUtils.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/delegate/HadoopDelegateUtils.java
index 76d9bff..2059c8d 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/delegate/HadoopDelegateUtils.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/delegate/HadoopDelegateUtils.java
@@ -81,13 +81,13 @@ public class HadoopDelegateUtils {
      * @return Delegate.
      */
     @SuppressWarnings("unchecked")
-    public static HadoopFileSystemFactoryDelegate fileSystemFactoryDelegate(Object proxy)
{
+    public static HadoopFileSystemFactoryDelegate fileSystemFactoryDelegate(ClassLoader ldr,
Object proxy) {
         String clsName = FACTORY_CLS_MAP.get(proxy.getClass().getName());
 
         if (clsName == null)
             clsName = DFLT_FACTORY_CLS;
 
-        return newInstance(clsName, null, proxy);
+        return newInstance(clsName, ldr, proxy);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java
index 203965c..e336fad 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/impl/delegate/HadoopIgfsSecondaryFileSystemDelegateImpl.java
@@ -56,7 +56,6 @@ import java.io.OutputStream;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -86,7 +85,7 @@ public class HadoopIgfsSecondaryFileSystemDelegateImpl implements HadoopIgfsSeco
         if (factory0 == null)
             factory0 = new CachingHadoopFileSystemFactory();
 
-        factory = HadoopDelegateUtils.fileSystemFactoryDelegate(factory0);
+        factory = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(),
factory0);
     }
 
     /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java
index 8c95a0e..f35d644 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/fs/KerberosHadoopFileSystemFactorySelfTest.java
@@ -70,7 +70,8 @@ public class KerberosHadoopFileSystemFactorySelfTest extends GridCommonAbstractT
 
         GridTestUtils.assertThrows(null, new Callable<Object>() {
             @Override public Object call() throws Exception {
-                HadoopFileSystemFactoryDelegate delegate = HadoopDelegateUtils.fileSystemFactoryDelegate(fac);
+                HadoopFileSystemFactoryDelegate delegate = HadoopDelegateUtils.fileSystemFactoryDelegate(
+                    getClass().getClassLoader(), fac);
 
                 delegate.start();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
index 7cf7f2d..5d955d4 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopFIleSystemFactorySelfTest.java
@@ -330,7 +330,7 @@ public class HadoopFIleSystemFactorySelfTest extends IgfsCommonAbstractTest
{
 
         /** {@inheritDoc} */
         @Override public void start() throws IgniteException {
-            delegate = HadoopDelegateUtils.fileSystemFactoryDelegate(factory);
+            delegate = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(),
factory);
 
             delegate.start();
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java
index adb1330..453d0c7 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopIgfsSecondaryFileSystemTestAdapter.java
@@ -30,7 +30,6 @@ import org.apache.ignite.configuration.FileSystemConfiguration;
 import org.apache.ignite.hadoop.fs.HadoopFileSystemFactory;
 import org.apache.ignite.internal.processors.hadoop.delegate.HadoopDelegateUtils;
 import org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsUtils;
 import org.apache.ignite.internal.processors.igfs.IgfsEx;
 import org.apache.ignite.internal.processors.igfs.IgfsUtils;
 import org.apache.ignite.internal.processors.igfs.IgfsSecondaryFileSystemTestAdapter;
@@ -50,7 +49,7 @@ public class HadoopIgfsSecondaryFileSystemTestAdapter implements IgfsSecondaryFi
     public HadoopIgfsSecondaryFileSystemTestAdapter(HadoopFileSystemFactory factory) {
         assert factory != null;
 
-        this.factory = HadoopDelegateUtils.fileSystemFactoryDelegate(factory);
+        this.factory = HadoopDelegateUtils.fileSystemFactoryDelegate(getClass().getClassLoader(),
factory);
 
         this.factory.start();
     }

http://git-wip-us.apache.org/repos/asf/ignite/blob/ef9d6cf9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java
index ae03f14..78f457b 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/impl/igfs/HadoopSecondaryFileSystemConfigurationTest.java
@@ -37,7 +37,6 @@ import org.apache.ignite.igfs.IgfsIpcEndpointType;
 import org.apache.ignite.igfs.IgfsMode;
 import org.apache.ignite.internal.processors.hadoop.delegate.HadoopDelegateUtils;
 import org.apache.ignite.internal.processors.hadoop.delegate.HadoopFileSystemFactoryDelegate;
-import org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsUtils;
 import org.apache.ignite.internal.processors.igfs.IgfsCommonAbstractTest;
 import org.apache.ignite.internal.util.typedef.G;
 import org.apache.ignite.internal.util.typedef.internal.U;
@@ -185,7 +184,8 @@ public class HadoopSecondaryFileSystemConfigurationTest extends IgfsCommonAbstra
         fac.setConfigPaths(primaryConfFullPath);
         fac.setUri(primaryFsUriStr);
 
-        HadoopFileSystemFactoryDelegate facDelegate = HadoopDelegateUtils.fileSystemFactoryDelegate(fac);
+        HadoopFileSystemFactoryDelegate facDelegate = HadoopDelegateUtils.fileSystemFactoryDelegate(
+            getClass().getClassLoader(), fac);
 
         facDelegate.start();
 


Mime
View raw message