} else {
is = existBackupTaskOfRank(rank, tag);
if (is != -1) {
- // System.out.println("chercher un backup normale");
+ // System.out.println("chercher un backup normal");
return (Backup) liste.get(is);
} else {
- System.out.println("cette tache ou ce backup existe po");
+ System.out.println("cette tache ou ce backup existe pas");
return null;
}
}
// System.out.println("chercher un backup convg");
return (Backup) liste_Convg.get(is);
} else {
- System.out.println("cette tache ou ce backup existe po");
+ System.out.println("cette tache ou ce backup existe pas");
return null;
}
}
count = 0;
} else
System.out
- .println("The server returned a null register oh nooooooooooooooooooo");
+ .println("The server returned a null register !");
} catch (Exception e2) {
System.err
.println("Unable to contact the Spawner :"
algoMapping = new Integer(args[7]).intValue();
paramAlgo = new Double(args[8]).doubleValue();
} catch (NumberFormatException e) {
- System.out.println("the number of Daemons per spawner and the number of daemons per thread must be integers: "
+ System.err.println("The number of Daemons per spawner and the number of daemons per thread must be integers: "
+ e);
System.exit(0);
}
try {
beat = new Integer(args[4]).intValue();
} catch (NumberFormatException e) {
- System.out
- .println("the beat number must be an integer: "
+ System.err
+ .println("The beat number must be an integer: "
+ e);
System.exit(0);
}
JaceSuperNodeInterface snodeStub, int rank, int heartTime, int tag,
int nbdc, int nbsdc, int nbDaemonPerSpawner, int nbDaemonPerThread)
throws RemoteException {
- System.out.println("beginning the transformation .........");
+ System.out.println("Beginning the transformation ...");
// @SuppressWarnings("unused")
// JaceSpawner spawner = new JaceSpawner(params, appliName, reg, nbTasks,
// snodeStub, rank, heartTime, tag, nbdc, nbsdc,
// 1 - replace the old Register by the new one
System.out.println(" \n\n NEW REGISTER \n\n");
// if(Register.Instance().getVersion()<=newReg.getVersion()){
- System.out.println("replacing Register !!!!!!$$$$$$$$******");
+ System.out.println("Replacing Register ...");
Register.Instance().replaceBy(newReg);
Register.Instance().viewAll();
// }
myTaskId.setHostStub(node.getStub());
} catch (Exception e) {
- System.out.println("error in updateregister :" + e);
+ System.err.println("Error in updateregister :" + e);
// e.printStackTrace();
}
}
}
public void suicide(String debugMsg) throws RemoteException {
- System.out.println("suiciiiiiiiiiiiide : "/* + debugMsg */);
+// System.out.println("suiciiiiiiiiiiiide : "/* + debugMsg */);
new ReinitDaemon().start();
}
ScanThread.Instance().notify();
}
} catch (Exception e) {
- System.out.println("error in setScanning: " + e);
+ System.err.println("Error in setScanning: " + e);
}
// System.out.println("before notify!!!!!!!!!");
// try{ScanThread.Instance().notify();}
System.out.println("I m going to kill the thread");
// taskThread.join();
taskThread.stop();
- System.out.println("thread stopped without pb!!!!!!!");
+ System.out.println("Thread stopped without problem.");
taskThread = null;
} catch (Exception e) {
- System.out.println("ERROR : thread not join : " + e);
- System.out.println("I m going to kill the thread");
+ System.err.println("ERROR : thread not join : " + e);
+ System.err.println("I m going to kill the thread");
try {
taskThread.stop();
- System.out.println("thread stopped after a problem !!!!!!!");
+ System.out.println("Thread stopped after a problem !");
taskThread = null;
} catch (Exception e2) {
- System.out.println("ERROR thread not killed : " + e);
+ System.err.println("ERROR thread not killed : " + e);
}
}
res = RunningApplication.Instance().getChrono().getValue();
// System.out.println("temps chrono : " + res + " ms\n");
} else {
- System.out.println("pas d'appli de ce nom sur ce spawner");
+ System.err.println("No application of name "+appliName+" on this Spawner !");
}
return res;
}
public void signalDeadNode(JaceInterface host, int rankOfDead)
throws RemoteException {
- System.out.println("signalDeadNode of rank " + rankOfDead);
+ System.out.println("SignalDeadNode of rank " + rankOfDead);
JaceSpawner.Instance().signalDeadNode(host, rankOfDead);
}
myTaskId.setHostStub(node.getStub());
// Register.Instance().setVersion(Register.Instance().getVersion()+1);
RunningApplication.Instance().incrementNumberOfDisconnections();
- System.out.println("replacing node: " + oldNode.getName() + " with: "
+ System.out.println("Replacing node: " + oldNode.getName() + " with: "
+ node.getName());
// Register.Instance().getListeOfTasks().viewAll();
}
if (is != -1) {
return (TaskId) liste.get(is);
} else {
- System.out
- .println("There is no task affected to this host stub !!!!! ");
+ System.err
+ .println("There is no task affected to this host stub !");
return null;
}
}
if (is != -1) {
return (TaskId) liste.get(is);
} else {
- System.out.println("TaskId of rank=" + rank + " doesn't exist");
+ System.err.println("TaskId of rank=" + rank + " doesn't exist");
viewAll();
return null;
}
// tmp.getSender().getHostIP());
return tmp;
} else {
- // System.out.println("existe po :(((( "+tag+"---"+id);
+ // System.out.println("existe pas :(((( "+tag+"---"+id);
return null;
}
}
}
}
- // les reception bloqunte
+ // les reception bloquantes
/*
* public synchronized Message getBl(int id) { int is = -1; //
* System.out.println("Taille de la file: "+liste.size()); if
public synchronized int existNode(Node node) {
if (node == null) {
- System.out
- .println("!!!!!!!!!!!!!!!!!!!!!!!!! node est null ds existNode");
+ System.err
+ .println("Node est null dans existNode");
+ return -1 ;
}
int existe = -1;
int index = 0;
public synchronized void addNode(Node host) {
int is = -1;
if (host == null) {
- System.out
- .println("ds Register.addNode : host.getIP() == null !!!!!!!!!!!!!!!");
+ System.err
+ .println("In Register.addNode : host.getIP() == null !");
}
is = existNodeOfStub(host.getStub());
if (is != -1) {
public synchronized int existNodeOfStub(JaceInterface stub) {
// System.out.println("remote " + stub + "\n\n");
if (stub == null) {
- System.out
- .println("!!!!!!!!!!!!!!!!!!!!!!!!! stub = NULL ds existNodeOfStub = ");
+ System.err
+ .println("Stub = NULL in existNodeOfStub");
+ return -1 ;
}
int existe = -1;
int index = 0;
return null;
} else {
if (stub == null) {
- System.out
- .println("ds Register.getNodeOfStub : stub == null !!!!!!!!!!!!!!!");
+ System.err
+ .println("In Register.getNodeOfStub : stub == null !");
}
is = existNodeOfStub(stub);
if (is != -1) {
return null;
} else {
if (name == null)
- System.out
- .println("ds Register.getNodeOfName : name == null !!!!!!!!!!!!!!!");
+ System.err
+ .println("In Register.getNodeOfName : name == null !");
int index = 0;
while ((is == -1) && (index < liste.size())) {
try {
((Node) liste.elementAt(i)).getOutputStream().close();
} catch (Exception e) {
- System.out.println("unable to close outputStream :" + e);
+ System.err.println("Unable to close outputStream :" + e);
}
}
liste.clear();
String inter = "\n\t";
String count = "";
if (liste.isEmpty()) {
- System.out.println("My Register is empty !!!!!");
+ System.err.println("My Register is empty !!!!!");
} else {
for (int i = 0; i < liste.size(); i++) {
noeud = getNodeAt(i);
public static ScanThreadSpawner Instance() {
if (Instance == null) {
- System.out.println("creating new ScanThreadSpawner ");
+ System.out.println("Creating new ScanThreadSpawner ");
Instance = new ScanThreadSpawner();
}
return Instance;
@SuppressWarnings("static-access")
public void run() {
- System.out.println("start ScanThreadSpawner.......");
+ System.out.println("Start ScanThreadSpawner.......");
while (running) {
// System.out.println("ScanThread alive.......");
try {
boolean response = false;
try {
response = previousSpawner.ping();
- System.out.println("previous spawner is still alive");
+ System.out.println("Previous spawner is still alive");
} catch (Exception e) {
System.out
- .println("the previous spawner is officially dead "
+ .println("The previous spawner is officially dead "
+ e);
}
if (response == false) {
}
}
} catch (Exception e) {
- System.out.println("error in test neighbor: " + e);
+ System.err.println("Error in test neighbor: " + e);
}
}
}
public static ScanThreadSuperNode Instance() {
if (Instance == null) {
- System.out.println("creating new ScanThreadSuperNode ");
+ System.out.println("Creating new ScanThreadSuperNode ");
Instance = new ScanThreadSuperNode();
}
return Instance;
// }
@SuppressWarnings("static-access")
public void run() {
- System.out.println("start ScanThread for SuperNode.......");
+ System.out.println("Start ScanThread for SuperNode.......");
while (true) {
// System.out.println("ScanThread alive.......");
/*
index = SuperNodeListe.Instance().getListe().size() - 1;
SuperNodeData data;
synchronized (SuperNodeListe.Instance()) {
- System.out.println("removing "
+ System.out.println("Removing "
+ ((SuperNodeData) SuperNodeListe.Instance()
.getListe().elementAt(index)).getIP());
data = (SuperNodeData) SuperNodeListe.Instance().getListe()
.getListe().elementAt(i)).getStub()
.removeSuperNode(data);
} catch (Exception e2) {
- System.out
- .println("error diffusing the message concerning a dead superNode: "
+ System.err
+ .println("Error diffusing the message concerning a dead superNode: "
+ e2);
}
if (token == true) {
}
} catch (Exception e) {
- System.out.println("error in testNeighbor: " + e);
+ System.err.println("Error in testNeighbor: " + e);
}
}
sendId, verifNum, verdict);
JaceSession.Instance().getTaskObject().broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("le message de verdict n'est pas recu :" + e);
+ System.err
+ .println("The verdict message is not received: " + e);
try {
Thread.sleep(500);
} catch (Exception ex) {
sendId, verifNum);
JaceSession.Instance().getTaskObject().broadcastTasks(3);
} catch (Exception e) {
- System.out.println("le message de verif n'est pas recu :" + e);
+ System.err.println("The verification message is not received: " + e);
try {
Thread.sleep(500);
} catch (Exception ex) {
msg = buffer.get();
if (msg.getReceiver() == null) {
- System.out.println("In jaceSend recv = null !!!!!");
+ System.err.println("In jaceSend recv = null !!!!!");
// System.out.println("msg.getReceiver() : " +
// msg.getReceiver());
- System.out.println(" recv is null in msg of SENDER "
+ System.err.println("Rkecv is null in msg of SENDER "
+ LocalHost.Instance().getName());
}
yield();
} catch (Exception e) {
- System.out
+ System.err
.println("Can't send the messgae to "
+ msg.getReceiver().getHostName()
+ ". Error: " + e);
msgIsSent = true;
yield();
} catch (Exception e) {
- System.out
- .println("error in SenderSocket run method :" + e);
+ System.err
+ .println("Error in SenderSocket run method :" + e);
// System.out.println("SENDER : the node of task " +
// msg.getReceiver().getHostIP() + " is dead !!!! " + e);
// TODO change to have non-static list
// using a config file
// in order to discover new superNodes dynamicaly
+
+ /* Sébastien Miquée -- ajout de la lecture du fichier de config **/
+
@SuppressWarnings("unchecked")
public void staticInitialization() {
String adr = "";
br.close();
} catch (Exception e) {
- System.out.println(e.toString());
+ System.err.println(e.toString());
}
// String adr1 =
if (is != -1) {
((SuperNodeData) liste.elementAt(is)).setStub(stub);
} else {
- System.out.println("this superNode does not exist : " + snode);
- System.out.println("add the new SuperNode");
+ System.err.println("This superNode does not exist : " + snode);
+ System.out.println("Add the new SuperNode");
SuperNodeData data = new SuperNodeData(snode, port);
data.setStub(stub);
data.setNbOfNodes(0);
return null;
} else {
if (superNode == null) {
- System.out
+ System.err
.println("In Register.getNode : host == null !!!!!!!!!!!!!!!");
}
is = existSuperNode(superNode);
if (is != -1) {
return ((SuperNodeData) liste.get(is)).getStub();
} else {
- System.out.println("this superNode does not exist");
+ System.err.println("This superNode does not exist");
return null;
}
}
public synchronized int existSuperNode(String snode) {
if (snode == null) {
- System.out
- .println("!!!!!!!!!!!!!!!!!!!!!!!!! hostIP in existNode = "
+ System.err
+ .println("HostIP in existNode = "
+ snode);
}
int existe = -1;
SuperNodeData d = (SuperNodeData) liste.elementAt(is);
d.setNbOfNodes(nb);
} else {
- System.out.println("ce superNode existe pas ds ma liste : " + IP);
+ System.err.println("This SuperNode does not exists in my list: " + IP);
}
}
System.out.println("size:" + liste.size());
viewAll();
} catch (Exception e) {
- System.out.println("SuperNode " + remoteIP
+ System.err.println("SuperNode " + remoteIP
+ " is down or not already launched: " + e);
}
} else
liste.add(data);
TokenThread.Instance().setToken();
} else {
- System.out
- .println("no superNode alive in the static List, closing application");
+ System.err
+ .println("No superNode alive in the static List, closing application");
System.exit(1);
}
// System.out.println("je remove le noeud de rang " + i);
liste.remove(i);
} else {
- System.out.println("super node existe pas");
+ System.err.println("The SuperNode does not exists!");
}
}
// if no stub there is a problem
if (stub == null) {
- System.out.println("unable to SEND backup on task of rank " + rank);
+ System.err.println("Unable to send backup on task of rank " + rank);
} else {
// if there is a stub, send the stream to that node
try {
}
}
} catch (Exception e) {
- System.out.println("error in getBackupForNewNode :" + e);
+ System.err.println("Error in getBackupForNewNode :" + e);
e.printStackTrace(System.out);
}
}
jaceSize = Register.Instance().getNbOfTasks();
} catch (Exception e) {
try {
- System.out.println("setId is bad !! " + e + " "
+ System.err.println("SetId is bad !! " + e + " "
+ LocalHost.Instance().getName());
// jaceSize = Register.Instance().getListeOfTasks().getSize();
} catch (Exception e2) {
- System.out.println("not localised the spawner : " + e2);
+ System.err.println("Not localised the spawner : " + e2);
}
}
}
public void jaceFinalize() {
finalize = true;
- System.out.println("ready to Death Task:" + jaceMyId);
+ System.out.println("Ready to Death Task:" + jaceMyId);
try {
Register.Instance().getSpawnerStub().killApplication(
LocalHost.Instance().getStub());
} catch (Exception e) {
- System.out
- .println("pas reussit a joindre Spawner pr killApplication : "
+ System.err
+ .println("Cannot join the Spawner to kill application: "
+ e);
}
reinitializeVectors();
} catch (Exception e) {
- System.out.println("erreur ds jaceP2P_reinitConv():" + e);
+ System.err.println("Error in jaceP2P_reinitConv():" + e);
}
pseudoPerBeg = false;
pseudoPerEnd = false;
result = Register.Instance().getSpawnerStub().getChronoValue(
Register.Instance().getAppliName());
} catch (Exception e) {
- System.out
+ System.err
.println("JaceP2P_Error in Task.jaceP2P_getChronoValue() on SuperNode : "
+ e);
}
recev = Register.Instance().getListeOfTasks().getTaskIdOfRank(dest);
if (recev == null) {
- System.out.println("In jaceSend recv = null !");
+ System.err.println("In jaceSend recv = null !");
try {
JaceSession.Instance().getTaskThread().sleep(10);
JaceSession.Instance().getTaskThread().yield();
// TODO : virer ce else, mais chercher pkoi recev est null des fois
else {
if (recev.getRank() != dest) {
- System.out.println("Problem !! pas le meme dest que ds les param");
+ System.err.println("Problem !! pas le meme dest que ds les param");
}
// creer le Message
// SenderSocket.Instance().getBuffer().add(msg);
}
} catch (Exception e) {
- System.out.println("unable to send data message to " + dest
+ System.err.println("Unable to send data message to " + dest
+ ": " + e);
}
// System.out.println("TASK : g mis un msg qui doit etre envoye");
}
} catch (Exception e) {
if (Register.Instance().getListeOfTasks() == null)
- System.out.println("Liste des taches est nulle: " + e);
+ System.err.println("Tasks list is null: " + e);
}
}
}
} catch (Exception e) {
- System.out.println("error jaceReceive :" + e);
- System.out.println("sender=" + sender);
+ System.err.println("Error jaceReceive :" + e);
+ System.err.println("Sender=" + sender);
}
return (tmp.getData());
} else {
// + ") taille MsgQueue : " + MsgQueue.Instance().getSize());
} catch (Exception e) {
if (Register.Instance().getListeOfTasks() == null)
- System.out.println("Liste des taches est nulle: " + e);
+ System.err.println("Tasks list is null: " + e);
}
try {
JaceSession.Instance().getTaskThread().sleep(10);
.getTaskIdOfRank(saveTab[i]); // ///////////////////////////pb
stub = task.getHostStub();
} catch (Exception e) {
- System.out
- .println("pb in the broadcast, ligne d'assignation de task ds broadcats: "
+ System.err
+ .println("Problem in the broadcast, ligne d'assignation de task ds broadcats: "
+ e);
}
.getTaskIdOfRank(saveTab[i]); // ///////////////////////////pb
stub = task.getHostStub();
} catch (Exception e) {
- System.out
- .println("pb in the broadcast, ligne d'assignation de task ds broadcats: "
+ System.err
+ .println("Problem in the broadcast, ligne d'assignation de task ds broadcats: "
+ e);
}
fluxOut.writeObject(t);
fluxOut.close();
} catch (Exception e) {
- System.out
+ System.err
.println("JaceP2P_Error in Task.jaceP2P_ReinitConv() when converting Task in Stream : "
+ e);
}
fluxOut.writeObject(t);
fluxOut.close();
} catch (Exception e) {
- System.out
+ System.err
.println("JaceP2P_Error in Task.jaceP2P_ReinitConv() when converting Task in Stream : "
+ e);
}
sauv.lastSave = lastSave;
}
} catch (Exception e) {
- System.out.println("probleme ds rmi");
+ System.err.println("Problem with RMI !");
}
return sauv;
}
sauvConvg.initialized = true;
} catch (Exception e) {
- System.out.println("probleme ds rmi" + e);
+ System.err.println("Problem with RMI:" + e);
}
return sauvConvg;
.println("I got a null register from the spawner");
broadcastTasks(tag);
System.out
- .println("sleeping till acknowledge saved");
+ .println("Sleeping till acknowledge saved");
count = 0;
} catch (Exception e2) {
- System.out
- .println("unable to get register from spawner :"
+ System.err
+ .println("Unable to get register from spawner :"
+ e2);
e2.printStackTrace(System.out);
}
printResp();
printDep();
} catch (Exception e) {
- System.out.println("error printing status in Task :" + e);
+ System.err.println("Error printing status in Task :" + e);
}
Thread.yield();
if (action.equals("sendVerif") && state.equals("VERIF")
state = "VERIF";
broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("le message de verification n'est pas recu: "
+ System.err
+ .println("The verification message is not received: "
+ e);
Register.Instance().viewAll();
}
broadcastTasks(3);
}
} catch (Exception e) {
- System.out
- .println("unable to decrease the number of neighbors not converged on node :"
+ System.err
+ .println("Unable to decrease the number of neighbors not converged on node :"
+ recev.getHostName()
+ " count ="
+ count
count = 0;
} catch (Exception e2) {
- System.out
- .println("unable to contact the spawner :"
+ System.err
+ .println("Unable to contact the spawner: "
+ e2);
}
}
broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("le message de verification n'est pas recu:"
+ System.err
+ .println("The verification message is not received:"
+ e);
}
} else if (jaceMyId > neighId) {
state = "VERIF";
broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("le message de verification n'est pas recu:"
+ System.err
+ .println("The verification message is not received: "
+ e);
}
}
waitForAck(1);
}
} catch (Exception e) {
- System.out.println("erreur: " + e);
+ System.err.println("Error: " + e);
}
}
} else if (pseudoPerEnd == true) {
reinitializePPEr();
broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("unable to broadcast a negative verdict :"
+ System.err
+ .println("Unable to broadcast a negative verdict :"
+ e);
}
}
broadcastTasks(3);
} catch (Exception e) {
- System.out
- .println("response not received:" + e);
+ System.err
+ .println("Response not received:" + e);
Register.Instance().viewAll();
}
}
broadcastTasks(3);
} catch (Exception e) {
- System.out.println("response not received by "
+ System.err.println("Response not received by "
+ rank + ": " + e);
Register.Instance().viewAll();
}
spawnerStub.setOver(true);
// localStub.setState("FINISHED");
} catch (Exception e) {
- System.out.println("erreur erreur" + e);
+ System.err.println("Error" + e);
}
} else if (!respSent) {
int index = recievedAllRespMinusOne();
// System.out.println("send response to"+rank);
}
} catch (Exception e) {
- System.out.println("reponse non recue" + e);
+ System.err.println("Response not received" + e);
}
}
}
postReloading = false;
} catch (Exception e) {
- System.out.println(" Exception in Global Convergence :" + e);
+ System.err.println("Exception in Global Convergence :" + e);
e.printStackTrace(System.out);
Register.Instance().viewAll();
}
.getTaskIdOfRank(taskRankDest); // ///////////////////////////pb
stub = task.getHostStub();
} catch (Exception e) {
- System.out
- .println("problem in SaveTaskThread on assignation line in save : "
+ System.err
+ .println("Problem in SaveTaskThread on assignation line in save : "
+ e);
}
// System.out.println("ite " + jaceP2P_Iteration +
sent = true;
} catch (Exception e) {
- System.out
+ System.err
.println("JaceP2P_Error in Task.jaceP2P_Save() when saving stream: "
+ e);
j++;
// 5 - if stream not sent at all, do something (WHAT ???)
if (j > saveTab.length) {
- System.out
+ System.err
.println("No more alive neighbors for storing the Backup");
// TODO : what to do if no BackupNode has answered ???
}
}
} catch (Exception e) {
- System.out
- .println("node not reachable by JaceServer.saveTask() in BroadcastTaskThread :"
+ System.err
+ .println("Node not reachable by JaceServer.saveTask() in BroadcastTaskThread :"
+ e);
}
}
}
+
// instanciate the appli (the .class of the user) and load it
tsk = ((Task) c.newInstance());
} catch (Exception e) {
- System.out.println("unable to instanciate the class :" + e);
+ System.err.println("Unable to instanciate the class :" + e);
}
try {
if (b != null) {
stream.close();
} catch (Exception e) {
- System.out
+ System.err
.println("JaceP2P_Error ds TaskLauncher.loadOrReloadTask() "
+ "when converting the stream in Task : "
+ e);
tsk.setParam(Register.Instance().getParams()); // assign
// jaceArgs
- System.out.println("PAS de backup");
+ System.out.println("No backup");
}
// insert Task in taskObject, the attribute of the JaceSession class
JaceSession.Instance().addTaskObject(tsk);
- System.out.println("after add task");
+// System.out.println("After add task");
if (b != null) {
int it = b.getIteration();
tsk.nb_not_recv = tskConvg.nb_not_recv;
tsk.electedNode = tskConvg.electedNode;
tsk.respSent = tskConvg.respSent;
- System.out.println("avant le copiage des vecteurs");
+// System.out.println("avant la copie des vecteurs");
tsk.neighbors = (Vector) (tskConvg.neighbors)
.clone();
tsk.reduceAll = (Vector) (tskConvg.reduceAll)
.clone();
tsk.resp = (Vector) (tskConvg.resp).clone();
- System.out.println("apres le copiage des vecteurs");
+// System.out.println("apres la copie des vecteurs");
tsk.underTh = tskConvg.underTh;
tsk.verifNum = tskConvg.verifNum;
tsk.sendId = tskConvg.sendId;
}
}
- System.out.println("ReinitTask!!!!");
+ System.out.println("Reinit Task");
tsk.jaceP2P_ReinitTask();
tsk.postReloading = true;
tsk.reloading = false;
} else {
// initialize the task with the appli specific data (Method
// jaceP2P_InitTask() overloaded in the appli code by the user)
- System.out.println("before Init task");
+// System.out.println("Before Init task");
tsk.jaceP2P_InitTask();
- System.out.println("after Init task");
+// System.out.println("After Init task");
}
if (LocalHost.Instance().getStartedThreads() == false) {
Thread.currentThread().yield();
} catch (Exception e) {
- System.out.println("PB in TaskLauncher.loadOrReloadTask() : " + e);
+ System.err.println("Problem in TaskLauncher.loadOrReloadTask() : " + e);
e.printStackTrace(System.out);
}
}
public void setToken() {
token = true;
ScanThreadSuperNode.Instance().setToken(false);
- System.out.println("the token is put to true in the tokenthread");
+ System.out.println("The token is put to true in the tokenthread");
try {
synchronized (TokenThread.Instance()) {
TokenThread.Instance().notify();
}
} catch (Exception e) {
- System.out.println("unable to notify :" + e);
+ System.err.println("Unable to notify :" + e);
}
// System.out.println("finished set token");
}
new ForwardCount().start();
} catch (Exception e) {
- System.out
- .println("unable to send surplus to "
+ System.err
+ .println("Unable to send surplus to "
+ ((SuperNodeData) liste
.get(i)).getIP()
+ " :" + e);
System.out.println("Passing token to " + index);
} catch (Exception e) {
try {
- System.out.println("Unable to send Token to "
+ System.err.println("Unable to send Token to "
+ ((SuperNodeData) liste.elementAt(index)).getIP()
+ " :" + e);
/*
.intValue()).getHostName();
try {
- // whatever the case, uate the Register on each Node
+ // whatever the case, update the Register on each Node
// JaceSpawnerInterface
// ja=Register.Instance().getSpawnerStub();
// System.out.println("avant update register");
- // 0 l'applejaacoja commence
stub.updateRegister(g, stubVoisin, 0);
// System.out.println(" after update register");
}
} catch (Exception e) {
- System.out
+ System.err
.println(name
+ " ("
+ LocalHost.Instance()
JaceInterface stub = id.getHostStub();
stub.updateRegister(oldNode, node);
} catch (Exception e) {
- System.out
+ System.err
.println(name
+ " ("
+ LocalHost.Instance().resolve(name)
}
}
} catch (Exception e2) {
- System.out.println("error in updateRegisterConcernedThread :"
+ System.err.println("Error in updateRegisterConcernedThread :"
+ e2);
}
}
}
} catch (Exception e) {
- System.out.println(name + " ("
+ System.err.println(name + " ("
+ LocalHost.Instance().resolve(name) + " rank=" + index
+ ") cannot be reached by UpdateRegisterThread "
+ " size : " + Register.Instance().getSize() + " :"