Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adding error messages and minor bug correction.
authorSébastien Miquée <sebastien.miquee@univ-fcomte.fr>
Tue, 19 Jul 2011 15:02:39 +0000 (17:02 +0200)
committerSébastien Miquée <sebastien.miquee@univ-fcomte.fr>
Tue, 19 Jul 2011 15:02:39 +0000 (17:02 +0200)
src/and/hpcvm/RunningApplication.java
src/and/hpcvm/Server.java

index 5988648..5e79522 100644 (file)
@@ -82,11 +82,14 @@ public class RunningApplication implements Serializable
                                        computingsNodes.set( i , _new ) ;
                                        return 0 ;
                                }
-                               
-                               System.err.println( "Dead computing client not found. Unable to replace it!" ) ;
                        }
+                       
+                       System.err.println( "Dead computing client not found. Unable to replace it!" ) ;
+                       return 1 ;
                }
                
+               System.err.println( "Dead or new computing client is null! Unable to replace one of them!" ) ;
+               
                return 1 ;
        }
        
index 8f35386..a822cf7 100644 (file)
@@ -683,12 +683,17 @@ public class Server extends UnicastRemoteObject implements ServicesServer
                                if( computingClients.get( i ).getClient().getIP().equalsIgnoreCase( _ip ) ) 
                                {
                                        computingClients.get( i ).setLastSave( _saveName ) ;
-                                       System.out.println( "Save name successfully changed on " + _ip ) ;
+                                       System.out.println( "Save name successfully changed on " + computingClients.get( i ).getClient().getName() ) ;
                                        return 0 ;
                                }
                        }
+                       
+                       System.err.println( "Unable to found computing client with IP " + _ip + "!" ) ;
+                       return 1 ;
                }
                
+               System.err.println( "Unable to change save name. IP or save name empty ! (IP: " + _ip + " ; save name: " + _saveName +")" ) ;
+               
                return 1 ;
        }
 
@@ -964,7 +969,7 @@ public class Server extends UnicastRemoteObject implements ServicesServer
                if( applications.size() > 0 && _ip != null && _ip.length() > 0 )
                {
                        System.out.println( "Client " + _ip + " has finished to restart ("+applications.get( ind ).getComputingClients().size()+") ... " ) ;
-                       if( (System.currentTimeMillis() - applications.get( ind ).getLastSaveDate()) > save_interleave )
+//                     if( (System.currentTimeMillis() - applications.get( ind ).getLastSaveDate()) > save_interleave )
                        {
                                // Has it already finished?
                                for( int i = 0 ; i < applications.get( ind ).getComputingClients().size() ; i++ )
@@ -977,7 +982,7 @@ public class Server extends UnicastRemoteObject implements ServicesServer
                                        }
                                }
                                
-                               // Is every body ok?
+                               // Is everybody ok?
                                boolean ok = false ;
                                for( int i = 0 ; i < applications.get( ind ).getComputingClients().size() ; i++ )
                                {