You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by vo...@apache.org on 2016/01/04 10:54:30 UTC

[1/3] ignite git commit: IGNITE-2206: Cleanup.

Repository: ignite
Updated Branches:
  refs/heads/ignite-2206 4b2eb7516 -> 493b29ddf


IGNITE-2206: Cleanup.


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

Branch: refs/heads/ignite-2206
Commit: bc1227b113378c65c148ea89f067ca8ab8b47552
Parents: 4b2eb75
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Jan 4 12:48:01 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jan 4 12:48:01 2016 +0400

----------------------------------------------------------------------
 .../internal/processors/igfs/IgfsPaths.java     |  2 -
 .../hadoop/fs/v1/IgniteHadoopFileSystem.java    | 45 ++++++++++----------
 2 files changed, 22 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/bc1227b1/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsPaths.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsPaths.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsPaths.java
index 86f00cc..4a79259 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsPaths.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/igfs/IgfsPaths.java
@@ -22,9 +22,7 @@ import java.io.ByteArrayOutputStream;
 import java.io.Externalizable;
 import java.io.IOException;
 import java.io.ObjectInput;
-import java.io.ObjectInputStream;
 import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
 import java.util.ArrayList;
 import java.util.List;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/bc1227b1/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 12c7c78..4b8e989 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
@@ -190,8 +190,7 @@ public class IgniteHadoopFileSystem extends FileSystem {
     /** {@inheritDoc} */
     @Override public URI getUri() {
         if (uri == null)
-            throw new IllegalStateException("URI is null (was IgniteHadoopFileSystem properly initialized?) [closed="
-                + closeGuard.get() + ']');
+            throw new IllegalStateException("URI is null (was IgniteHadoopFileSystem properly initialized?).");
 
         return uri;
     }
@@ -922,35 +921,35 @@ public class IgniteHadoopFileSystem extends FileSystem {
 
     /** {@inheritDoc} */
     @Override public void setWorkingDirectory(Path newPath) {
-        FileSystem secondaryFs;
-
         try {
-            secondaryFs = secondaryFileSystem();
-        }
-        catch (IOException e) {
-            throw new RuntimeException("Failed to obtain secondary file system instance.", e);
-        }
+            if (newPath == null) {
+                Path homeDir = getHomeDirectory();
 
-        if (newPath == null) {
-            Path homeDir = getHomeDirectory();
+                FileSystem secondaryFs  = secondaryFileSystem();
 
-            if (secondaryFs != null)
-                secondaryFs.setWorkingDirectory(toSecondary(homeDir));
+                if (secondaryFs != null)
+                    secondaryFs.setWorkingDirectory(toSecondary(homeDir));
 
-            workingDir = homeDir;
-        }
-        else {
-            Path fixedNewPath = fixRelativePart(newPath);
+                workingDir = homeDir;
+            }
+            else {
+                Path fixedNewPath = fixRelativePart(newPath);
+
+                String res = fixedNewPath.toUri().getPath();
 
-            String res = fixedNewPath.toUri().getPath();
+                if (!DFSUtil.isValidName(res))
+                    throw new IllegalArgumentException("Invalid DFS directory name " + res);
 
-            if (!DFSUtil.isValidName(res))
-                throw new IllegalArgumentException("Invalid DFS directory name " + res);
+                FileSystem secondaryFs  = secondaryFileSystem();
 
-            if (secondaryFs != null)
-                secondaryFs.setWorkingDirectory(toSecondary(fixedNewPath));
+                if (secondaryFs != null)
+                    secondaryFs.setWorkingDirectory(toSecondary(fixedNewPath));
 
-            workingDir = fixedNewPath;
+                workingDir = fixedNewPath;
+            }
+        }
+        catch (IOException e) {
+            throw new RuntimeException("Failed to obtain secondary file system instance.", e);
         }
     }
 


[2/3] ignite git commit: IGNITE-2206: Cleanup.

Posted by vo...@apache.org.
IGNITE-2206: Cleanup.


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

Branch: refs/heads/ignite-2206
Commit: 309dc5c7f88fd44646879783ae8abca0dd164673
Parents: bc1227b
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Jan 4 12:50:47 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jan 4 12:50:47 2016 +0400

----------------------------------------------------------------------
 .../internal/processors/hadoop/fs/HadoopLazyConcurrentMap.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/309dc5c7/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 e399a4a..681cddb 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
@@ -74,7 +74,7 @@ public class HadoopLazyConcurrentMap<K, V extends Closeable> {
             try {
                 if (closed)
                     throw new IllegalStateException("Failed to create value for key [" + k
-                        + "]: the map is already closed. this = " + System.identityHashCode(this));
+                        + "]: the map is already closed.");
 
                 final ValueWrapper wNew = new ValueWrapper(k);
 


[3/3] ignite git commit: IGNITE-2206: Fixing tests.

Posted by vo...@apache.org.
IGNITE-2206: Fixing tests.


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

Branch: refs/heads/ignite-2206
Commit: 493b29ddf957e4e7dc7c1b8e1ff29a3dbf86652b
Parents: 309dc5c
Author: vozerov-gridgain <vo...@gridgain.com>
Authored: Mon Jan 4 12:55:12 2016 +0400
Committer: vozerov-gridgain <vo...@gridgain.com>
Committed: Mon Jan 4 12:55:12 2016 +0400

----------------------------------------------------------------------
 .../test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java  | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/493b29dd/modules/hadoop/src/test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java b/modules/hadoop/src/test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java
index ea65464..24ef3b0 100644
--- a/modules/hadoop/src/test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java
+++ b/modules/hadoop/src/test/java/org/apache/ignite/igfs/Hadoop1DualAbstractTest.java
@@ -77,6 +77,8 @@ public abstract class Hadoop1DualAbstractTest extends IgfsDualAbstractSelfTest {
         IgniteHadoopIgfsSecondaryFileSystem second =
             new IgniteHadoopIgfsSecondaryFileSystem(secondaryUri, secondaryConfFullPath);
 
+        second.start();
+
         FileSystem fileSystem = second.fileSystem();
 
         igfsSecondary = new HadoopFileSystemUniversalFileSystemAdapter(fileSystem);