|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.griphyn.cPlanner.simulator.DAX2Sim
This is a simple helper class that parses the abstract workflow in DAX format and writes out another xml based workflow that is understood by the simulator developed by Jaskaran that is used to model the various planning techniques.
| Field Summary | |
static double |
COMPUTE_MUL_FACTOR
|
static int |
DATA_MUL_FACTOR
|
ADag |
mDag
The object holding the abstract workflow that is referred to in the dax file supplied. |
String |
mOutputFile
The name of the output file that is to be generated. |
FileWriter |
mWriteHandle
The write handle to the output xml file. |
| Constructor Summary | |
DAX2Sim(ADag dag,
String outputFile)
The overloaded constructor. |
|
| Method Summary | |
private void |
close()
Closes the file descriptor. |
void |
convert2XML()
This is the method the converts the ADag object to the xml output file. |
void |
generateNSInputFile(ADag dag,
int numSites,
String outputFile)
This generates the ns simulator file, that is required for the prepopulation of the input files that are normally gotten through RLS. |
double |
getEstimatedExecTime(String logicalName)
Returns the estimated execution time for a job. |
NameValue |
getInputFileSize(String logicalName)
Returns the estimated input filesize for a job. |
private String |
getNSLine(String ipFile,
int numSites)
Gets the corresponding ns configuration line, that is required to set up that input file in the simulator. |
NameValue |
getOutputFileSize(String logicalName)
Returns the estimated output filesize for a job. |
private int |
getSimUnits(String units)
|
NameValue |
getSizeOfFileInMB(String file)
Returns the filesize of a given in MB. |
String |
getXMLHeader()
Returns the xml header for the output xml file. |
private void |
initializeWriteFileHandle(String outputFile)
Initialisez the write file handle. |
boolean |
inputFileValid(String file)
Whether the input file is valid for Montage domain or not. |
static void |
main(String[] args)
The main method of the client. |
String |
PCRelation2XML(PCRelation pcrel)
Returns the xml description of the PCRelation object , in the form of an xml element that is used for the construction of the xml file that is read by the simulator. |
String |
PegasusFile2XML(PegasusFile pf,
NameValue size,
int type)
Returns the xml description of the PegasusFile object , in the form of an xml element that is used for the construction of the xml file that is read by the simulator. |
String |
SubInfo2XML(SubInfo sub)
Returns the xml description of the job that is understood by the simulator. |
private void |
writeString(String st)
Writes a string to the associated write handle with the class |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static double COMPUTE_MUL_FACTOR
public static int DATA_MUL_FACTOR
public ADag mDag
public String mOutputFile
public FileWriter mWriteHandle
| Constructor Detail |
public DAX2Sim(ADag dag,
String outputFile)
dag - the dag object containing the abstract workflow corresponding
to the dax file.outputFile - the name of the output file that is generated for the
simulator.| Method Detail |
private void initializeWriteFileHandle(String outputFile)
outputFile - the name of the file that has to be generated.public void convert2XML()
public String SubInfo2XML(SubInfo sub)
sub - the SubInfo object containing the job description.
public String PegasusFile2XML(PegasusFile pf,
NameValue size,
int type)
pf - the PegasusFile object to be converted.size - size of the file .type - 0 -> an input file
1 -> output file
public String PCRelation2XML(PCRelation pcrel)
pcrel - the PCRelation object to be converted.
private void writeString(String st)
private void close()
public double getEstimatedExecTime(String logicalName)
logicalName - the logical name of the job
public NameValue getInputFileSize(String logicalName)
logicalName - the logical name of the file
NameValuepair where name refers to the value
and key to units.public NameValue getOutputFileSize(String logicalName)
logicalName - the logical name of file
NameValuepair where name refers to the value
and key to units.public String getXMLHeader()
public void generateNSInputFile(ADag dag,
int numSites,
String outputFile)
dag - the ADag object that contains the things.numSites - the number of sites around which they need to be
distributed.outputFile - the name of the output file that has to be generated.
private String getNSLine(String ipFile,
int numSites)
ipFile - the logical name of the input file.numSites - the number of execute sites.
private int getSimUnits(String units)
public boolean inputFileValid(String file)
file - the logical name of the file.
public NameValue getSizeOfFileInMB(String file)
file - the logical name of the file.
NameValuepair where name refers to the value
and key to units.public static void main(String[] args)
args - The arguments to the client.
arg[0] the name of the dax file
arg[1] the name of the output xml file used by the simulator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||