ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [36/37] incubator-ignite git commit: [IGNITE-406]: fixed testOpenNoPrefetch().
Date Thu, 12 Mar 2015 12:56:16 GMT
[IGNITE-406]: fixed testOpenNoPrefetch().


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

Branch: refs/heads/ignite-406
Commit: bb4406d2f0a8be94a9f7ec5b81d05585d3e94696
Parents: 4361543
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Thu Mar 12 15:05:41 2015 +0300
Committer: iveselovskiy <iveselovskiy@gridgain.com>
Committed: Thu Mar 12 15:05:41 2015 +0300

----------------------------------------------------------------------
 .../processors/igfs/IgfsDualAbstractSelfTest.java      |  3 +--
 .../processors/hadoop/igfs/HadoopIgfsIpcIo.java        | 13 +++++++++++++
 .../processors/hadoop/igfs/HadoopIgfsUtils.java        |  9 +++++++--
 3 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb4406d2/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java
b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java
index 36c1a46..6ad09e9 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsDualAbstractSelfTest.java
@@ -1132,8 +1132,7 @@ public abstract class IgfsDualAbstractSelfTest extends IgfsAbstractSelfTest
{
      *
      * @throws Exception If failed.
      */
-    // TODO: this test hangs up. Rename back and fix.
-    public void _testOpenNoPrefetch() throws Exception {
+    public void testOpenNoPrefetch() throws Exception {
         create(igfsSecondary, paths(DIR, SUBDIR), paths(FILE));
 
         // Write enough data to the secondary file system.

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb4406d2/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsIpcIo.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsIpcIo.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsIpcIo.java
index b3b981b..62e5380 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsIpcIo.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsIpcIo.java
@@ -567,6 +567,15 @@ public class HadoopIgfsIpcIo implements HadoopIgfsIo {
 
                                 err = e;
                             }
+                            catch (Throwable t) {
+                                err = t;
+
+                                fut.onDone(t);
+
+                                log.error("Failed to read data (connection will be closed)",
t);
+
+                                break;
+                            }
                         }
                     }
                 }
@@ -585,6 +594,10 @@ public class HadoopIgfsIpcIo implements HadoopIgfsIo {
                     log.error("Failed to obtain endpoint input stream (connection will be
closed)", e);
 
                 err = e;
+            } catch (Throwable t) {
+                err = t;
+
+                log.error("Failed to read data (connection will be closed)", t);
             }
             finally {
                 close0(err);

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/bb4406d2/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsUtils.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsUtils.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsUtils.java
index 0e3d127..85872e8 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsUtils.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/igfs/HadoopIgfsUtils.java
@@ -117,8 +117,13 @@ public class HadoopIgfsUtils {
             return new PathIsNotEmptyDirectoryException(path);
         else if (path != null && e.hasCause(IgfsPathAlreadyExistsException.class))
             return new PathExistsException(path);
-        else
-            return new IOException(e);
+        else {
+            String msg = e.getMessage();
+            if (msg == null)
+                return new IOException(e);
+            else
+                return new IOException(msg, e);
+        }
     }
 
     /**


Mime
View raw message