org.griphyn.cPlanner.prodigy
Class Client

java.lang.Object
  extended byorg.griphyn.cPlanner.prodigy.Client

public class Client
extends Object

The client to the Prodigy server, that sets up the connection to prodigy and sends messages to the server that point Prodigy image to the dax file that needs to be planned.

Version:
$Revision: 1.4 $
Author:
Sonal Jain, Karan Vahi

Nested Class Summary
(package private)  class Client.StreamGobbler
          Inner Class to take care of handling the stdout and stderr of the prodigy process that is invoked in the client.
 
Field Summary
private  Client.StreamGobbler mErrorGobbler
          The stream gobblers to pipe the stdout and stderr of the prodigy image to connectors stdout and stderr
private  LogManager mLogger
          The LogManager object which logs the Pegasus messages.
private  String mLogMsg
          The String which contains the messages to be logged.
private  Client.StreamGobbler mOutputGobbler
           
private  PlannerOptions mPOptions
          The object containing all the options passed to the Concrete Planner.
private  String mProdigyPath
          The path to the prodigy image that runs the Prodigy manner.
private  PegasusProperties mProps
          The handle to the property object holding all the properties pertaining to Pegasus.
static int PORT_NUMBER
          The port number at which the LISP image is running.
 
Constructor Summary
Client()
          The default constructor.
 
Method Summary
 String[] callPConsumers(String logicalId)
          Call "consumers" function in prodigy.
 String callPHostForJob(String logicalId)
          Calls "host-for-job" function in prodigy.
 String callPSourceForFile(String lfn, String logicalId)
          Calls "source-for-file" function in prodigy.
 void close()
          Disconnects from the prodigy image.
 boolean connect()
          Connects to the prodigy image.
 void run()
          Sends the commands to prodigy image to get it working on the dax and to generate a plan.
 void setPlannerOptions(PlannerOptions options)
          Sets the planner options.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT_NUMBER

public static final int PORT_NUMBER
The port number at which the LISP image is running.

See Also:
Constant Field Values

mLogger

private LogManager mLogger
The LogManager object which logs the Pegasus messages.


mLogMsg

private String mLogMsg
The String which contains the messages to be logged.


mProps

private PegasusProperties mProps
The handle to the property object holding all the properties pertaining to Pegasus.


mProdigyPath

private String mProdigyPath
The path to the prodigy image that runs the Prodigy manner.


mPOptions

private PlannerOptions mPOptions
The object containing all the options passed to the Concrete Planner.


mErrorGobbler

private Client.StreamGobbler mErrorGobbler
The stream gobblers to pipe the stdout and stderr of the prodigy image to connectors stdout and stderr


mOutputGobbler

private Client.StreamGobbler mOutputGobbler
Constructor Detail

Client

public Client()
The default constructor.

Method Detail

setPlannerOptions

public void setPlannerOptions(PlannerOptions options)
Sets the planner options.


connect

public boolean connect()
Connects to the prodigy image.

Returns:
boolean denoting whether connection was opened successfully or not.

run

public void run()
Sends the commands to prodigy image to get it working on the dax and to generate a plan.


callPHostForJob

public String callPHostForJob(String logicalId)
Calls "host-for-job" function in prodigy.

Parameters:
logicalId -
Returns:
String the containing name of the host if found else "none".

callPSourceForFile

public String callPSourceForFile(String lfn,
                                 String logicalId)
Calls "source-for-file" function in prodigy.

Parameters:
lfn -
logicalId -
Returns:
String the containing pfn if its is a stage in job else "none".

callPConsumers

public String[] callPConsumers(String logicalId)
Call "consumers" function in prodigy.

Parameters:
logicalId -
Returns:
String the containing pfn if its is a stage in job else "none".

close

public void close()
Disconnects from the prodigy image.



Copyright © 2003 The University of Chicago and The University of Southern California. All Rights Reserved.