public class MatrixDeployer extends InstanceDeployer
Constructor and Description |
---|
MatrixDeployer(java.util.Properties streamingProperties,
java.lang.String commType)
Initializes the deployer.
|
Modifier and Type | Method and Description |
---|---|
void |
createBenchmarkMatrices(java.lang.String filenameA,
int numOfRowsA,
int numOfColumnsA,
java.lang.String filenameB,
int numOfRowsB,
int numOfColumnsB)
Creates benchmark Matrices based on the specified arguments.
|
void |
generateMatrixARowStreams(int numOfRows,
int numOfColumns,
int numOfDeployedMaps)
Generates a set of column streams for the specified range of row streams.
|
void |
generateMatrixStreams(int size,
int rowA,
int columnB) |
void |
generateWorkload(int numOfRows,
int numOfColumns,
int maxMapsPerMachine,
int numOfMachines)
Generates workloads for the various
MatrixMap instances that
have been deployed on the available resources. |
MatrixMap |
initializeMatrixMap(int row,
int column,
int numOfEntries)
Initializes a
MatrixMap instance based on the specified
arguments. |
static void |
main(java.lang.String[] args) |
void |
onEvent(NBEvent nbEvent) |
completedExecution, completedSuccessfully, completedWithErrors, createJobIdentifier, deployOperations, deployOperations, deployOperations, getStatus, initialize, initialize, initialize, killJob, refreshStatus, refreshStatus, resetTrackers, setStartTime, startedExecution
public MatrixDeployer(java.util.Properties streamingProperties, java.lang.String commType) throws ServiceException, CommunicationsException, java.io.IOException, MarshallingException, DeploymentException
streamingProperties
- The properties for streamingcommType
- The communications typeCommunicationsException
- If there are network problems during communicationsjava.io.IOException
- If there are IO problemsMarshallingException
- If there are marshalling errosDeploymentException
- If there are deployment related problemsServiceException
public void createBenchmarkMatrices(java.lang.String filenameA, int numOfRowsA, int numOfColumnsA, java.lang.String filenameB, int numOfRowsB, int numOfColumnsB) throws java.io.IOException
filenameA
- The file containing matrix-AnumOfRowsA
- The number of rows in matrix-AnumOfColumnsA
- The number of columns in matrix-AfilenameB
- The file containing matrix-BnumOfRowsB
- The number of rows in matrix-BnumOfColumnsB
- The number of columns in matrix-Bjava.io.IOException
- If there are IO problems during the read/write operations.public MatrixMap initializeMatrixMap(int row, int column, int numOfEntries) throws DatasetException, MapReduceException
MatrixMap
instance based on the specified
arguments.row
- The row-id of matrix-Acolumn
- The column-id of matrix-BnumOfEntries
- The number of entries that need to be proceed.MatrixMap
instanceDatasetException
- If there are problems initializing/using the datasetsMapReduceException
- If there are problems related to Map/Reduce roles within the
application.public void generateWorkload(int numOfRows, int numOfColumns, int maxMapsPerMachine, int numOfMachines) throws DatasetException, MapReduceException, CommunicationsException, DeploymentException, MarshallingException, java.lang.InterruptedException, ServiceException, NBEventException, java.io.IOException
MatrixMap
instances that
have been deployed on the available resources.numOfRows
- The number of rows in the matrixnumOfColumns
- The number of columns in the matrixmaxMapsPerMachine
- The number of maximum map instances on a given machinenumOfMachines
- The number of resources that should be utilized.DatasetException
- If there are problems initializing the datasetsMapReduceException
- If there is a MapReduceExcecution because of problems when
setting up the roles.java.io.IOException
- If there are IO problems.CommunicationsException
- If there are network problems during communicationsDeploymentException
- If there are deployment related problemsMarshallingException
- If there are marshalling problems.java.lang.InterruptedException
- If there are problems sleepingServiceException
- This is a streaming substrate specific exceptionNBEventException
- If there are problems constructing stream fragments.public void generateMatrixARowStreams(int numOfRows, int numOfColumns, int numOfDeployedMaps) throws ServiceException, NBEventException, java.io.IOException, MarshallingException, java.lang.InterruptedException, CommunicationsException
numOfRows
- The number of rows that need to be generatednumOfColumns
- The number of columns within the matrixnumOfDeployedMaps
- The number of deployed mapsjava.io.IOException
- If there are IO problems.CommunicationsException
- If there are network problems during communicationsDeploymentException
- If there are deployment related problemsMarshallingException
- If there are marshalling problems.java.lang.InterruptedException
- If there are problems sleepingServiceException
- This is a streaming substrate specific exceptionNBEventException
- If there are problems constructing stream fragments.public void generateMatrixStreams(int size, int rowA, int columnB) throws ServiceException, NBEventException, java.io.IOException, MarshallingException, java.lang.InterruptedException
ServiceException
NBEventException
java.io.IOException
MarshallingException
java.lang.InterruptedException
public void onEvent(NBEvent nbEvent)
public static void main(java.lang.String[] args)