ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject incubator-ignite git commit: # IG-980: diagnostic code cleanup.
Date Fri, 19 Jun 2015 11:49:32 GMT
Repository: incubator-ignite
Updated Branches:
  refs/heads/ignite-980 890742434 -> 122574c96


# IG-980: diagnostic code cleanup.


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

Branch: refs/heads/ignite-980
Commit: 122574c96eb64b0cf3b15ff45f5ffcbed4c807a9
Parents: 8907424
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Fri Jun 19 14:49:21 2015 +0300
Committer: iveselovskiy <iveselovskiy@gridgain.com>
Committed: Fri Jun 19 14:49:21 2015 +0300

----------------------------------------------------------------------
 .../fs/IgniteHadoopFileSystemCounterWriter.java |  3 +-
 .../fs/IgniteHadoopIgfsSecondaryFileSystem.java |  2 +-
 .../internal/processors/hadoop/HadoopUtils.java |  9 +---
 .../hadoop/fs/HadoopLazyConcurrentMap.java      | 41 +---------------
 .../processors/hadoop/v2/HadoopV2Job.java       | 49 ++++----------------
 .../hadoop/v2/HadoopV2JobResourceManager.java   |  1 -
 .../igfs/HadoopIgfsDualAbstractSelfTest.java    |  6 ---
 .../apache/ignite/igfs/IgfsEventsTestSuite.java |  1 -
 .../hadoop/HadoopAbstractSelfTest.java          | 32 -------------
 .../hadoop/HadoopFileSystemsTest.java           | 36 ++++----------
 .../testsuites/IgniteHadoopTestSuite.java       |  3 --
 11 files changed, 22 insertions(+), 161 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopFileSystemCounterWriter.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopFileSystemCounterWriter.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopFileSystemCounterWriter.java
index b8a2cb5..420cece 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopFileSystemCounterWriter.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopFileSystemCounterWriter.java
@@ -72,7 +72,8 @@ public class IgniteHadoopFileSystemCounterWriter implements HadoopCounterWriter
         try {
             hadoopCfg.set(MRJobConfig.USER_NAME, user);
 
-            final FileSystem fs = HadoopUtils.fileSystemForMrUser(jobStatPath.toUri(), hadoopCfg,
jobId.toString(), null);
+            FileSystem fs = HadoopUtils.fileSystemForMrUser(jobStatPath.toUri(), hadoopCfg,
+                jobId.toString(), null);
 
             fs.mkdirs(jobStatPath);
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
index 32f0725..6a630fb 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/hadoop/fs/IgniteHadoopIgfsSecondaryFileSystem.java
@@ -75,7 +75,7 @@ public class IgniteHadoopIgfsSecondaryFileSystem implements IgfsSecondaryFileSys
                 }
             }
         }
-    , getClass().getClassLoader());
+    );
 
     /**
      * Simple constructor that is to be used by default.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopUtils.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopUtils.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopUtils.java
index 9f76f55..fe904e7 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopUtils.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopUtils.java
@@ -67,7 +67,7 @@ public class HadoopUtils {
     private static final HadoopLazyConcurrentMap<FsCacheKey, FileSystem> fileSysLazyMap
         = createHadoopLazyConcurrentMap();
 
-    /** */
+    /** File system cache for jobs. */
     private static final Map<String, T2<HadoopLazyConcurrentMap<FsCacheKey,FileSystem>,
Set<String>>> jobFsMap
         = new HashMap<>(16);
 
@@ -101,7 +101,7 @@ public class HadoopUtils {
                     }
                 }
             }
-        , HadoopUtils.class.getClassLoader());
+        );
     }
 
     /**
@@ -580,9 +580,6 @@ public class HadoopUtils {
 
             // new locId appears in HadoopV2Job#initialize(), no job with the same locId
should be registered:
             assert added;
-
-            if (added)
-                X.println("#### INCREMENTED: usages: " + t2.get2().size() + ", jobId = "
+ jobId + ", locId = " + locId);
         }
 
         return t2.get1();
@@ -603,8 +600,6 @@ public class HadoopUtils {
 
             final int usageCount = locIds.size();
 
-            X.println("### DECREMENT: usage count == " + usageCount + ", jobId = " + jobId
+ ", locId = " + locId);
-
             assert usageCount >= 0 : "negative usage count " + usageCount + ", map: "
+ t2.get1();
 
             if (usageCount == 0) {

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java
index d29a601..c7565d3 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java
@@ -19,14 +19,11 @@ package org.apache.ignite.internal.processors.hadoop.fs;
 
 import org.apache.ignite.*;
 import org.apache.ignite.internal.util.future.*;
-import org.apache.ignite.internal.util.typedef.*;
-import org.apache.ignite.internal.util.typedef.internal.*;
 import org.jsr166.*;
 
 import java.io.*;
 import java.util.*;
 import java.util.concurrent.*;
-import java.util.concurrent.atomic.*;
 import java.util.concurrent.locks.*;
 
 /**
@@ -36,8 +33,6 @@ import java.util.concurrent.locks.*;
  * Despite of the name, does not depend on any Hadoop classes.
  */
 public class HadoopLazyConcurrentMap<K, V extends Closeable> {
-    private static AtomicInteger instances = new AtomicInteger();
-
     /** The map storing the actual values. */
     private final ConcurrentMap<K, ValueWrapper> map = new ConcurrentHashMap8<>();
 
@@ -50,20 +45,12 @@ public class HadoopLazyConcurrentMap<K, V extends Closeable> {
     /** Flag indicating that this map is closed and cleared. */
     private boolean closed;
 
-    final AtomicInteger createdFsCount = new AtomicInteger();
-
-    final ClassLoader callerCL;
-
-    final int instanceNumber;
-
     /**
      * Constructor.
      * @param factory the factory to create new values lazily.
      */
-    public HadoopLazyConcurrentMap(ValueFactory<K, V> factory, ClassLoader cl) {
-        instanceNumber = instances.incrementAndGet();
+    public HadoopLazyConcurrentMap(ValueFactory<K, V> factory) {
         this.factory = factory;
-        callerCL = cl;
 
         assert getClass().getClassLoader() == Ignite.class.getClassLoader();
     }
@@ -142,27 +129,16 @@ public class HadoopLazyConcurrentMap<K, V extends Closeable> {
                 if (v != null) {
                     try {
                         v.close();
-
-                        createdFsCount.decrementAndGet();
                     }
                     catch (Exception err0) {
                         if (err == null)
                             err = err0;
                     }
-
-                    X.println("### closed Fs: key=[" + key + "], fs cnt = " + createdFsCount.get()
+  ", value=[" + v.getClass() + "], dump:");
-                    //new Throwable().printStackTrace(System.out);
                 }
             }
 
-            if (map.size() > 0)
-                X.println("###### " + map.size() + " file systems closed.");
-
             map.clear();
 
-            int i = instances.decrementAndGet();
-            X.println("### --- HLCM closed: " + this);
-
             if (err != null)
                 throw new IgniteCheckedException(err);
         }
@@ -198,8 +174,6 @@ public class HadoopLazyConcurrentMap<K, V extends Closeable> {
                 if (v0 == null)
                     throw new IgniteException("Failed to create non-null value. [key=" +
key + ']');
 
-                int created = createdFsCount.incrementAndGet();
-                X.println("+ Created Fs: " + created + ", fs = " + v0);
                 fut.onDone(v0);
             }
             catch (Throwable e) {
@@ -232,17 +206,4 @@ public class HadoopLazyConcurrentMap<K, V extends Closeable> {
          */
         public V createValue(K key);
     }
-
-    @Override public String toString() {
-        return  S.toString((Class)getClass(), this)
-            + "\n, FsCount = " + createdFsCount.get()
-            + "\n, i = " + instanceNumber
-            + "\n, instances = " + instances.get()
-            + "\n, caller classloader = " + callerCL
-            + "\n, this cl = " + getClass().getClassLoader();
-    }
-
-    public static int getNumberOfInstances() {
-        return instances.get();
-    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Job.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Job.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Job.java
index 287bedb..e08a623 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Job.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2Job.java
@@ -79,6 +79,9 @@ public class HadoopV2Job implements HadoopJob {
     /** Serialized JobConf. */
     private volatile byte[] jobConfData;
 
+    /** Disposal guard. */
+    private final AtomicBoolean disposed = new AtomicBoolean();
+
     /**
      * @param jobId Job ID.
      * @param jobInfo Job info.
@@ -135,7 +138,6 @@ public class HadoopV2Job implements HadoopJob {
             Path jobDir = new Path(jobDirPath);
 
             try {
-                // Job classloader.
                 FileSystem fs = fileSystemForMrUser(jobDir.toUri(), jobConf, jobId.toString(),
null);
 
                 JobSplit.TaskSplitMetaInfo[] metaInfos = SplitMetaInfoReader.readSplitMetaInfo(hadoopJobID,
fs, jobConf,
@@ -243,33 +245,17 @@ public class HadoopV2Job implements HadoopJob {
         }
     }
 
-    private final AtomicBoolean initialized = new AtomicBoolean();
-
-    private final AtomicBoolean disposed = new AtomicBoolean();
-
     /** {@inheritDoc} */
     @Override public void initialize(boolean external, UUID locNodeId) throws IgniteCheckedException
{
         assert locNodeId != null;
         assert this.locNodeId == null;
 
-        boolean ok = initialized.compareAndSet(false, true);
-        assert ok;
-
         this.locNodeId = locNodeId;
 
         Thread.currentThread().setContextClassLoader(jobConf.getClassLoader());
 
         try {
-
-            String jobIdStr = jobId.toString();
-            assert jobIdStr != null;
-
-            String locId = this.locNodeId.toString();
-            assert locId != null;
-
-            X.println("##### initialize : " + jobIdStr + ", loc node id = " + locId);
-
-            final FileSystem fs = HadoopUtils.fileSystemForMrUser(null, jobConf, jobIdStr,
locId);
+            HadoopUtils.fileSystemForMrUser(null, jobConf, jobId.toString(), this.locNodeId.toString());
         } catch (IOException ioe) {
             throw new IgniteCheckedException(ioe);
         }
@@ -285,14 +271,11 @@ public class HadoopV2Job implements HadoopJob {
     /** {@inheritDoc} */
     @SuppressWarnings("ThrowFromFinallyBlock")
     @Override public void dispose(boolean external) throws IgniteCheckedException {
-        assert initialized.get();
-
         boolean dsp = disposed.compareAndSet(false, true);
+
         if (!dsp)
             return;
 
-        X.println("############# DISPOSE: jod = " + jobId + ", locId = " + locNodeId.toString()
+ ", this = " + this);
-
         try {
             if (rsrcMgr != null && !external) {
                 File jobLocDir = jobLocalDir(locNodeId, jobId);
@@ -326,13 +309,8 @@ public class HadoopV2Job implements HadoopJob {
                     // Also close all the FileSystems cached in
                     // HadoopLazyConcurrentMap for this *task* class loader:
                     closeCachedFileSystems(ldr);
-
-//                    assert getClass().getClassLoader() instanceof HadoopClassLoader;
-//                    assert getClass().getClassLoader().toString().contains("hadoop-job");
                 }
                 catch (Throwable e) {
-                    e.printStackTrace();
-
                     if (err == null)
                         err = e;
 
@@ -347,7 +325,6 @@ public class HadoopV2Job implements HadoopJob {
             HadoopUtils.close(jobId.toString(), locNodeId.toString());
 
             int i = 0;
-
             while (i++ < 5)
                 System.gc();
 
@@ -364,18 +341,11 @@ public class HadoopV2Job implements HadoopJob {
     }
 
     private void closeCachedFileSystems(ClassLoader ldr) throws Exception {
-        try {
-            Class clazz = ldr.loadClass(HadoopUtils.class.getName());
-
-            Method m = clazz.getMethod("close");
+        Class clazz = ldr.loadClass(HadoopUtils.class.getName());
 
-            m.invoke(null);
-        }
-        catch (Exception e) {
-            e.printStackTrace();
+        Method m = clazz.getMethod("close");
 
-            throw e;
-        }
+        m.invoke(null);
     }
 
     /** {@inheritDoc} */
@@ -397,9 +367,6 @@ public class HadoopV2Job implements HadoopJob {
 
     /** {@inheritDoc} */
     @Override public void cleanupStagingDirectory() {
-        X.println("############# cleanup staging: jid = " + jobId + ", this = " + this);
-        X.println(" loc node id = " + locNodeId);
-
         rsrcMgr.cleanupStagingDirectory();
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2JobResourceManager.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2JobResourceManager.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2JobResourceManager.java
index 68dd292..7d13fe9 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2JobResourceManager.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/v2/HadoopV2JobResourceManager.java
@@ -115,7 +115,6 @@ public class HadoopV2JobResourceManager {
                 stagingDir = new Path(new URI(mrDir));
 
                 if (download) {
-                    // Job class loader..
                     FileSystem fs = HadoopUtils.fileSystemForMrUser(stagingDir.toUri(), cfg,
jobId.toString(), null);
 
                     if (!fs.exists(stagingDir))

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfsDualAbstractSelfTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfsDualAbstractSelfTest.java
index 1d5a374..00f0b5e 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfsDualAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/HadoopIgfsDualAbstractSelfTest.java
@@ -204,12 +204,6 @@ public abstract class HadoopIgfsDualAbstractSelfTest extends IgfsCommonAbstractT
     /** {@inheritDoc} */
     @Override protected void afterTestsStopped() throws Exception {
         G.stopAll(true);
-//
-//        if (igfs != null)
-//            igfs.stop(false);
-//
-//        if (igfsSecondary != null)
-//            igfsSecondary.stop(false);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsEventsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsEventsTestSuite.java
b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsEventsTestSuite.java
index 375a949..e7c7f8a 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsEventsTestSuite.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/IgfsEventsTestSuite.java
@@ -21,7 +21,6 @@ import junit.framework.*;
 import org.apache.ignite.*;
 import org.apache.ignite.configuration.*;
 import org.apache.ignite.hadoop.fs.*;
-import org.apache.ignite.internal.processors.igfs.*;
 import org.apache.ignite.internal.util.ipc.shmem.*;
 import org.apache.ignite.internal.util.typedef.*;
 import org.jetbrains.annotations.*;

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java
index 5b9bb8c..a3c9bde 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopAbstractSelfTest.java
@@ -97,14 +97,6 @@ public abstract class HadoopAbstractSelfTest extends GridCommonAbstractTest
{
         System.setProperty("java.class.path", initCp);
 
         initCp = null;
-
-        // Ensure the file systems are cleared:
-        int inst = HadoopLazyConcurrentMap.getNumberOfInstances();
-
-        if (inst <= 4)
-            log().info("HadoopLazyConcurrentMap instances: " + inst);
-        else
-            log().warning("#### HadoopLazyConcurrentMap instances: " + inst);
     }
 
     /** {@inheritDoc} */
@@ -238,28 +230,4 @@ public abstract class HadoopAbstractSelfTest extends GridCommonAbstractTest
{
     protected String igfsScheme() {
         return "igfs://:" + getTestGridName(0) + "@/";
     }
-
-    /**
-     *
-     */
-    public static class CheckFsInstancesLeakTest extends GridCommonAbstractTest {
-        /**
-         *
-         * @throws Exception
-         */
-        public void testLeak() throws Exception {
-            int i = 0;
-            while (i++ < 10)
-                System.gc();
-
-            Thread.sleep(10_000);
-
-            // Ensure the file systems are cleared:
-            int inst = HadoopLazyConcurrentMap.getNumberOfInstances();
-
-            log().info("HadoopLazyConcurrentMap instances: " + inst);
-
-            assertTrue("HadoopLazyConcurrentMap instances: " + inst, inst <= 4);
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopFileSystemsTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopFileSystemsTest.java
b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopFileSystemsTest.java
index 5eb5084..5f90bd4 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopFileSystemsTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/internal/processors/hadoop/HadoopFileSystemsTest.java
@@ -88,51 +88,31 @@ public class HadoopFileSystemsTest extends HadoopAbstractSelfTest {
                 try {
                     int curThreadNum = threadNum.getAndIncrement();
 
-                    final FileSystem fs0 = FileSystem.get(uri, cfg);
-
-                    FileSystem fs;
-
-                    if ("file".equals(uri.getScheme())) {
-                        fs = FileSystem.get(uri, cfg);
-                        fs.setWorkingDirectory(new Path("file:///user/user" + curThreadNum));
-                    }
+                    if ("file".equals(uri.getScheme()))
+                        FileSystem.get(uri, cfg).setWorkingDirectory(new Path("file:///user/user"
+ curThreadNum));
 
                     changeUserPhase.countDown();
                     changeUserPhase.await();
 
-                    fs = FileSystem.get(uri, cfg);
-                    assertSame(fs, fs0);
-                    newUserInitWorkDir[curThreadNum] = fs.getWorkingDirectory();
+                    newUserInitWorkDir[curThreadNum] = FileSystem.get(uri, cfg).getWorkingDirectory();
 
-                    fs = FileSystem.get(uri, cfg);
-                    assertSame(fs, fs0);
-                    fs.setWorkingDirectory(new Path("folder" + curThreadNum));
+                    FileSystem.get(uri, cfg).setWorkingDirectory(new Path("folder" + curThreadNum));
 
                     changeDirPhase.countDown();
                     changeDirPhase.await();
 
-                    fs = FileSystem.get(uri, cfg);
-                    assertSame(fs, fs0);
-                    newWorkDir[curThreadNum] = fs.getWorkingDirectory();
+                    newWorkDir[curThreadNum] = FileSystem.get(uri, cfg).getWorkingDirectory();
 
-                    fs = FileSystem.get(uri, cfg);
-                    assertSame(fs, fs0);
-                    fs.setWorkingDirectory(new Path("/folder" + curThreadNum));
+                    FileSystem.get(uri, cfg).setWorkingDirectory(new Path("/folder" + curThreadNum));
 
                     changeAbsDirPhase.countDown();
                     changeAbsDirPhase.await();
 
-                    fs = FileSystem.get(uri, cfg);
-                    assertSame(fs, fs0);
-                    newAbsWorkDir[curThreadNum] = fs.getWorkingDirectory();
+                    newAbsWorkDir[curThreadNum] = FileSystem.get(uri, cfg).getWorkingDirectory();
 
-                    fs = FileSystem.newInstance(uri, cfg);
-                    assertNotSame(fs, fs0);
-                    newInstanceWorkDir[curThreadNum] = fs.getWorkingDirectory();
+                    newInstanceWorkDir[curThreadNum] = FileSystem.newInstance(uri, cfg).getWorkingDirectory();
 
                     finishPhase.countDown();
-
-                    fs.close();
                 }
                 catch (InterruptedException | IOException e) {
                     error("Failed to execute test thread.", e);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/122574c9/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
index 007bf5f..2ab3e8c 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/testsuites/IgniteHadoopTestSuite.java
@@ -123,9 +123,6 @@ public class IgniteHadoopTestSuite extends TestSuite {
 
         suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualSyncTest.class.getName())));
         suite.addTest(new TestSuite(ldr.loadClass(Hadoop1OverIgfsDualAsyncTest.class.getName())));
-
-        suite.addTest(new TestSuite(ldr.loadClass(HadoopAbstractSelfTest.CheckFsInstancesLeakTest.class.getName())));
-
         return suite;
     }
 


Mime
View raw message