Repository: systemml Updated Branches: refs/heads/master 583f34480 -> a839b30b2
http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java b/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java index b4c6c95..6fc7399 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/RandomMatrixGenerator.java @@ -59,10 +59,8 @@ public class RandomMatrixGenerator { * @param rpb rows per block * @param cpb columns per block * @param sp sparsity (0 = completely sparse, 1 = completely dense) - * @throws DMLRuntimeException if error */ - public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp) throws DMLRuntimeException - { + public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp) { this(pdf, r, c, rpb, cpb, sp, Double.NaN, Double.NaN); } @@ -76,10 +74,8 @@ public class RandomMatrixGenerator { * @param sp sparsity (0 = completely sparse, 1 = completely dense) * @param min minimum of range of random numbers * @param max maximum of range of random numbers - * @throws DMLRuntimeException if error */ - public RandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException - { + public RandomMatrixGenerator(String pdfStr, int r, int c, int rpb, int cpb, double sp, double min, double max) { init(PDF.valueOf(pdfStr.toUpperCase()), r, c, rpb, cpb, sp, min, max); } @@ -93,10 +89,8 @@ public class RandomMatrixGenerator { * @param sp sparsity (0 = completely sparse, 1 = completely dense) * @param min minimum of range of random numbers * @param max maximum of range of random numbers - * @throws DMLRuntimeException if error */ - public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException - { + public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) { init(pdf, r, c, rpb, cpb, sp, min, max); } @@ -110,10 +104,8 @@ public class RandomMatrixGenerator { * @param sp sparsity (0 = completely sparse, 1 = completely dense) * @param min minimum of range of random numbers * @param max maximum of range of random numbers - * @throws DMLRuntimeException if error */ - public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) throws DMLRuntimeException - { + public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max) { _pdf = pdf; _rows = r; _cols = c; @@ -137,10 +129,8 @@ public class RandomMatrixGenerator { * @param min minimum of range of random numbers * @param max maximum of range of random numbers * @param mean the poisson mean - * @throws DMLRuntimeException if error */ - public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) throws DMLRuntimeException - { + public RandomMatrixGenerator(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) { init(pdf, r, c, rpb, cpb, sp, min, max, mean); } @@ -155,10 +145,8 @@ public class RandomMatrixGenerator { * @param min minimum of range of random numbers * @param max maximum of range of random numbers * @param mean the poisson mean - * @throws DMLRuntimeException if error */ - public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) throws DMLRuntimeException - { + public void init(PDF pdf, int r, int c, int rpb, int cpb, double sp, double min, double max, double mean) { _pdf = pdf; _rows = r; _cols = c; @@ -171,8 +159,7 @@ public class RandomMatrixGenerator { setupValuePRNG(); } - protected void setupValuePRNG() throws DMLRuntimeException - { + protected void setupValuePRNG() { switch (_pdf) { case NORMAL: _valuePRNG = new NormalPRNGenerator(); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java b/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java index 8429d35..d5edf48 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/SinglePrecisionCudaSupportFunctions.java @@ -25,7 +25,6 @@ import static jcuda.runtime.cudaMemcpyKind.cudaMemcpyHostToDevice; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.sysml.api.DMLScript; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.instructions.gpu.GPUInstruction; import org.apache.sysml.runtime.instructions.gpu.context.GPUContext; import org.apache.sysml.utils.GPUStatistics; @@ -163,7 +162,7 @@ public class SinglePrecisionCudaSupportFunctions implements CudaSupportFunctions } @Override - public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) throws DMLRuntimeException { + public void deviceToHost(GPUContext gCtx, Pointer src, double[] dest, String instName, boolean isEviction) { long t1 = DMLScript.FINEGRAINED_STATISTICS && instName != null? System.nanoTime() : 0; // We invoke transfer matrix from device to host in two cases: // 1. During eviction of unlocked matrices @@ -193,7 +192,7 @@ public class SinglePrecisionCudaSupportFunctions implements CudaSupportFunctions } @Override - public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) throws DMLRuntimeException { + public void hostToDevice(GPUContext gCtx, double[] src, Pointer dest, String instName) { LOG.debug("Potential OOM: Allocated additional space in hostToDevice"); // TODO: Perform conversion on GPU using double2float and float2double kernels long t1 = DMLScript.FINEGRAINED_STATISTICS && instName != null? System.nanoTime() : 0; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java index faad3d2..8229dba 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedCell.java @@ -55,9 +55,7 @@ public class WeightedCell extends MatrixCell out.writeDouble(weight); } - private static WeightedCell checkType(MatrixValue cell) - throws DMLRuntimeException - { + private static WeightedCell checkType(MatrixValue cell) { if( cell!=null && !(cell instanceof WeightedCell)) throw new DMLRuntimeException("the Matrix Value is not WeightedCell!"); return (WeightedCell) cell; @@ -120,24 +118,21 @@ public class WeightedCell extends MatrixCell @Override public MatrixValue aggregateUnaryOperations(AggregateUnaryOperator op, MatrixValue result, int brlen, int bclen, - MatrixIndexes indexesIn) throws DMLRuntimeException { + MatrixIndexes indexesIn) { super.aggregateUnaryOperations(op, result, brlen, bclen, indexesIn); WeightedCell c3=checkType(result); c3.setWeight(weight); return c3; } - //TODO: how to handle -minus left vs. minus right @Override - public void denseScalarOperationsInPlace(ScalarOperator op) - throws DMLRuntimeException { + public void denseScalarOperationsInPlace(ScalarOperator op) { value=op.executeScalar(value); } @Override public MatrixValue reorgOperations(ReorgOperator op, MatrixValue result, - int startRow, int startColumn, int length) - throws DMLRuntimeException { + int startRow, int startColumn, int length) { super.reorgOperations(op, result, startRow, startColumn, length); WeightedCell c3=checkType(result); c3.setWeight(weight); @@ -145,9 +140,7 @@ public class WeightedCell extends MatrixCell } @Override - public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) - throws DMLRuntimeException - { + public MatrixValue scalarOperations(ScalarOperator op, MatrixValue result) { WeightedCell c3=checkType(result); c3.setValue(op.fn.execute(value, op.getConstant())); c3.setWeight(weight); @@ -155,20 +148,17 @@ public class WeightedCell extends MatrixCell } @Override - public void sparseScalarOperationsInPlace(ScalarOperator op) - throws DMLRuntimeException { + public void sparseScalarOperationsInPlace(ScalarOperator op) { value=op.executeScalar(value); } @Override - public void sparseUnaryOperationsInPlace(UnaryOperator op) - throws DMLRuntimeException { + public void sparseUnaryOperationsInPlace(UnaryOperator op) { value=op.fn.execute(value); } @Override - public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) - throws DMLRuntimeException { + public MatrixValue unaryOperations(UnaryOperator op, MatrixValue result) { WeightedCell c3=checkType(result); c3.setValue(op.fn.execute(value)); c3.setWeight(weight); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java index a255272..2dbca6b 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/data/WeightedPair.java @@ -52,8 +52,7 @@ public class WeightedPair extends WeightedCell out.writeDouble(weight); } - private static WeightedPair checkType(MatrixValue cell) throws DMLRuntimeException - { + private static WeightedPair checkType(MatrixValue cell) { if( cell!=null && !(cell instanceof WeightedPair)) throw new DMLRuntimeException("the Matrix Value is not WeightedPair!"); return (WeightedPair) cell; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java index 8122dcd..c9e95b1 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/DistributedCacheInput.java @@ -87,9 +87,7 @@ public class DistributedCacheInput _pformat = null; } - public IndexedMatrixValue getDataBlock(int rowBlockIndex, int colBlockIndex) - throws DMLRuntimeException - { + public IndexedMatrixValue getDataBlock(int rowBlockIndex, int colBlockIndex) { //probe missing block (read on-demand) if( dataBlocks==null || dataBlocks[rowBlockIndex-1][colBlockIndex-1]==null ) readDataBlocks( rowBlockIndex, colBlockIndex ); @@ -98,37 +96,27 @@ public class DistributedCacheInput return dataBlocks[rowBlockIndex-1][colBlockIndex-1]; } - public double[] getRowVectorArray() - throws DMLRuntimeException - { + public double[] getRowVectorArray() { double[] ret = new double[(int)_clen]; - for( int j=0; j<_clen; j+=_bclen ) { MatrixBlock mb = (MatrixBlock) getDataBlock(1, (int)Math.ceil((double)(j+1)/_bclen)).getValue(); double[] mbtmp = DataConverter.convertToDoubleVector(mb, false); System.arraycopy(mbtmp, 0, ret, j, mbtmp.length); } - return ret; } - public double[] getColumnVectorArray() - throws DMLRuntimeException - { + public double[] getColumnVectorArray() { double[] ret = new double[(int)_rlen]; - for( int j=0; j<_rlen; j+=_brlen ) { MatrixBlock mb = (MatrixBlock) getDataBlock((int)Math.ceil((double)(j+1)/_brlen),1).getValue(); double[] mbtmp = DataConverter.convertToDoubleVector(mb, false); System.arraycopy(mbtmp, 0, ret, j, mbtmp.length); } - return ret; } - private void readDataBlocks( int rowBlockIndex, int colBlockIndex ) - throws DMLRuntimeException - { + private void readDataBlocks( int rowBlockIndex, int colBlockIndex ) { //get filename for rowblock/colblock String fname = _localFilePath.toString(); if( isPartitioned() ) @@ -156,30 +144,23 @@ public class DistributedCacheInput } } - private boolean isPartitioned() - { + private boolean isPartitioned() { return (_pformat != PDataPartitionFormat.NONE); } - private String getPartitionFileName( int rowBlockIndex, int colBlockIndex ) - throws DMLRuntimeException - { + private String getPartitionFileName( int rowBlockIndex, int colBlockIndex ) { long partition = -1; - switch( _pformat ) - { - case ROW_BLOCK_WISE_N: - { + switch( _pformat ) { + case ROW_BLOCK_WISE_N:{ long numRowBlocks = (long)Math.ceil(((double)PARTITION_SIZE)/_clen/_brlen); partition = (rowBlockIndex-1)/numRowBlocks + 1; break; } - case COLUMN_BLOCK_WISE_N: - { + case COLUMN_BLOCK_WISE_N: { long numColBlocks = (long)Math.ceil(((double)PARTITION_SIZE)/_rlen/_bclen); partition = (colBlockIndex-1)/numColBlocks + 1; break; } - default: throw new DMLRuntimeException("Unsupported partition format for distributed cache input: "+_pformat); } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java index dc18b1d..6a9dc23 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRBaseForCommonInstructions.java @@ -138,18 +138,14 @@ public class MRBaseForCommonInstructions extends MapReduceBase } } - protected void processMixedInstructions(ArrayList<MRInstruction> mixed_instructions) - throws DMLRuntimeException - { + protected void processMixedInstructions(ArrayList<MRInstruction> mixed_instructions) { if( mixed_instructions != null ) for( MRInstruction ins : mixed_instructions ) processOneInstruction(ins, valueClass, cachedValues, tempValue, zeroInput); } protected void processOneInstruction(MRInstruction ins, Class<? extends MatrixValue> valueClass, - CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput) - throws DMLRuntimeException - { + CachedValueMap cachedValues, IndexedMatrixValue tempValue, IndexedMatrixValue zeroInput) { //Timing time = new Timing(true); if ( ins instanceof AggregateBinaryInstruction ) { http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java index 1c233fe..1db292f 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/MRJobConfiguration.java @@ -395,9 +395,7 @@ public class MRJobConfiguration } - public static void setOutputInfo(JobConf job, int i, OutputInfo outputinfo, boolean sourceInBlock) - throws DMLRuntimeException - { + public static void setOutputInfo(JobConf job, int i, OutputInfo outputinfo, boolean sourceInBlock) { Class<? extends Converter> converterClass; if(sourceInBlock) { @@ -454,50 +452,43 @@ public class MRJobConfiguration return outputConverter; } - public static MRInstruction[] getInstructionsInReducer(JobConf job) throws DMLRuntimeException - { + public static MRInstruction[] getInstructionsInReducer(JobConf job) { String str=job.get(INSTRUCTIONS_IN_REDUCER_CONFIG); MRInstruction[] mixed_ops = MRInstructionParser.parseMixedInstructions(str); return mixed_ops; } - public static ReblockInstruction[] getReblockInstructions(JobConf job) throws DMLRuntimeException - { + public static ReblockInstruction[] getReblockInstructions(JobConf job) { String str=job.get(REBLOCK_INSTRUCTIONS_CONFIG); ReblockInstruction[] reblock_instructions = MRInstructionParser.parseReblockInstructions(str); return reblock_instructions; } - public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) throws DMLRuntimeException - { + public static CSVReblockInstruction[] getCSVReblockInstructions(JobConf job) { String str=job.get(CSV_REBLOCK_INSTRUCTIONS_CONFIG); CSVReblockInstruction[] reblock_instructions = MRInstructionParser.parseCSVReblockInstructions(str); return reblock_instructions; } - public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) throws DMLRuntimeException - { + public static CSVWriteInstruction[] getCSVWriteInstructions(JobConf job) { String str=job.get(CSV_WRITE_INSTRUCTIONS_CONFIG); CSVWriteInstruction[] reblock_instructions = MRInstructionParser.parseCSVWriteInstructions(str); return reblock_instructions; } - public static AggregateInstruction[] getAggregateInstructions(JobConf job) throws DMLRuntimeException - { + public static AggregateInstruction[] getAggregateInstructions(JobConf job) { String str=job.get(AGGREGATE_INSTRUCTIONS_CONFIG); AggregateInstruction[] agg_instructions = MRInstructionParser.parseAggregateInstructions(str); return agg_instructions; } - public static MRInstruction[] getCombineInstruction(JobConf job) throws DMLRuntimeException - { + public static MRInstruction[] getCombineInstruction(JobConf job) { String str=job.get(COMBINE_INSTRUCTIONS_CONFIG); MRInstruction[] comb_instructions = MRInstructionParser.parseCombineInstructions(str); return comb_instructions; } - public static MRInstruction[] getInstructionsInMapper(JobConf job) throws DMLRuntimeException - { + public static MRInstruction[] getInstructionsInMapper(JobConf job) { String str=job.get(INSTRUCTIONS_IN_MAPPER_CONFIG); MRInstruction[] instructions = MRInstructionParser.parseMixedInstructions(str); return instructions; @@ -526,9 +517,7 @@ public class MRJobConfiguration } //partitioning configurations - public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew ) - throws DMLRuntimeException - { + public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew ){ job.set(PARTITIONING_INPUT_MATRIX_NUM_ROW_CONFIG, String.valueOf(rlen)); job.set(PARTITIONING_INPUT_MATRIX_NUM_COLUMN_CONFIG, String.valueOf(clen)); job.set(PARTITIONING_INPUT_BLOCK_NUM_ROW_CONFIG, String.valueOf(brlen)); @@ -540,9 +529,7 @@ public class MRJobConfiguration job.set(PARTITIONING_OUTPUT_FILENAME_CONFIG, fnameNew); } - public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, String itervar, String matrixvar, boolean tSparseCol ) - throws DMLRuntimeException - { + public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, String itervar, String matrixvar, boolean tSparseCol ) { //set basic partitioning information setPartitioningInfo(job, rlen, clen, brlen, bclen, ii, oi, dpf, n, fnameNew); @@ -556,12 +543,9 @@ public class MRJobConfiguration job.setBoolean(PARTITIONING_TRANSPOSE_COL_CONFIG, tSparseCol); } - public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, boolean keepIndexes ) - throws DMLRuntimeException - { + public static void setPartitioningInfo( JobConf job, long rlen, long clen, int brlen, int bclen, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf, int n, String fnameNew, boolean keepIndexes ) { //set basic partitioning information setPartitioningInfo(job, rlen, clen, brlen, bclen, ii, oi, dpf, n, fnameNew); - //set transpose sparse column vector job.setBoolean(PARTITIONING_OUTPUT_KEEP_INDEXES_CONFIG, keepIndexes); } @@ -633,9 +617,7 @@ public class MRJobConfiguration return job.getBoolean(PARTITIONING_TRANSPOSE_COL_CONFIG, false); } - public static void setResultMergeInfo( JobConf job, String fnameNew, boolean accum, InputInfo ii, String stagingDir, long rlen, long clen, int brlen, int bclen ) - throws DMLRuntimeException - { + public static void setResultMergeInfo( JobConf job, String fnameNew, boolean accum, InputInfo ii, String stagingDir, long rlen, long clen, int brlen, int bclen ) { job.set(RESULTMERGE_COMPARE_FILENAME_CONFIG, fnameNew); job.set(RESULTMERGE_ACCUMULATOR_CONFIG, String.valueOf(accum)); job.set(RESULTMERGE_INPUT_INFO_CONFIG, InputInfo.inputInfoToString(ii)); @@ -787,27 +769,22 @@ public class MRJobConfiguration job.set(RAND_INSTRUCTIONS_CONFIG, randInstrctions); } - // TODO: check Rand - public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) throws DMLRuntimeException { + public static DataGenMRInstruction[] getDataGenInstructions(JobConf job) { String str=job.get(RAND_INSTRUCTIONS_CONFIG); return MRInstructionParser.parseDataGenInstructions(str); } - public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) throws DMLRuntimeException - { + public static AggregateBinaryInstruction[] getAggregateBinaryInstructions(JobConf job) { String str=job.get(AGGREGATE_BINARY_INSTRUCTIONS_CONFIG); return MRInstructionParser.parseAggregateBinaryInstructions(str); } - public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) throws DMLRuntimeException - { + public static CM_N_COVInstruction[] getCM_N_COVInstructions(JobConf job) { String str=job.get(CM_N_COV_INSTRUCTIONS_CONFIG); return MRInstructionParser.parseCM_N_COVInstructions(str); } - public static GroupedAggregateInstruction[] getGroupedAggregateInstructions(JobConf job) - throws DMLRuntimeException - { + public static GroupedAggregateInstruction[] getGroupedAggregateInstructions(JobConf job) { //parse all grouped aggregate instructions String str=job.get(GROUPEDAGG_INSTRUCTIONS_CONFIG); GroupedAggregateInstruction[] tmp = MRInstructionParser.parseGroupedAggInstructions(str); @@ -821,35 +798,31 @@ public class MRJobConfiguration return tmp; } - public static String[] getOutputs(JobConf job) - { + public static String[] getOutputs(JobConf job) { return job.getStrings(OUTPUT_MATRICES_DIRS_CONFIG); } - private static byte[] stringArrayToByteArray(String[] istrs) - { + private static byte[] stringArrayToByteArray(String[] istrs) { byte[] ret=new byte[istrs.length]; for(int i=0; i<istrs.length; i++) ret[i]=Byte.parseByte(istrs[i]); return ret; } - public static byte[] getResultIndexes(JobConf job) - { + public static byte[] getResultIndexes(JobConf job) { String[] istrs=job.get(RESULT_INDEXES_CONFIG).split(Instruction.INSTRUCTION_DELIM); return stringArrayToByteArray(istrs); } - public static byte[] getResultDimsUnknown(JobConf job) - { + + public static byte[] getResultDimsUnknown(JobConf job) { String str=job.get(RESULT_DIMS_UNKNOWN_CONFIG); if (str==null || str.isEmpty()) return null; String[] istrs=str.split(Instruction.INSTRUCTION_DELIM); return stringArrayToByteArray(istrs); } - - public static byte[] getIntermediateMatrixIndexes(JobConf job) - { + + public static byte[] getIntermediateMatrixIndexes(JobConf job) { String str=job.get(INTERMEDIATE_INDEXES_CONFIG); if(str==null || str.isEmpty()) return null; @@ -1174,7 +1147,7 @@ public class MRJobConfiguration public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, String instructionsInMapper, String aggInstructionsInReducer, String aggBinInstructions, - String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException + String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) { return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, null, aggInstructionsInReducer, aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ); @@ -1182,7 +1155,7 @@ public class MRJobConfiguration public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, String instructionsInMapper, String reblockInstructions, String aggInstructionsInReducer, String aggBinInstructions, - String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException + String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) { return computeMatrixCharacteristics(job, inputIndexes, null, instructionsInMapper, reblockInstructions, aggInstructionsInReducer, aggBinInstructions, otherInstructionsInReducer, resultIndexes, mapOutputIndexes, forMMCJ); @@ -1230,11 +1203,10 @@ public class MRJobConfiguration * @param mapOutputIndexes set of map output indexes * @param forMMCJ ? * @return reducer groups - * @throws DMLRuntimeException if DMLRuntimeException occurs */ public static MatrixChar_N_ReducerGroups computeMatrixCharacteristics(JobConf job, byte[] inputIndexes, String dataGenInstructions, String instructionsInMapper, String reblockInstructions, String aggInstructionsInReducer, String aggBinInstructions, - String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) throws DMLRuntimeException + String otherInstructionsInReducer, byte[] resultIndexes, HashSet<Byte> mapOutputIndexes, boolean forMMCJ) { HashSet<Byte> intermediateMatrixIndexes=new HashSet<>(); HashMap<Byte, MatrixCharacteristics> dims=new HashMap<>(); @@ -1571,24 +1543,18 @@ public class MRJobConfiguration } public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, - String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) - throws DMLRuntimeException - { + String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) { return setUpOutputIndexesForMapper(job, inputIndexes, null, instructionsInMapper, null, aggInstructionsInReducer, otherInstructionsInReducer, resultIndexes); } public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String instructionsInMapper, - String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) - throws DMLRuntimeException - { + String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) { return setUpOutputIndexesForMapper(job, inputIndexes, null, instructionsInMapper, reblockInstructions, aggInstructionsInReducer, otherInstructionsInReducer, resultIndexes); } public static HashSet<Byte> setUpOutputIndexesForMapper(JobConf job, byte[] inputIndexes, String randInstructions, String instructionsInMapper, - String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) - throws DMLRuntimeException - { + String reblockInstructions, String aggInstructionsInReducer, String otherInstructionsInReducer, byte[] resultIndexes) { //find out what results are needed to send to reducers HashSet<Byte> indexesInMapper=new HashSet<>(); @@ -1649,9 +1615,7 @@ public class MRJobConfiguration } - private static void getIndexes(MRInstruction[] instructions, HashSet<Byte> indexes) - throws DMLRuntimeException - { + private static void getIndexes(MRInstruction[] instructions, HashSet<Byte> indexes) { if(instructions==null) return; for(MRInstruction ins: instructions) http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java index dcec043..c46eb46 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/PartialAggregator.java @@ -132,9 +132,7 @@ public class PartialAggregator extends MMCJMRCache return nonZeros; } - private void aggregateToBufferHelp(MatrixIndexes indexes, MatrixValue value, boolean leftcached) - throws DMLRuntimeException - { + private void aggregateToBufferHelp(MatrixIndexes indexes, MatrixValue value, boolean leftcached) { Integer ix = _bufferMap.get( indexes ); if( ix != null ) //agg into existing block { http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java b/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java index 15441ec..a940d6f 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/mapred/ReduceBase.java @@ -282,9 +282,7 @@ public class ReduceBase extends MRBaseForCommonInstructions //process one aggregate instruction private void processAggregateHelp(long row, long col, MatrixValue value, - AggregateInstruction instruction, boolean imbededCorrection) - throws DMLRuntimeException - { + AggregateInstruction instruction, boolean imbededCorrection) { AggregateOperator aggOp=(AggregateOperator)instruction.getOperator(); //there should be just one value in cache. http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java index 64cd914..e3e4621 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/LeftScalarOperator.java @@ -20,7 +20,6 @@ package org.apache.sysml.runtime.matrix.operators; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.functionobjects.Builtin; import org.apache.sysml.runtime.functionobjects.GreaterThan; import org.apache.sysml.runtime.functionobjects.GreaterThanEquals; @@ -53,7 +52,7 @@ public class LeftScalarOperator extends ScalarOperator } @Override - public double executeScalar(double in) throws DMLRuntimeException { + public double executeScalar(double in) { return fn.execute(_constant, in); } } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java index fbd478e..53a448e 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/RightScalarOperator.java @@ -20,7 +20,6 @@ package org.apache.sysml.runtime.matrix.operators; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.functionobjects.Builtin; import org.apache.sysml.runtime.functionobjects.Divide; import org.apache.sysml.runtime.functionobjects.GreaterThan; @@ -56,7 +55,7 @@ public class RightScalarOperator extends ScalarOperator } @Override - public double executeScalar(double in) throws DMLRuntimeException { + public double executeScalar(double in) { return fn.execute(in, _constant); } } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java b/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java index 089c88f..bd4c354 100644 --- a/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java +++ b/src/main/java/org/apache/sysml/runtime/matrix/operators/ScalarOperator.java @@ -20,7 +20,6 @@ package org.apache.sysml.runtime.matrix.operators; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.functionobjects.And; import org.apache.sysml.runtime.functionobjects.BitwShiftL; import org.apache.sysml.runtime.functionobjects.BitwShiftR; @@ -73,10 +72,8 @@ public abstract class ScalarOperator extends Operator * * @param in input value * @return result - * @throws DMLRuntimeException if DMLRuntimeException occurs */ - public abstract double executeScalar(double in) - throws DMLRuntimeException; + public abstract double executeScalar(double in); /** * Indicates if the function is statically sparse safe, i.e., it is always http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java index 01f44cf..78f8059 100644 --- a/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java +++ b/src/test/java/org/apache/sysml/test/integration/AutomatedTestBase.java @@ -713,9 +713,7 @@ public abstract class AutomatedTestBase } - protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo) - throws DMLRuntimeException, IOException - { + protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo) throws IOException { //read frame data from hdfs String strFrameFileName = baseDirectory + OUTPUT_DIR + fileName; FrameReader reader = FrameReaderFactory.createFrameReader(iinfo); @@ -725,9 +723,7 @@ public abstract class AutomatedTestBase } - protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) - throws DMLRuntimeException, IOException - { + protected static FrameBlock readDMLFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) throws IOException { //read frame data from hdfs String strFrameFileName = baseDirectory + OUTPUT_DIR + fileName; FrameReader reader = FrameReaderFactory.createFrameReader(iinfo); @@ -735,9 +731,7 @@ public abstract class AutomatedTestBase return reader.readFrameFromHDFS(strFrameFileName, md.getRows(), md.getCols()); } - protected static FrameBlock readRFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) - throws DMLRuntimeException, IOException - { + protected static FrameBlock readRFrameFromHDFS(String fileName, InputInfo iinfo, MatrixCharacteristics md) throws IOException { //read frame data from hdfs String strFrameFileName = baseDirectory + EXPECTED_DIR + fileName; @@ -1732,11 +1726,8 @@ public abstract class AutomatedTestBase * @param bIncludeR * generates also the corresponding R frame data * @throws IOException - * @throws DMLRuntimeException */ - protected double[][] writeInputFrame(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) - throws DMLRuntimeException, IOException - { + protected double[][] writeInputFrame(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) throws IOException { String completePath = baseDirectory + INPUT_DIR + name; String completeRPath = baseDirectory + INPUT_DIR + name + ".csv"; @@ -1759,16 +1750,12 @@ public abstract class AutomatedTestBase return data; } - protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) - throws DMLRuntimeException, IOException - { + protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, ValueType[] schema, OutputInfo oi) throws IOException { MatrixCharacteristics mc = new MatrixCharacteristics(data.length, data[0].length, OptimizerUtils.DEFAULT_BLOCKSIZE, data[0].length, -1); return writeInputFrameWithMTD(name, data, bIncludeR, mc, schema, oi); } - protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, MatrixCharacteristics mc, ValueType[] schema, OutputInfo oi) - throws DMLRuntimeException, IOException - { + protected double[][] writeInputFrameWithMTD(String name, double[][] data, boolean bIncludeR, MatrixCharacteristics mc, ValueType[] schema, OutputInfo oi) throws IOException { writeInputFrame(name, data, bIncludeR, schema, oi); // write metadata file @@ -1798,10 +1785,9 @@ public abstract class AutomatedTestBase * @param schema * @param oi * @throws IOException - * @throws DMLRuntimeException */ protected double[][] writeInputFrame(String name, double[][] data, ValueType[] schema, OutputInfo oi) - throws DMLRuntimeException, IOException + throws IOException { return writeInputFrame(name, data, false, schema, oi); } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java index ff539ab..8b4d9be 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameConverterTest.java @@ -36,7 +36,6 @@ import org.apache.spark.sql.types.StructType; import org.apache.sysml.api.DMLScript; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.controlprogram.context.ExecutionContextFactory; import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext; import org.apache.sysml.runtime.instructions.spark.functions.CopyFrameBlockPairFunction; @@ -416,21 +415,10 @@ public class FrameConverterTest extends AutomatedTestBase } } - - /** - * @param oinfo - * @param frame1 - * @param frame2 - * @param fprop - * @param schema - * @return - * @throws DMLRuntimeException, IOException - */ - @SuppressWarnings("unchecked") private static void runConverter(ConvType type, MatrixCharacteristics mc, MatrixCharacteristics mcMatrix, List<ValueType> schema, String fnameIn, String fnameOut) - throws DMLRuntimeException, IOException + throws IOException { SparkExecutionContext sec = (SparkExecutionContext) ExecutionContextFactory.createContext(); JavaSparkContext sc = sec.getSparkContext(); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java index fc37042..d5ef742 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameIndexingDistTest.java @@ -34,7 +34,6 @@ import org.apache.sysml.hops.LeftIndexingOp; import org.apache.sysml.hops.LeftIndexingOp.LeftIndexingMethod; import org.apache.sysml.lops.LopProperties.ExecType; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.runtime.matrix.data.FrameBlock; import org.apache.sysml.runtime.matrix.data.InputInfo; @@ -97,30 +96,30 @@ public class FrameIndexingDistTest extends AutomatedTestBase // Left Indexing Spark test cases @Test - public void testMapLeftIndexingSP() throws DMLRuntimeException, IOException { + public void testMapLeftIndexingSP() throws IOException { runTestLeftIndexing(ExecType.SPARK, LeftIndexingMethod.SP_MLEFTINDEX_R, schemaMixedLarge, IXType.LIX, true); } @Test - public void testGeneralLeftIndexingSP() throws DMLRuntimeException, IOException { + public void testGeneralLeftIndexingSP() throws IOException { runTestLeftIndexing(ExecType.SPARK, LeftIndexingMethod.SP_GLEFTINDEX, schemaMixedLarge, IXType.LIX, true); } // Right Indexing Spark test cases @Test - public void testRightIndexingSPSparse() throws DMLRuntimeException, IOException { + public void testRightIndexingSPSparse() throws IOException { runTestLeftIndexing(ExecType.SPARK, null, schemaMixedLarge, IXType.RIX, true); } @Test - public void testRightIndexingSPDense() throws DMLRuntimeException, IOException { + public void testRightIndexingSPDense() throws IOException { runTestLeftIndexing(ExecType.SPARK, null, schemaMixedLarge, IXType.RIX, false); } - private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod indexingMethod, ValueType[] schema, IXType itype, boolean bSparse) throws DMLRuntimeException, IOException { + private void runTestLeftIndexing(ExecType et, LeftIndexingOp.LeftIndexingMethod indexingMethod, ValueType[] schema, IXType itype, boolean bSparse) throws IOException { boolean sparkConfigOld = DMLScript.USE_LOCAL_SPARK_CONFIG; RUNTIME_PLATFORM oldRTP = rtplatform; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java index 05f9136..fec16db 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixCastingTest.java @@ -27,7 +27,6 @@ import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.lops.LopProperties.ExecType; import org.apache.sysml.parser.Expression.DataType; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameReader; import org.apache.sysml.runtime.io.FrameReaderFactory; import org.apache.sysml.runtime.io.FrameWriter; @@ -185,7 +184,7 @@ public class FrameMatrixCastingTest extends AutomatedTestBase } private static void writeMatrixOrFrameInput(String fname, double[][] A, int rows, int cols, DataType dt, ValueType vt) - throws DMLRuntimeException, IOException + throws IOException { int blksize = ConfigurationManager.getBlocksize(); @@ -208,7 +207,7 @@ public class FrameMatrixCastingTest extends AutomatedTestBase } private static double[][] readMatrixOrFrameInput(String fname, int rows, int cols, DataType dt) - throws DMLRuntimeException, IOException + throws IOException { MatrixBlock ret = null; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java index e11aeb9..c3b5311 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixReblockTest.java @@ -24,7 +24,6 @@ import java.io.IOException; import org.apache.sysml.api.DMLScript; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.lops.LopProperties.ExecType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameWriter; import org.apache.sysml.runtime.io.FrameWriterFactory; import org.apache.sysml.runtime.io.MatrixReader; @@ -227,7 +226,7 @@ public class FrameMatrixReblockTest extends AutomatedTestBase } private static void writeFrameInput(String fname, String ofmt, double[][] frame, int rows, int cols) - throws DMLRuntimeException, IOException + throws IOException { MatrixBlock mb = DataConverter.convertToMatrixBlock(frame); FrameBlock fb = DataConverter.convertToFrameBlock(mb); @@ -239,7 +238,7 @@ public class FrameMatrixReblockTest extends AutomatedTestBase } private static double[][] readMatrixOutput(String fname, String ofmt, int rows, int cols) - throws DMLRuntimeException, IOException + throws IOException { MatrixReader reader = MatrixReaderFactory.createMatrixReader(InputInfo.stringExternalToInputInfo(ofmt)); MatrixBlock mb = reader.readMatrixFromHDFS(fname, rows, cols, 1000, 1000, -1); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java index aaac262..2cbbf55 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameMatrixWriteTest.java @@ -24,7 +24,6 @@ import java.io.IOException; import org.apache.sysml.api.DMLScript; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.lops.LopProperties.ExecType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameReader; import org.apache.sysml.runtime.io.FrameReaderFactory; import org.apache.sysml.runtime.matrix.data.FrameBlock; @@ -171,7 +170,7 @@ public class FrameMatrixWriteTest extends AutomatedTestBase } private static double[][] readFrameInput(String fname, String ofmt, int rows, int cols) - throws DMLRuntimeException, IOException + throws IOException { //read input data FrameReader reader = FrameReaderFactory.createFrameReader(InputInfo.stringExternalToInputInfo(ofmt)); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java index 7f04d66..77ebf10 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/frame/FrameReadWriteTest.java @@ -24,7 +24,6 @@ import java.io.IOException; import org.apache.sysml.conf.CompilerConfig; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameReader; import org.apache.sysml.runtime.io.FrameReaderFactory; import org.apache.sysml.runtime.io.FrameWriter; @@ -220,7 +219,7 @@ public class FrameReadWriteTest extends AutomatedTestBase } void writeAndVerifyData(OutputInfo oinfo, FrameBlock frame1, FrameBlock frame2, CSVFileFormatProperties fprop) - throws DMLRuntimeException, IOException + throws IOException { String fname1 = SCRIPT_DIR + TEST_DIR + "/frameData1"; String fname2 = SCRIPT_DIR + TEST_DIR + "/frameData2"; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java b/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java index d52ba02..74c2328 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/io/FullDynWriteTest.java @@ -27,7 +27,6 @@ import org.junit.Test; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.lops.LopProperties.ExecType; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.runtime.matrix.data.InputInfo; import org.apache.sysml.runtime.matrix.data.MatrixBlock; @@ -200,20 +199,8 @@ public class FullDynWriteTest extends AutomatedTestBase return C; } - /** - * - * @param A - * @param dir - * @param oi - * @param rows - * @param cols - * @param brows - * @param bcols - * @throws DMLRuntimeException - * @throws IOException - */ private static void writeMatrix( double[][] A, String fname, OutputInfo oi, long rows, long cols, int brows, int bcols, long nnz ) - throws DMLRuntimeException, IOException + throws IOException { MapReduceTool.deleteFileIfExistOnHDFS(fname); MapReduceTool.deleteFileIfExistOnHDFS(fname+".mtd"); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java b/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java index c6dc9b8..d62fb15 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/io/SeqParReadTest.java @@ -25,7 +25,6 @@ import org.junit.Assert; import org.junit.Test; import org.apache.sysml.conf.CompilerConfig; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.runtime.matrix.data.MatrixBlock; import org.apache.sysml.runtime.matrix.data.OutputInfo; @@ -255,7 +254,7 @@ public class SeqParReadTest extends AutomatedTestBase { } private static void writeMatrix( double[][] A, String fname, OutputInfo oi, long rows, long cols, int brows, int bcols, long nnz ) - throws DMLRuntimeException, IOException + throws IOException { MapReduceTool.deleteFileWithMTDIfExistOnHDFS(fname); MatrixCharacteristics mc = new MatrixCharacteristics(rows, cols, brows, bcols, nnz); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java index 0f99031..5d23863 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/jmlc/FrameReadMetaTest.java @@ -32,7 +32,6 @@ import org.apache.sysml.api.jmlc.Connection; import org.apache.sysml.api.jmlc.PreparedScript; import org.apache.sysml.api.jmlc.ResultVariables; import org.apache.sysml.lops.Lop; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.IOUtilFunctions; import org.apache.sysml.runtime.matrix.data.FrameBlock; import org.apache.sysml.runtime.transform.TfUtils; @@ -157,9 +156,7 @@ public class FrameReadMetaTest extends AutomatedTestBase } @SuppressWarnings("unchecked") - private static HashMap<String,Long>[] getRecodeMaps(String spec, FrameBlock M) - throws DMLRuntimeException - { + private static HashMap<String,Long>[] getRecodeMaps(String spec, FrameBlock M) { List<Integer> collist = Arrays.asList(ArrayUtils.toObject( TfMetaUtils.parseJsonIDList(spec, M.getColumnNames(), TfUtils.TXMETHOD_RECODE))); HashMap<String,Long>[] ret = new HashMap[M.getNumColumns()]; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java index 3a6865a..d5484ce 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorFrameConversionTest.java @@ -39,7 +39,6 @@ import org.apache.sysml.api.DMLScript; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext; import org.apache.sysml.runtime.instructions.spark.utils.FrameRDDConverterUtils; import org.apache.sysml.runtime.instructions.spark.utils.RDDConverterUtils; @@ -291,9 +290,7 @@ public class DataFrameVectorFrameConversionTest extends AutomatedTestBase } @SuppressWarnings("resource") - private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) - throws DMLRuntimeException - { + private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) { //create in-memory list of rows List<Row> list = new ArrayList<Row>(); int off = (containsID ? 1 : 0); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java index d6f0d9d..f8fbfe0 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/mlcontext/DataFrameVectorScriptTest.java @@ -42,7 +42,6 @@ import org.apache.sysml.api.mlcontext.Matrix; import org.apache.sysml.api.mlcontext.Script; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.instructions.spark.utils.RDDConverterUtils; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.runtime.matrix.data.MatrixBlock; @@ -280,9 +279,7 @@ public class DataFrameVectorScriptTest extends MLContextTestBase } @SuppressWarnings("resource") - private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) - throws DMLRuntimeException - { + private static Dataset<Row> createDataFrame(SparkSession sparkSession, MatrixBlock mb, boolean containsID, ValueType[] schema) { //create in-memory list of rows List<Row> list = new ArrayList<Row>(); int off = (containsID ? 1 : 0); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java b/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java index afe6f5f..2c63716 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/python/PythonTestRunner.java @@ -52,39 +52,37 @@ public class PythonTestRunner extends AutomatedTestBase @Test - public void testMLContext() throws DMLRuntimeException, IOException, InterruptedException { + public void testMLContext() throws IOException, InterruptedException { runPythonTest("test_mlcontext.py"); } @Test - public void testMatrixBinaryOp() throws DMLRuntimeException, IOException, InterruptedException { + public void testMatrixBinaryOp() throws IOException, InterruptedException { runPythonTest("test_matrix_binary_op.py"); } @Test - public void testMatrixAggFn() throws DMLRuntimeException, IOException, InterruptedException { + public void testMatrixAggFn() throws IOException, InterruptedException { runPythonTest("test_matrix_agg_fn.py"); } @Test - public void testMLLearn_df() throws DMLRuntimeException, IOException, InterruptedException { + public void testMLLearn_df() throws IOException, InterruptedException { runPythonTest("test_mllearn_df.py"); } @Test - public void testMLLearn_numpy() throws DMLRuntimeException, IOException, InterruptedException { + public void testMLLearn_numpy() throws IOException, InterruptedException { runPythonTest("test_mllearn_numpy.py"); } - public void runPythonTest(String pythonFileName) throws IOException, DMLRuntimeException, InterruptedException { + public void runPythonTest(String pythonFileName) throws IOException, InterruptedException { if(!RUN_PYTHON_TEST) return; if(!new File("target/SystemML.jar").exists()) { throw new DMLRuntimeException("Please build the project before running PythonTestRunner"); } -// String [] args = { "--master", "local[*]", "--driver-class-path", "target/SystemML.jar", "src/main/python/tests/test_mlcontext.py"}; -// org.apache.spark.deploy.SparkSubmit.main(args); Map<String, String> env = System.getenv(); if(!env.containsKey("SPARK_HOME")) { throw new DMLRuntimeException("Please set the SPARK_HOME environment variable"); http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java b/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java index e4991c7..534ab91 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/recompile/IPAComplexAppendTest.java @@ -25,7 +25,6 @@ import org.junit.Test; import org.apache.sysml.hops.OptimizerUtils; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.MatrixCharacteristics; import org.apache.sysml.runtime.matrix.data.MatrixBlock; import org.apache.sysml.runtime.matrix.data.OutputInfo; @@ -55,44 +54,27 @@ public class IPAComplexAppendTest extends AutomatedTestBase @Test - public void testComplexAppendNoIPANoRewrites() - throws DMLRuntimeException, IOException - { + public void testComplexAppendNoIPANoRewrites() throws IOException { runIPAAppendTest(false, false); } @Test - public void testComplexAppendIPANoRewrites() - throws DMLRuntimeException, IOException - { + public void testComplexAppendIPANoRewrites() throws IOException { runIPAAppendTest(true, false); } @Test - public void testComplexAppendNoIPARewrites() - throws DMLRuntimeException, IOException - { + public void testComplexAppendNoIPARewrites() throws IOException { runIPAAppendTest(false, true); } @Test - public void testComplexAppendIPARewrites() - throws DMLRuntimeException, IOException - { + public void testComplexAppendIPARewrites() throws IOException { runIPAAppendTest(true, true); } - - /** - * - * @param condition - * @param branchRemoval - * @param IPA - * @throws DMLRuntimeException - * @throws IOException - */ - private void runIPAAppendTest( boolean IPA, boolean rewrites ) - throws DMLRuntimeException, IOException - { + + private void runIPAAppendTest( boolean IPA, boolean rewrites ) throws IOException + { boolean oldFlagIPA = OptimizerUtils.ALLOW_INTER_PROCEDURAL_ANALYSIS; boolean oldFlagRewrites = OptimizerUtils.ALLOW_ALGEBRAIC_SIMPLIFICATION; http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java b/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java index 3f7b5a3..224a19e 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/recompile/RewriteComplexMapMultChainTest.java @@ -26,7 +26,6 @@ import org.junit.Test; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.lops.LopProperties.ExecType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.data.MatrixValue.CellIndex; import org.apache.sysml.test.integration.AutomatedTestBase; import org.apache.sysml.test.integration.TestConfiguration; @@ -62,73 +61,46 @@ public class RewriteComplexMapMultChainTest extends AutomatedTestBase @Test - public void testRewriteExpr1SingleColumnCP() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr1SingleColumnCP() throws IOException { runRewriteMapMultChain(TEST_NAME1, true, ExecType.CP); } @Test - public void testRewriteExpr1MultiColumnCP() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr1MultiColumnCP() throws IOException { runRewriteMapMultChain(TEST_NAME1, false, ExecType.CP); } @Test - public void testRewriteExpr1SingleColumnMR() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr1SingleColumnMR() throws IOException { runRewriteMapMultChain(TEST_NAME1, true, ExecType.MR); } @Test - public void testRewriteExpr1MultiColumnMR() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr1MultiColumnMR() throws IOException { runRewriteMapMultChain(TEST_NAME1, false, ExecType.MR); } @Test - public void testRewriteExpr2SingleColumnCP() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr2SingleColumnCP() throws IOException { runRewriteMapMultChain(TEST_NAME2, true, ExecType.CP); } @Test - public void testRewriteExpr2MultiColumnCP() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr2MultiColumnCP() throws IOException { runRewriteMapMultChain(TEST_NAME2, false, ExecType.CP); } @Test - public void testRewriteExpr2SingleColumnMR() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr2SingleColumnMR() throws IOException { runRewriteMapMultChain(TEST_NAME2, true, ExecType.MR); } @Test - public void testRewriteExpr2MultiColumnMR() - throws DMLRuntimeException, IOException - { + public void testRewriteExpr2MultiColumnMR() throws IOException { runRewriteMapMultChain(TEST_NAME2, false, ExecType.MR); } - - /** - * - * @param condition - * @param branchRemoval - * @param IPA - * @throws DMLRuntimeException - * @throws IOException - */ - private void runRewriteMapMultChain( String TEST_NAME, boolean singleCol, ExecType et ) - throws DMLRuntimeException, IOException - { + private void runRewriteMapMultChain( String TEST_NAME, boolean singleCol, ExecType et ) throws IOException { RUNTIME_PLATFORM platformOld = rtplatform; try @@ -175,5 +147,4 @@ public class RewriteComplexMapMultChainTest extends AutomatedTestBase rtplatform = platformOld; } } - } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java index c50e760..8e55140 100644 --- a/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java +++ b/src/test/java/org/apache/sysml/test/integration/functions/transform/TransformEncodeDecodeTest.java @@ -19,7 +19,6 @@ package org.apache.sysml.test.integration.functions.transform; -import java.io.IOException; import java.util.HashMap; import java.util.Iterator; @@ -27,7 +26,6 @@ import org.junit.Assert; import org.junit.Test; import org.apache.sysml.api.DMLScript.RUNTIME_PLATFORM; import org.apache.sysml.lops.LopProperties.ExecType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameReader; import org.apache.sysml.runtime.io.FrameReaderFactory; import org.apache.sysml.runtime.io.FrameWriter; @@ -92,14 +90,6 @@ public class TransformEncodeDecodeTest extends AutomatedTestBase runTransformEncodeDecodeTest(ExecType.CP, true, "binary"); } - /** - * - * @param sparseM1 - * @param sparseM2 - * @param instType - * @throws IOException - * @throws DMLRuntimeException - */ private void runTransformEncodeDecodeTest( ExecType et, boolean sparse, String fmt) { RUNTIME_PLATFORM platformOld = rtplatform; @@ -110,7 +100,7 @@ public class TransformEncodeDecodeTest extends AutomatedTestBase getAndLoadTestConfiguration(TEST_NAME1); //get input/output info - InputInfo iinfo = InputInfo.stringExternalToInputInfo(fmt); + InputInfo iinfo = InputInfo.stringExternalToInputInfo(fmt); OutputInfo oinfo = InputInfo.getMatchingOutputInfo(iinfo); //generate and write input data http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/unit/UtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/unit/UtilsTest.java b/src/test/java/org/apache/sysml/test/unit/UtilsTest.java index 02c96a0..38bd01c 100644 --- a/src/test/java/org/apache/sysml/test/unit/UtilsTest.java +++ b/src/test/java/org/apache/sysml/test/unit/UtilsTest.java @@ -27,8 +27,6 @@ import java.io.IOException; import java.util.Arrays; import org.apache.sysml.conf.DMLConfig; -import org.apache.sysml.parser.ParseException; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.instructions.gpu.context.GPUContextPool; import org.junit.Assert; import org.junit.Test; @@ -83,9 +81,8 @@ public class UtilsTest { GPUContextPool.parseListString("-1-4", 6); } - @Test - public void testDMLConfig1() throws DMLRuntimeException{ + public void testDMLConfig1() { DMLConfig dmlConfig = new DMLConfig(); dmlConfig.setTextValue("A", "a"); dmlConfig.setTextValue("B", "b"); @@ -103,10 +100,8 @@ public class UtilsTest { Assert.assertEquals("a", dmlConfig.getTextValue("E")); } - - @Test - public void testDMLConfig2() throws DMLRuntimeException, IOException, ParseException { + public void testDMLConfig2() throws IOException { String testStr = "<root>" + "<A>a</A>" @@ -131,8 +126,4 @@ public class UtilsTest { dmlConfig.setTextValue("E", "a"); Assert.assertEquals("a", dmlConfig.getTextValue("E")); } - - - - } http://git-wip-us.apache.org/repos/asf/systemml/blob/1f323976/src/test/java/org/apache/sysml/test/utils/TestUtils.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/sysml/test/utils/TestUtils.java b/src/test/java/org/apache/sysml/test/utils/TestUtils.java index 612ed40..5357be0 100644 --- a/src/test/java/org/apache/sysml/test/utils/TestUtils.java +++ b/src/test/java/org/apache/sysml/test/utils/TestUtils.java @@ -52,7 +52,6 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.SequenceFile; import org.apache.sysml.parser.Expression.ValueType; -import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.io.FrameWriter; import org.apache.sysml.runtime.io.FrameWriterFactory; import org.apache.sysml.runtime.io.IOUtilFunctions; @@ -1527,11 +1526,8 @@ public class TestUtils * frame data * @param isR * @throws IOException - * @throws DMLRuntimeException */ - public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi, boolean isR) - throws DMLRuntimeException, IOException - { + public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi, boolean isR) throws IOException { FrameWriter writer = FrameWriterFactory.createFrameWriter(oi); FrameBlock frame = new FrameBlock(schema); initFrameData(frame, data, schema, data.length); @@ -1548,20 +1544,11 @@ public class TestUtils * @param data * frame data * @throws IOException - * @throws DMLRuntimeException */ - public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi) - throws DMLRuntimeException, IOException - { + public static void writeTestFrame(String file, double[][] data, ValueType[] schema, OutputInfo oi) throws IOException { writeTestFrame(file, data, schema, oi, false); } - /** - * - * @param frame - * @param data - * @param lschema - */ public static void initFrameData(FrameBlock frame, double[][] data, ValueType[] lschema, int rows) { Object[] row1 = new Object[lschema.length]; for( int i=0; i<rows; i++ ) {
