ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [22/50] [abbrv] incubator-ignite git commit: [ignite-332]: improved error checking.
Date Thu, 26 Feb 2015 10:30:39 GMT
[ignite-332]: improved error checking.


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

Branch: refs/heads/ignite-239
Commit: dc085d828cd5ec574da2e6abdf5dca7c3bb4d8a5
Parents: 45ce814
Author: iveselovskiy <iveselovskiy@gridgain.com>
Authored: Tue Feb 24 17:05:15 2015 +0300
Committer: iveselovskiy <iveselovskiy@gridgain.com>
Committed: Tue Feb 24 17:05:15 2015 +0300

----------------------------------------------------------------------
 .../apache/ignite/client/hadoop/GridHadoopClientProtocol.java   | 4 +++-
 .../internal/processors/hadoop/GridHadoopDefaultJobInfo.java    | 5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc085d82/modules/hadoop/src/main/java/org/apache/ignite/client/hadoop/GridHadoopClientProtocol.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/client/hadoop/GridHadoopClientProtocol.java
b/modules/hadoop/src/main/java/org/apache/ignite/client/hadoop/GridHadoopClientProtocol.java
index 511d7fe..c7fc077 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/client/hadoop/GridHadoopClientProtocol.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/client/hadoop/GridHadoopClientProtocol.java
@@ -104,7 +104,9 @@ public class GridHadoopClientProtocol implements ClientProtocol {
             GridHadoopJobStatus status = cli.compute().execute(GridHadoopProtocolSubmitJobTask.class.getName(),
                 new GridHadoopProtocolTaskArguments(jobId.getJtIdentifier(), jobId.getId(),
createJobInfo(conf)));
 
-            assert status != null;
+            if (status == null) {
+                throw new IOException("Null status obtained on attempt to submit Hadoop job
" + jobId);
+            }
 
             return processStatus(status);
         }

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/dc085d82/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultJobInfo.java
----------------------------------------------------------------------
diff --git a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultJobInfo.java
b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultJobInfo.java
index 87db9c8..555c573 100644
--- a/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultJobInfo.java
+++ b/modules/hadoop/src/main/java/org/apache/ignite/internal/processors/hadoop/GridHadoopDefaultJobInfo.java
@@ -101,8 +101,9 @@ public class GridHadoopDefaultJobInfo implements GridHadoopJobInfo, Externalizab
 
             return (GridHadoopJob)constructor.newInstance(jobId, this, log);
         }
-        catch (Exception e) {
-            throw new IgniteCheckedException(e);
+        // NB: java.lang.NoClassDefFoundError may be thrown from Class#getConstructor() call.
+        catch (Throwable t) {
+            throw new IgniteCheckedException(t);
         }
     }
 


Mime
View raw message