airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hes...@apache.org
Subject svn commit: r1454586 - in /airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac: notification/events/EC2ProviderEvent.java provider/impl/EC2Provider.java
Date Fri, 08 Mar 2013 21:32:59 GMT
Author: heshan
Date: Fri Mar  8 21:32:58 2013
New Revision: 1454586

URL: http://svn.apache.org/r1454586
Log:
AIRAVATA-202 Adding proper exception handling and a missing license header. 

Modified:
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/notification/events/EC2ProviderEvent.java
    airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/notification/events/EC2ProviderEvent.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/notification/events/EC2ProviderEvent.java?rev=1454586&r1=1454585&r2=1454586&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/notification/events/EC2ProviderEvent.java
(original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/notification/events/EC2ProviderEvent.java
Fri Mar  8 21:32:58 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
 package org.apache.airavata.gfac.notification.events;
 
 public class EC2ProviderEvent extends GFacEvent {

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java?rev=1454586&r1=1454585&r2=1454586&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java
(original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/impl/EC2Provider.java
Fri Mar  8 21:32:58 2013
@@ -167,9 +167,9 @@ public class EC2Provider implements GFac
             }
 
         } catch (InvalidSshKeyException e) {
-            e.printStackTrace();
+            throw new GFacProviderException("Invalid SSH key", e);
         } catch (IOException e) {
-            e.printStackTrace();
+            throw new GFacProviderException("Error in occurred during IO", e);
         }
 
     }
@@ -252,7 +252,8 @@ public class EC2Provider implements GFac
         return instance;
     }
 
-    private List<Instance> startInstances(AmazonEC2Client ec2, String amiId, String
insType, JobExecutionContext jobExecutionContext) throws AmazonServiceException {
+    private List<Instance> startInstances(AmazonEC2Client ec2, String amiId, String
insType, JobExecutionContext jobExecutionContext)
+            throws AmazonServiceException {
         // start only 1 instance
         RunInstancesRequest request = new RunInstancesRequest(amiId, 1, 1);
         request.setKeyName(KEY_PAIR_NAME);



Mime
View raw message