Commits

Cristian Viorel Pasat committed cae27e2 Draft

deleted some files

Comments (0)

Files changed (5)

how to

-		... use this piece of software?
-		
-		
-Pretty simple: the TestClass in package main holds the main method.
-Using it you can do wonderful things! (more or less related to this programs' scope.
-
-
-This program is used to read the data from a json file, 
-populate it's related beans accordingly and provide methods 
-for calculating resource load and relocation cost.
-
-The content of the packages otherClasses and allTasksVariablesComputator
-contain the main classes while the packages Beans and fileIO
-represent the dependencies.
-
-
-PopulateBean is used to read the the json file 
-located in the docs folder verify it's content and populate the class
-GigaBean.
-At the creation of a PopulateBean object, the content of the json is 
-compared to the data found in the files all_tasks_variables.txt and 
-single_task_variables.txt found in the docs folder. 
-
-GigaBean is made of 2 other beans: FromMachineBean and ToMachineBean,
-which contain information regarding the load state of a machine.
-
-
-AllTasksVariablesComputator is used to compute different resource 
-loads or relocation costs and implements iAllTasksVariablesComputator.
-At instantiation, the constructor receives a Vector containing all 
-the nodes created so far.
-The objects returned in a MinMaxResource bean containing the ID of 
-a node and the respective load/cost.
-
-
-MakeJson is used to create a json object from a bean. (this is done pretty straight forward)
-
-
-interpret groovy====>>>>>
-

methods to be implemented for single_task_variables - condition

-resource_load (CPU, memory, disk): exists for both Node and Partition, so which one to use?
-
-monetary_cost ( $ ), 
-transport_cost (throughput in s), 
-resource_execution_cost ( s ): DO NOT EXIST =>
-=> need to be implemented. 

methods to be implemented for single_task_variables - condition.txt

 
 monetary_cost ( $ ), 
 transport_cost (throughput in s), 
-resource_execution_cost ( s ): DO NOT EXIST =>
-=> need to be implemented. 
+resource_execution_cost ( s ): DOES NOT EXIST =>
+=> needs to be implemented. 

src/TestClass.java

-import org.apache.log4j.Logger;
-import org.apache.log4j.PropertyConfigurator;
-
-import otherClasses.GenerateAllTasksVariables;
-import otherClasses.MakeJson;
-import otherClasses.PopulateBean;
-
-/**
- * Class used for testing all the stuff written.
- * @author The Best Pessimist
- *
- */
-public class TestClass {
-	
-	static Logger log = Logger.getLogger (MakeJson.class.getName());
-//	 this has to be put in every class where i want to use the logger
-
-	
-	public static void main(String args[]) throws Exception {
-		PropertyConfigurator.configure("logging.properties");
-		log.info("\nTesting started...");
-//		 this has to be put only one in the main function, so that logger knows
-//																		 its configuration
-
-		PopulateBean pb = new PopulateBean();
-		GenerateAllTasksVariables  ATV = new GenerateAllTasksVariables();
-		
-		
-		
-		
-		/*
-		InterpretGroovy ig = new InterpretGroovy();
-//		this is a string, so i can cancatenate other stuff as a parameter
-//		ig.interpretGroovy ("resource_load=677 \n  monetary_cost=7 \n" + pb.getGigaBean().getFrom_machine().getCondition());
-//		groovy interpreter is working!
-		
-		JSONObject jObj =  MakeJson.makeJson(pb.getGigaBean());
-//		System.out.println(jObj);
-//		creating json objects from bean works!
-
-*/
-
-		
-		
-		log.info("Exiting successfully the program...\n\n");
-	}
-
-}

src/WorkingWithVectors.java

-import java.util.Vector;
-
-
-public class WorkingWithVectors {
-
-	/**
-	 * @param args
-	 * 
-	 * Simple using of class Vector. 
-	 * Nothing to do here!
-	 * 
-	 */
-	public static void main(String[] args) throws Exception {
-		// TODO Auto-generated method stub
-		
-		Vector<Integer> vecti = new Vector<Integer>();	
-//		Vector trebuie sa primeasca o clasa, de aceea am folosit "Integer", 
-//		si nu int.  
-		
-		for (int i = 1; i <=123456; ++i)
-			vecti.add( (2*(7*i+486*i/2)%191*i) ); 	// se vede k e facuta de mine :D
-		
-		for (int i = 1; i < 123456; ++i)
-			System.out.println (vecti.get(i)); 		// il afisez
-
-	}
-
-}