executing
Class MapperSideExecuter_Xgrid

java.lang.Object
  extended by executing.MapperSideExecuter
      extended by executing.MapperSideExecuter_Xgrid
All Implemented Interfaces:
java.io.Serializable

public class MapperSideExecuter_Xgrid
extends MapperSideExecuter

Xgrid implementation of an execution layer. This layer communicates with the CompletionAnnouncer_Xgrid object in the servers.

Author:
Majd Kokaly
See Also:
MapperSideExecuter, Serialized Form

Field Summary
 
Fields inherited from class executing.MapperSideExecuter
NOT_IMPLEMENTED
 
Constructor Summary
MapperSideExecuter_Xgrid()
           
 
Method Summary
 long deleteJob(long id, java.lang.String hostname, java.lang.String password)
          This method deletes the job with id "id" on hostname "hostname".
 double getActiveCPU(long id, java.lang.String hostname, java.lang.String password)
           
 int getCompletionAnnouncer_XgridPort()
           
 java.lang.String getDateStarted(long id, java.lang.String hostname, java.lang.String password)
           
 java.lang.String getDateStopped(long id, java.lang.String hostname, java.lang.String password)
           
 java.lang.String getJobStatus(long id, java.lang.String hostname, java.lang.String password)
           
 java.lang.String getKeyBeforeEqual(java.lang.String input)
           
 double getPercentageDone(long id, java.lang.String hostname, java.lang.String password)
          This methods returns percentage done when given the id of job.
 java.lang.String getValueAfterEqual(java.lang.String input)
           
 void notifyCompletionAnnouncer(java.lang.String serverHostName, int serverID, long xgridID, long jobID)
          This method notifies the Completion Announcer that a job has been submitted to the server The message format is: jobID#secondaryJobID#ServerNumber#TimeExpectedForJobToTake
 void setCompletionAnnouncer_XgridPort(int completionAnnouncer_XgridPort)
           
 void startExecuter()
          Nothing to start/
 long stopJob(long id, java.lang.String hostname, java.lang.String password)
          This method stops the job with id "id" on hostname "hostname"\
 long submitLoopJob(java.lang.String hostName, java.lang.String password, int serverID, long jobID, long iter, double ratio)
          This method sends a job to the specific Server using the Xgrid technology.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperSideExecuter_Xgrid

public MapperSideExecuter_Xgrid()
Method Detail

getCompletionAnnouncer_XgridPort

public int getCompletionAnnouncer_XgridPort()

setCompletionAnnouncer_XgridPort

public void setCompletionAnnouncer_XgridPort(int completionAnnouncer_XgridPort)

startExecuter

public void startExecuter()
Nothing to start/

Specified by:
startExecuter in class MapperSideExecuter

submitLoopJob

public long submitLoopJob(java.lang.String hostName,
                          java.lang.String password,
                          int serverID,
                          long jobID,
                          long iter,
                          double ratio)
This method sends a job to the specific Server using the Xgrid technology.

Specified by:
submitLoopJob in class MapperSideExecuter
Parameters:
hostName - is the server that a job is sent to
password - is the xgrid password
serverID - is the id assigned to the server. (The coloumn in the Mue matrix)
jobID - is the jobID assigned to that Job by the Mapper
iter - is the iterations of the loop job. (Please see Appendix D)
ratio - is the ratio that this loop job is adjusted by.
Returns:
a number that the Xgrid gave as an ID for the submitted job.

notifyCompletionAnnouncer

public void notifyCompletionAnnouncer(java.lang.String serverHostName,
                                      int serverID,
                                      long xgridID,
                                      long jobID)
                               throws java.io.IOException
This method notifies the Completion Announcer that a job has been submitted to the server The message format is: jobID#secondaryJobID#ServerNumber#TimeExpectedForJobToTake

Parameters:
jobID - the id of the job object that is sent to the server.
serverID - is the ID of the server that will execute the job
Throws:
java.io.IOException
See Also:
CompletionAnnouncer_Xgrid

getPercentageDone

public double getPercentageDone(long id,
                                java.lang.String hostname,
                                java.lang.String password)
This methods returns percentage done when given the id of job.

Specified by:
getPercentageDone in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
Returns:
the percentage done from job with job id "id"
See Also:
MapperSideExecuter.getPercentageDone(long, String, String)

getDateStarted

public java.lang.String getDateStarted(long id,
                                       java.lang.String hostname,
                                       java.lang.String password)
Specified by:
getDateStarted in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job.
Returns:
the date when the job with id "id" has started.
See Also:
MapperSideExecuter.getDateStarted(long, String, String)

getDateStopped

public java.lang.String getDateStopped(long id,
                                       java.lang.String hostname,
                                       java.lang.String password)
Specified by:
getDateStopped in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
Returns:
the date when the job with id "id" has stopped.
See Also:
MapperSideExecuter.getDateStopped(long, String, String)

getJobStatus

public java.lang.String getJobStatus(long id,
                                     java.lang.String hostname,
                                     java.lang.String password)
Specified by:
getJobStatus in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
Returns:
the status of the job with id "id" (e.g. Runnung, Done)
See Also:
MapperSideExecuter.getJobStatus(long, String, String)

getActiveCPU

public double getActiveCPU(long id,
                           java.lang.String hostname,
                           java.lang.String password)

stopJob

public long stopJob(long id,
                    java.lang.String hostname,
                    java.lang.String password)
Description copied from class: MapperSideExecuter
This method stops the job with id "id" on hostname "hostname"\

Specified by:
stopJob in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
Returns:
NOT_IMPLEMENTED if not implemented
See Also:
MapperSideExecuter.stopJob(long, String, String)

deleteJob

public long deleteJob(long id,
                      java.lang.String hostname,
                      java.lang.String password)
Description copied from class: MapperSideExecuter
This method deletes the job with id "id" on hostname "hostname".

Specified by:
deleteJob in class MapperSideExecuter
Parameters:
id - is job id
hostname - is the hostname of the server executing that job
Returns:
NOT_IMPLEMENTED if not implemented
See Also:
MapperSideExecuter.deleteJob(long, String, String)

getKeyBeforeEqual

public java.lang.String getKeyBeforeEqual(java.lang.String input)
Parameters:
input - String
Returns:
a String that preceded the char =

getValueAfterEqual

public java.lang.String getValueAfterEqual(java.lang.String input)
Parameters:
input - String
Returns:
a String that followed the char =