You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by mb...@apache.org on 2016/04/05 23:22:56 UTC
[09/11] incubator-systemml git commit: [SYSTEMML-616] Cleanup
exception handling (stage 1, remove unnecessary)
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
index cb553f7..e05ea8d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
@@ -363,7 +363,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
if ( !isAvailableToRead() )
- throw new CacheStatusException ("MatrixObject not available to read.");
+ throw new CacheException ("MatrixObject not available to read.");
//get object from cache
if( _data == null )
@@ -407,7 +407,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (IOException e)
{
- throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+ throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
}
_isAcquireFromEmpty = true;
@@ -450,7 +450,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
if ( !isAvailableToModify() )
- throw new CacheStatusException("MatrixObject not available to modify.");
+ throw new CacheException("MatrixObject not available to modify.");
//get object from cache
if( _data == null )
@@ -470,7 +470,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (IOException e)
{
- throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+ throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
}
}
@@ -509,7 +509,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
if (! isAvailableToModify ())
- throw new CacheStatusException ("MatrixObject not available to modify.");
+ throw new CacheException ("MatrixObject not available to modify.");
//clear old data
clearData();
@@ -543,7 +543,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
* In-Status: READ, MODIFY;
* Out-Status: READ(-1), EVICTABLE, EMPTY.
*
- * @throws CacheStatusException
+ * @throws CacheException
*/
@Override
public synchronized void release()
@@ -625,7 +625,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
if( !isCleanupEnabled() )
return; // do nothing
if( !isAvailableToModify() )
- throw new CacheStatusException ("MatrixObject (" + this.getDebugName() + ") not available to modify. Status = " + this.getStatusAsString() + ".");
+ throw new CacheException ("MatrixObject (" + this.getDebugName() + ") not available to modify. Status = " + this.getStatusAsString() + ".");
// clear existing WB / FS representation (but prevent unnecessary probes)
if( !(isEmpty(true)||(_data!=null && isBelowCachingThreshold())
@@ -672,7 +672,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
//prevent concurrent modifications
if ( !isAvailableToRead() )
- throw new CacheStatusException ("MatrixObject not available to read.");
+ throw new CacheException ("MatrixObject not available to read.");
LOG.trace("Exporting " + this.getDebugName() + " to " + fName + " in format " + outputFormat);
@@ -705,7 +705,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (IOException e)
{
- throw new CacheIOException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
+ throw new CacheException("Reading of " + _hdfsFileName + " ("+getVarName()+") failed.", e);
}
}
//get object from cache
@@ -723,7 +723,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (Exception e)
{
- throw new CacheIOException ("Export to " + fName + " failed.", e);
+ throw new CacheException ("Export to " + fName + " failed.", e);
}
finally
{
@@ -744,7 +744,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
writeMetaData( fName, outputFormat, formatProperties );
}
catch (Exception e) {
- throw new CacheIOException ("Export to " + fName + " failed.", e);
+ throw new CacheException ("Export to " + fName + " failed.", e);
}
}
else if( getRDDHandle()!=null && //pending rdd operation
@@ -757,7 +757,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
writeMetaData( fName, outputFormat, formatProperties );
}
catch (Exception e) {
- throw new CacheIOException ("Export to " + fName + " failed.", e);
+ throw new CacheException ("Export to " + fName + " failed.", e);
}
}
else
@@ -777,10 +777,10 @@ public class MatrixObject extends CacheableData<MatrixBlock>
* @param fName
* @param outputFormat
* @return
- * @throws CacheIOException
+ * @throws CacheException
*/
public synchronized boolean moveData(String fName, String outputFormat)
- throws CacheIOException
+ throws CacheException
{
boolean ret = false;
@@ -809,7 +809,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (Exception e)
{
- throw new CacheIOException ("Move to " + fName + " failed.", e);
+ throw new CacheException ("Move to " + fName + " failed.", e);
}
return ret;
@@ -887,7 +887,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
if ( !_partitioned )
- throw new CacheStatusException ("MatrixObject not available to indexed read.");
+ throw new CacheException ("MatrixObject not available to indexed read.");
//return static partition of set from outside of the program
if( _partitionInMemory != null )
@@ -992,13 +992,13 @@ public class MatrixObject extends CacheableData<MatrixBlock>
*
* @param pred
* @return
- * @throws CacheStatusException
+ * @throws CacheException
*/
public String getPartitionFileName( IndexRange pred, int brlen, int bclen )
- throws CacheStatusException
+ throws CacheException
{
if ( !_partitioned )
- throw new CacheStatusException ("MatrixObject not available to indexed read.");
+ throw new CacheException ("MatrixObject not available to indexed read.");
StringBuilder sb = new StringBuilder();
sb.append(_hdfsFileName);
@@ -1022,7 +1022,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
sb.append((pred.colStart-1)/bclen+1);
break;
default:
- throw new CacheStatusException ("MatrixObject not available to indexed read.");
+ throw new CacheException ("MatrixObject not available to indexed read.");
}
return sb.toString();
@@ -1047,14 +1047,14 @@ public class MatrixObject extends CacheableData<MatrixBlock>
@Override
protected void evictBlobFromMemory ( MatrixBlock mb )
- throws CacheIOException
+ throws CacheException
{
- throw new CacheIOException("Redundant explicit eviction.");
+ throw new CacheException("Redundant explicit eviction.");
}
@Override
protected void restoreBlobIntoMemory ()
- throws CacheIOException
+ throws CacheException
{
long begin = 0;
@@ -1070,7 +1070,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
(_hdfsFileName == null ? "null" : _hdfsFileName) + ", Restore from path: " + filePath);
if (_data != null)
- throw new CacheIOException (filePath + " : Cannot restore on top of existing in-memory data.");
+ throw new CacheException (filePath + " : Cannot restore on top of existing in-memory data.");
try
{
@@ -1078,12 +1078,12 @@ public class MatrixObject extends CacheableData<MatrixBlock>
}
catch (IOException e)
{
- throw new CacheIOException (filePath + " : Restore failed.", e);
+ throw new CacheException (filePath + " : Restore failed.", e);
}
//check for success
if (_data == null)
- throw new CacheIOException (filePath + " : Restore failed.");
+ throw new CacheException (filePath + " : Restore failed.");
if( LOG.isTraceEnabled() )
LOG.trace("Restoring matrix - COMPLETED ... " + (System.currentTimeMillis()-begin) + " msec.");
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
index 7ee9bb5..66bee85 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
@@ -42,7 +42,6 @@ import org.apache.sysml.api.MLContextProxy;
import org.apache.sysml.hops.OptimizerUtils;
import org.apache.sysml.lops.Checkpoint;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.Program;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
@@ -229,11 +228,10 @@ public class SparkExecutionContext extends ExecutionContext
* @param varname
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<MatrixIndexes,MatrixBlock> getBinaryBlockRDDHandleForVariable( String varname )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
return (JavaPairRDD<MatrixIndexes,MatrixBlock>) getRDDHandleForVariable( varname, InputInfo.BinaryBlockInputInfo);
}
@@ -244,10 +242,9 @@ public class SparkExecutionContext extends ExecutionContext
* @param inputInfo
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public JavaPairRDD<?,?> getRDDHandleForVariable( String varname, InputInfo inputInfo )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
MatrixObject mo = getMatrixObject(varname);
return getRDDHandleForMatrixObject(mo, inputInfo);
@@ -260,12 +257,11 @@ public class SparkExecutionContext extends ExecutionContext
*
* @param varname
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<?,?> getRDDHandleForMatrixObject( MatrixObject mo, InputInfo inputInfo )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//NOTE: MB this logic should be integrated into MatrixObject
//However, for now we cannot assume that spark libraries are
@@ -348,11 +344,10 @@ public class SparkExecutionContext extends ExecutionContext
* @param varname
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
@SuppressWarnings("unchecked")
public PartitionedBroadcastMatrix getBroadcastForVariable( String varname )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
@@ -415,10 +410,9 @@ public class SparkExecutionContext extends ExecutionContext
* @param varname
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public BlockPartitioner getPartitionerForRDDVariable(String varname)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get input rdd and matrix characteristics
JavaPairRDD<MatrixIndexes,MatrixBlock> in = getBinaryBlockRDDHandleForVariable(varname);
@@ -453,11 +447,10 @@ public class SparkExecutionContext extends ExecutionContext
* @param sc
* @param block
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static JavaPairRDD<MatrixIndexes,MatrixBlock> toJavaPairRDD(JavaSparkContext sc, MatrixBlock src, int brlen, int bclen)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
LinkedList<Tuple2<MatrixIndexes,MatrixBlock>> list = new LinkedList<Tuple2<MatrixIndexes,MatrixBlock>>();
@@ -1054,11 +1047,10 @@ public class SparkExecutionContext extends ExecutionContext
*
* @param var
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
@SuppressWarnings("unchecked")
public void repartitionAndCacheMatrixObject( String var )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get input rdd and default storage level
MatrixObject mo = getMatrixObject(var);
@@ -1102,11 +1094,10 @@ public class SparkExecutionContext extends ExecutionContext
*
* @param var
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
@SuppressWarnings("unchecked")
public void cacheMatrixObject( String var )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get input rdd and default storage level
MatrixObject mo = getMatrixObject(var);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
index 7dd80b9..72cf976 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
@@ -41,7 +41,6 @@ import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.TextInputFormat;
import org.apache.sysml.conf.ConfigurationManager;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
import org.apache.sysml.runtime.controlprogram.parfor.util.Cell;
@@ -553,10 +552,9 @@ public class DataPartitionerLocal extends DataPartitioner
* @param bclen
* @throws DMLRuntimeException
* @throws IOException
- * @throws DMLUnsupportedOperationException
*/
private void appendBlockToStagingArea( String dir, MatrixBlock mb, long row_offset, long col_offset, long brlen, long bclen )
- throws DMLRuntimeException, IOException, DMLUnsupportedOperationException
+ throws DMLRuntimeException, IOException
{
//NOTE: for temporary block we always create dense representations
boolean sparse = mb.isInSparseFormat();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
index b4defa2..8f33081 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkMapper.java
@@ -27,7 +27,6 @@ import org.apache.hadoop.io.Writable;
import org.apache.spark.api.java.function.PairFlatMapFunction;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
import org.apache.sysml.runtime.controlprogram.parfor.util.PairWritableBlock;
import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
@@ -61,7 +60,7 @@ public class DataPartitionerRemoteSparkMapper extends ParWorker implements PairF
private PDataPartitionFormat _dpf = null;
public DataPartitionerRemoteSparkMapper(MatrixCharacteristics mc, InputInfo ii, OutputInfo oi, PDataPartitionFormat dpf)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
_rlen = mc.getRows();
_clen = mc.getCols();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
index dcd42ec..334094d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
@@ -31,7 +31,6 @@ import org.apache.spark.api.java.function.VoidFunction;
import org.apache.sysml.conf.ConfigurationManager;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.parfor.util.PairWritableBlock;
import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
@@ -50,7 +49,7 @@ public class DataPartitionerRemoteSparkReducer implements VoidFunction<Tuple2<Lo
private String _fnameNew = null;
public DataPartitionerRemoteSparkReducer(String fnameNew, OutputInfo oi)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
_fnameNew = fnameNew;
//_oi = oi;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
index 2ca3275..b18d5b8 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
@@ -26,7 +26,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.ProgramBlock;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -141,10 +140,9 @@ public abstract class ParWorker
*
* @param task
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void executeTask( Task task )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
LOG.trace("EXECUTE PARFOR_WORKER ID="+_workerID+" for task "+task.toCompactString());
@@ -163,10 +161,9 @@ public abstract class ParWorker
*
* @param task
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
private void executeSetTask( Task task )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//monitoring start
Timing time1 = null, time2 = null;
@@ -210,10 +207,9 @@ public abstract class ParWorker
*
* @param task
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
private void executeRangeTask( Task task )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//monitoring start
Timing time1 = null, time2 = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
index a684c08..b334a62 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
@@ -45,7 +45,6 @@ import org.apache.sysml.parser.Expression.DataType;
import org.apache.sysml.parser.Expression.ValueType;
import org.apache.sysml.parser.WhileStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlock;
import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlockCP;
import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
@@ -205,11 +204,10 @@ public class ProgramConverter
* @param forceDeepCopy
*
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static ArrayList<ProgramBlock> rcreateDeepCopyProgramBlocks(ArrayList<ProgramBlock> childBlocks, long pid, int IDPrefix, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<ProgramBlock> tmp = new ArrayList<ProgramBlock>();
@@ -267,11 +265,10 @@ public class ProgramConverter
* @param IDPrefix
* @param prog
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static WhileProgramBlock createDeepCopyWhileProgramBlock(WhileProgramBlock wpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<Instruction> predinst = createDeepCopyInstructionSet(wpb.getPredicate(), pid, IDPrefix, prog, fnStack, fnCreated, plain, true);
WhileProgramBlock tmpPB = new WhileProgramBlock(prog, predinst);
@@ -292,11 +289,10 @@ public class ProgramConverter
* @param IDPrefix
* @param prog
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static IfProgramBlock createDeepCopyIfProgramBlock(IfProgramBlock ipb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<Instruction> predinst = createDeepCopyInstructionSet(ipb.getPredicate(), pid, IDPrefix, prog, fnStack, fnCreated, plain, true);
IfProgramBlock tmpPB = new IfProgramBlock(prog, predinst);
@@ -319,10 +315,9 @@ public class ProgramConverter
* @param prog
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ForProgramBlock createDeepCopyForProgramBlock(ForProgramBlock fpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ForProgramBlock tmpPB = new ForProgramBlock(prog,fpb.getIterablePredicateVars());
tmpPB.setStatementBlock( createForStatementBlockCopy((ForStatementBlock)fpb.getStatementBlock(), pid, plain, forceDeepCopy));
@@ -343,10 +338,9 @@ public class ProgramConverter
* @param prog
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ForProgramBlock createShallowCopyForProgramBlock(ForProgramBlock fpb, Program prog )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ForProgramBlock tmpPB = new ForProgramBlock(prog,fpb.getIterablePredicateVars());
@@ -365,10 +359,9 @@ public class ProgramConverter
* @param prog
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ForProgramBlock createShallowCopyParForProgramBlock(ParForProgramBlock pfpb, Program prog )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ParForProgramBlock tmpPB = new ParForProgramBlock(prog,pfpb.getIterablePredicateVars(),pfpb.getParForParams());
@@ -391,11 +384,10 @@ public class ProgramConverter
* @param IDPrefix
* @param prog
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static ParForProgramBlock createDeepCopyParForProgramBlock(ParForProgramBlock pfpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ParForProgramBlock tmpPB = null;
@@ -432,11 +424,10 @@ public class ProgramConverter
*
* @param oldName
* @param pid
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static void createDeepCopyFunctionProgramBlock(String namespace, String oldName, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//fpb guaranteed to be non-null (checked inside getFunctionProgramBlock)
FunctionProgramBlock fpb = prog.getFunctionProgramBlock(namespace, oldName);
@@ -500,10 +491,9 @@ public class ProgramConverter
* @param fpb
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static FunctionProgramBlock createDeepCopyFunctionProgramBlock(FunctionProgramBlock fpb, HashSet<String> fnStack, HashSet<String> fnCreated)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
if( fpb == null )
throw new DMLRuntimeException("Unable to create a deep copy of a non-existing FunctionProgramBlock.");
@@ -537,10 +527,9 @@ public class ProgramConverter
* @param pid
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ArrayList<Instruction> createDeepCopyInstructionSet(ArrayList<Instruction> instSet, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean cpFunctions)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<Instruction> tmp = new ArrayList<Instruction>();
for( Instruction inst : instSet )
@@ -565,10 +554,9 @@ public class ProgramConverter
* @param pid
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static Instruction cloneInstruction( Instruction oInst, long pid, boolean plain, boolean cpFunctions )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
Instruction inst = null;
String tmpString = oInst.toString();
@@ -597,7 +585,7 @@ public class ProgramConverter
inst = new MRJobInstruction( (MRJobInstruction)oInst );
}
else
- throw new DMLUnsupportedOperationException("Failed to clone instruction: "+oInst);
+ throw new DMLRuntimeException("Failed to clone instruction: "+oInst);
}
catch(Exception ex)
{
@@ -827,10 +815,9 @@ public class ProgramConverter
* @param body
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static String serializeParForBody( ParForBody body )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<ProgramBlock> pbs = body.getChildBlocks();
ArrayList<String> rVnames = body.getResultVarNames();
@@ -900,10 +887,9 @@ public class ProgramConverter
* @param prog
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static String serializeProgram( Program prog, ArrayList<ProgramBlock> pbs )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//note program contains variables, programblocks and function program blocks
//but in order to avoid redundancy, we only serialize function program blocks
@@ -1279,10 +1265,9 @@ public class ProgramConverter
* @param pbs
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static String rSerializeFunctionProgramBlocks(HashMap<String,FunctionProgramBlock> pbs, HashSet<String> cand)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
StringBuilder sb = new StringBuilder();
@@ -1312,10 +1297,9 @@ public class ProgramConverter
* @param pbs
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static String rSerializeProgramBlocks(ArrayList<ProgramBlock> pbs)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
StringBuilder sb = new StringBuilder();
int count = 0;
@@ -1338,10 +1322,9 @@ public class ProgramConverter
* @param pb
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static String rSerializeProgramBlock( ProgramBlock pb)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
StringBuilder sb = new StringBuilder();
@@ -1417,7 +1400,7 @@ public class ProgramConverter
//check for nested remote ParFOR
if( PExecMode.valueOf( pfpb.getParForParams().get( ParForStatementBlock.EXEC_MODE )) == PExecMode.REMOTE_MR )
- throw new DMLUnsupportedOperationException( NOT_SUPPORTED_MR_PARFOR );
+ throw new DMLRuntimeException( NOT_SUPPORTED_MR_PARFOR );
sb.append( serializeStringArray(pfpb.getIterablePredicateVars()) );
sb.append( COMPONENTS_DELIM );
@@ -1536,10 +1519,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ParForBody parseParForBody( String in, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ParForBody body = new ParForBody();
@@ -1594,10 +1576,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static Program parseProgram( String in, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PROG_BEGIN.length(),in.length()-PARFOR_PROG_END.length()).trim();
@@ -1647,10 +1628,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static HashMap<String,FunctionProgramBlock> parseFunctionProgramBlocks( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
HashMap<String,FunctionProgramBlock> ret = new HashMap<String, FunctionProgramBlock>();
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer( in, ELEMENT_DELIM );
@@ -1681,11 +1661,10 @@ public class ProgramConverter
* @param prog
* @param id
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static ArrayList<ProgramBlock> rParseProgramBlocks(String in, Program prog, int id)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<ProgramBlock> pbs = new ArrayList<ProgramBlock>();
String tmpdata = in.substring(PARFOR_PBS_BEGIN.length(),in.length()-PARFOR_PBS_END.length()); ;
@@ -1707,10 +1686,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ProgramBlock rParseProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ProgramBlock pb = null;
@@ -1729,7 +1707,7 @@ public class ProgramConverter
else if ( in.startsWith(PARFOR_PB_BEGIN ) )
pb = rParseGenericProgramBlock( in, prog, id );
else
- throw new DMLUnsupportedOperationException( NOT_SUPPORTED_PB+" "+in );
+ throw new DMLRuntimeException( NOT_SUPPORTED_PB+" "+in );
return pb;
}
@@ -1741,10 +1719,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static WhileProgramBlock rParseWhileProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_WHILE.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1777,10 +1754,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ForProgramBlock rParseForProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_FOR.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1819,10 +1795,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ParForProgramBlock rParseParForProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_PARFOR.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1865,10 +1840,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static IfProgramBlock rParseIfProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_IF.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1903,10 +1877,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static FunctionProgramBlock rParseFunctionProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_FC.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1939,11 +1912,10 @@ public class ProgramConverter
* @param prog
* @param id
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static ExternalFunctionProgramBlock rParseExternalFunctionProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_EFC.length(),in.length()-PARFOR_PB_END.length());
HierarchyAwareStringTokenizer st = new HierarchyAwareStringTokenizer(lin, COMPONENTS_DELIM);
@@ -1983,10 +1955,9 @@ public class ProgramConverter
* @param id
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ProgramBlock rParseGenericProgramBlock( String in, Program prog, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String lin = in.substring( PARFOR_PB_BEGIN.length(),in.length()-PARFOR_PB_END.length());
StringTokenizer st = new StringTokenizer(lin,COMPONENTS_DELIM);
@@ -2003,11 +1974,10 @@ public class ProgramConverter
*
* @param in
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public static ArrayList<Instruction> parseInstructions( String in, int id )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ArrayList<Instruction> insts = new ArrayList<Instruction>();
@@ -2212,10 +2182,9 @@ public class ProgramConverter
* @param in
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static ExecutionContext parseExecutionContext(String in, Program prog)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
ExecutionContext ec = null;
@@ -2249,10 +2218,9 @@ public class ProgramConverter
* @param replacement
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static Instruction saveReplaceThreadID( Instruction inst, String pattern, String replacement )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
//currently known, relevant instructions: createvar, rand, seq, extfunct,
if( inst instanceof MRJobInstruction )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
index a511b9b..484888e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
@@ -31,7 +31,6 @@ import scala.Tuple2;
import org.apache.sysml.api.DMLScript;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -68,13 +67,12 @@ public class RemoteDPParForSpark
* @param replication
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static RemoteParForJobReturn runJob(long pfid, String itervar, String matrixvar, String program, String resultFile, MatrixObject input,
ExecutionContext ec,
PDataPartitionFormat dpf, OutputInfo oi, boolean tSparseCol, //config params
boolean enableCPCaching, int numReducers ) //opt params
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String jobname = "ParFor-DPESP";
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
index cd2875c..7ee578f 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
@@ -29,7 +29,6 @@ import org.apache.spark.TaskContext;
import org.apache.spark.api.java.function.PairFlatMapFunction;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -69,7 +68,7 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
private Accumulator<Integer> _aIters = null;
public RemoteDPParForSparkWorker(String program, String inputVar, String iterVar, boolean cpCaching, MatrixCharacteristics mc, boolean tSparseCol, PDataPartitionFormat dpf, OutputInfo oinfo, Accumulator<Integer> atasks, Accumulator<Integer> aiters)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//keep inputs (unfortunately, spark does not expose task ids and it would be implementation-dependent
//when this constructor is actually called; hence, we do lazy initialization on task execution)
@@ -147,12 +146,11 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
/**
*
* @param ID
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
* @throws IOException
*/
private void configureWorker( long ID )
- throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, IOException
{
_workerID = ID;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
index 639266f..c228840 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
@@ -30,7 +30,6 @@ import scala.Tuple2;
import org.apache.sysml.api.DMLScript;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
import org.apache.sysml.runtime.controlprogram.context.SparkExecutionContext;
@@ -64,11 +63,10 @@ public class RemoteParForSpark
* @param numMappers
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static RemoteParForJobReturn runJob(long pfid, String program, List<Task> tasks, ExecutionContext ec,
boolean cpCaching, int numMappers)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
String jobname = "ParFor-ESP";
long t0 = DMLScript.STATISTICS ? System.nanoTime() : 0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
index 2d5ea5d..18b5ca2 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
@@ -27,7 +27,6 @@ import org.apache.spark.TaskContext;
import org.apache.spark.api.java.function.PairFlatMapFunction;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
import org.apache.sysml.runtime.controlprogram.parfor.util.IDHandler;
import org.apache.sysml.runtime.util.LocalFileUtils;
@@ -51,7 +50,7 @@ public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFun
private Accumulator<Integer> _aIters = null;
public RemoteParForSparkWorker(String program, boolean cpCaching, Accumulator<Integer> atasks, Accumulator<Integer> aiters)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//keep inputs (unfortunately, spark does not expose task ids and it would be implementation-dependent
//when this constructor is actually called; hence, we do lazy initialization on task execution)
@@ -93,12 +92,11 @@ public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFun
/**
*
* @param ID
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
* @throws IOException
*/
private void configureWorker( long ID )
- throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, IOException
{
_workerID = ID;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
index f4db2b5..35d8b84 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
@@ -47,7 +47,6 @@ import org.apache.sysml.parser.WhileStatement;
import org.apache.sysml.parser.Expression.DataType;
import org.apache.sysml.parser.WhileStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -103,7 +102,7 @@ public class OptTreeConverter
}
public static OptTree createOptTree( int ck, double cm, PlanInputType type, ParForStatementBlock pfsb, ParForProgramBlock pfpb, ExecutionContext ec )
- throws DMLUnsupportedOperationException, DMLRuntimeException, HopsException
+ throws DMLRuntimeException, HopsException
{
OptNode root = null;
switch( type )
@@ -133,11 +132,10 @@ public class OptTreeConverter
* @param cm
* @param pfpb
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static OptTree createOptTree( int ck, double cm, ParForProgramBlock pfpb )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
// TODO: Passing an empty variable map here, for now. Must be reevaluated
// whenever this function is used.
@@ -149,7 +147,7 @@ public class OptTreeConverter
}
public static OptTree createAbstractOptTree( int ck, double cm, ParForStatementBlock pfsb, ParForProgramBlock pfpb, Set<String> memo, ExecutionContext ec )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
OptTree tree = null;
OptNode root = null;
@@ -173,11 +171,10 @@ public class OptTreeConverter
* @param vars
* @param topLevel
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static OptNode rCreateOptNode( ProgramBlock pb, LocalVariableMap vars, boolean topLevel, boolean storeObjs )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
OptNode node = null;
@@ -296,11 +293,10 @@ public class OptTreeConverter
* @param instset
* @param vars
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static ArrayList<OptNode> createOptNodes (ArrayList<Instruction> instset, LocalVariableMap vars, boolean storeObjs)
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
ArrayList<OptNode> tmp = new ArrayList<OptNode>(instset.size());
for( Instruction inst : instset )
@@ -313,11 +309,10 @@ public class OptTreeConverter
* @param inst
* @param vars
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static OptNode createOptNode( Instruction inst, LocalVariableMap vars, boolean storeObjs )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
OptNode node = new OptNode(NodeType.INST);
String instStr = inst.toString();
@@ -344,7 +339,7 @@ public class OptTreeConverter
break;
default:
// In initial prototype, parfor is not supported for spark, so this exception will be thrown
- throw new DMLUnsupportedOperationException("Unsupported instruction type.");
+ throw new DMLRuntimeException("Unsupported instruction type.");
}
//create statistics
@@ -891,11 +886,10 @@ public class OptTreeConverter
* @param n
* @param pbOld
* @param pbNew
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static void replaceProgramBlock(OptNode parent, OptNode n, ProgramBlock pbOld, ProgramBlock pbNew, boolean rtMap)
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
ProgramBlock pbParent = null;
if( rtMap )
@@ -933,7 +927,7 @@ public class OptTreeConverter
replaceProgramBlock( fpb.getChildBlocks(), pbOld, pbNew );
}
else
- throw new DMLUnsupportedOperationException("Optimizer doesn't support "+pbParent.getClass().getName());
+ throw new DMLRuntimeException("Optimizer doesn't support "+pbParent.getClass().getName());
//update repository
if( rtMap )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
index edae6a1..6ee8957 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
@@ -51,7 +51,6 @@ import org.apache.sysml.parser.StatementBlock;
import org.apache.sysml.parser.WhileStatement;
import org.apache.sysml.parser.WhileStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -114,10 +113,9 @@ public class OptimizationWrapper
* @param rtprog
* @throws DMLRuntimeException
* @throws LanguageException
- * @throws DMLUnsupportedOperationException
*/
public static void optimize(DMLProgram prog, Program rtprog, boolean monitor)
- throws DMLRuntimeException, LanguageException, DMLUnsupportedOperationException
+ throws DMLRuntimeException, LanguageException
{
LOG.debug("ParFOR Opt: Running optimize all on DML program "+DMLScript.getUUID());
@@ -156,10 +154,9 @@ public class OptimizationWrapper
* @param sb
* @param pb
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static void optimize( POptMode type, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
Timing time = new Timing(true);
@@ -201,12 +198,11 @@ public class OptimizationWrapper
* @param sb
* @param pb
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws
*/
@SuppressWarnings("unused")
private static void optimize( POptMode otype, int ck, double cm, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
Timing time = new Timing(true);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
index 743321b..4d9fd60 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
@@ -28,7 +28,6 @@ import org.apache.commons.logging.LogFactory;
import org.apache.sysml.hops.Hop;
import org.apache.sysml.parser.ParForStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.POptMode;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -74,11 +73,10 @@ public abstract class Optimizer
*
* @param plan
* @return true if plan changed, false otherwise
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public abstract boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec)
- throws DMLRuntimeException, DMLUnsupportedOperationException;
+ throws DMLRuntimeException;
/**
*
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
index a2efb93..2daf841 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
@@ -27,7 +27,6 @@ import org.apache.sysml.hops.OptimizerUtils;
import org.apache.sysml.lops.LopProperties;
import org.apache.sysml.parser.ParForStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock;
import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat;
@@ -77,7 +76,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
*/
@Override
public boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
LOG.debug("--- "+getOptMode()+" OPTIMIZER -------");
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
index 0dde4fb..8344522 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
@@ -69,7 +69,6 @@ import org.apache.sysml.parser.ParForStatementBlock;
import org.apache.sysml.parser.StatementBlock;
import org.apache.sysml.parser.VariableSet;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
import org.apache.sysml.runtime.controlprogram.FunctionProgramBlock;
import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
@@ -212,7 +211,7 @@ public class OptimizerRuleBased extends Optimizer
*/
@Override
public boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
LOG.debug("--- "+getOptMode()+" OPTIMIZER -------");
@@ -877,11 +876,10 @@ public class OptimizerRuleBased extends Optimizer
* @throws DMLRuntimeException
* @throws HopsException
* @throws LopsException
- * @throws DMLUnsupportedOperationException
* @throws IOException
*/
protected void recompileLIX( OptNode n, LocalVariableMap vars )
- throws DMLRuntimeException, HopsException, LopsException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, HopsException, LopsException, IOException
{
Hop h = OptTreeConverter.getAbstractPlanMapping().getMappedHop(n.getID());
@@ -1347,11 +1345,10 @@ public class OptimizerRuleBased extends Optimizer
* @param M
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
@SuppressWarnings("all")
protected boolean rewriteNestedParallelism(OptNode n, double M, boolean flagLIX )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
boolean nested = false;
@@ -2882,10 +2879,9 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void rewriteInjectSparkLoopCheckpointing(OptNode n)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get program blocks of root parfor
Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -2925,10 +2921,9 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void rewriteInjectSparkRepartition(OptNode n, LocalVariableMap vars)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get program blocks of root parfor
Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -3016,10 +3011,9 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void rewriteSetSparkEagerRDDCaching(OptNode n, LocalVariableMap vars)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//get program blocks of root parfor
Object[] progobj = OptTreeConverter.getAbstractPlanMapping().getMappedProg(n.getID());
@@ -3555,10 +3549,9 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void rewriteRemoveRecursiveParFor(OptNode n, LocalVariableMap vars)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
int count = 0; //num removed parfor
@@ -3623,12 +3616,11 @@ public class OptimizerRuleBased extends Optimizer
* @param parfor
* @param recPBs
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws HopsException
* @throws LanguageException
*/
protected void rFindAndUnfoldRecursiveFunction( OptNode n, ParForProgramBlock parfor, HashSet<ParForProgramBlock> recPBs, LocalVariableMap vars )
- throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException, LanguageException
+ throws DMLRuntimeException, HopsException, LanguageException
{
//unfold if found
if( n.getNodeType() == NodeType.FUNCCALL && n.isRecursive())
@@ -3747,11 +3739,10 @@ public class OptimizerRuleBased extends Optimizer
* @param oldName
* @param newName
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws HopsException
*/
protected void rReplaceFunctionNames( OptNode n, String oldName, String newName )
- throws DMLRuntimeException, DMLUnsupportedOperationException, HopsException
+ throws DMLRuntimeException, HopsException
{
if( n.getNodeType() == NodeType.FUNCCALL)
{
@@ -3798,11 +3789,10 @@ public class OptimizerRuleBased extends Optimizer
* @param n
* @param recPBs
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
protected int removeRecursiveParFor( OptNode n, HashSet<ParForProgramBlock> recPBs )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
int count = 0;
@@ -3852,10 +3842,9 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected void rewriteRemoveUnnecessaryParFor(OptNode n)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
int count = removeUnnecessaryParFor( n );
@@ -3867,11 +3856,10 @@ public class OptimizerRuleBased extends Optimizer
*
* @param n
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
protected int removeUnnecessaryParFor( OptNode n )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
int count = 0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
index 5289ce2..6d571ea 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
@@ -59,7 +59,6 @@ import org.apache.sysml.parser.ParseException;
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.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ExternalFunctionProgramBlockCP;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.Program;
@@ -428,11 +427,10 @@ public class PerfTestTool
/**
*
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
private static void registerInstructions()
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
//reset ID sequences for consistent IDs
_seqInst.reset();
@@ -718,11 +716,10 @@ public class PerfTestTool
/**
*
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws IOException
*/
private static void executeTest( )
- throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, IOException
{
System.out.println("SystemML PERFORMANCE TEST TOOL:");
@@ -826,11 +823,10 @@ public class PerfTestTool
*
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws IOException
*/
private static double executeTestCase1D( TestMeasure m, InternalTestVariable v, DataFormat df, double varValue, ProgramBlock pb, boolean vectors, IOSchema schema, ExecutionContext ec )
- throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, IOException
{
double datasize = -1;
double dim1 = -1, dim2 = -1;
@@ -950,11 +946,10 @@ public class PerfTestTool
* @param schema
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
* @throws IOException
*/
private static double executeTestCaseMD( TestMeasure m, InternalTestVariable[] v, DataFormat df, double[] varValue, ProgramBlock pb, IOSchema schema, ExecutionContext ec )
- throws DMLRuntimeException, DMLUnsupportedOperationException, IOException
+ throws DMLRuntimeException, IOException
{
//double datasize = DEFAULT_DATASIZE;
double sparsity = DEFAULT_SPARSITY;
@@ -1018,10 +1013,9 @@ public class PerfTestTool
* @param pb
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public static double executeGenericProgramBlock( TestMeasure measure, ProgramBlock pb, ExecutionContext ec )
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
double value = 0;
try
@@ -1276,13 +1270,12 @@ public class PerfTestTool
/**
*
* @param fname
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
* @throws XMLStreamException
* @throws IOException
*/
public static void externalReadProfile( String fname )
- throws DMLUnsupportedOperationException, DMLRuntimeException, XMLStreamException, IOException
+ throws DMLRuntimeException, XMLStreamException, IOException
{
//validate external name (security issue)
if( !LocalFileUtils.validateExternalFilename(fname, false) )
@@ -1299,11 +1292,11 @@ public class PerfTestTool
* @param dirname
* @return
* @throws IOException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
@SuppressWarnings("all")
private static HashMap<Integer,Long> writeResults( String dirname )
- throws IOException, DMLUnsupportedOperationException
+ throws IOException, DMLRuntimeException
{
HashMap<Integer,Long> map = new HashMap<Integer, Long>();
int count = 1;
@@ -1386,7 +1379,7 @@ public class PerfTestTool
//sbuff[offset+2*plen+plen*(plen-1)/2] = String.valueOf(tmp);
}
else
- throw new DMLUnsupportedOperationException("More than 3 dims currently not supported.");
+ throw new DMLRuntimeException("More than 3 dims currently not supported.");
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
index a914c0b..8844dc6 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
@@ -44,7 +44,6 @@ import org.apache.sysml.parser.StatementBlock;
import org.apache.sysml.parser.WhileStatement;
import org.apache.sysml.parser.WhileStatementBlock;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.ForProgramBlock;
import org.apache.sysml.runtime.controlprogram.IfProgramBlock;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
@@ -73,13 +72,12 @@ public class ProgramRecompiler
* @param sbs
* @return
* @throws IOException
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
* @throws LopsException
* @throws HopsException
*/
public static ArrayList<ProgramBlock> generatePartitialRuntimeProgram(Program rtprog, ArrayList<StatementBlock> sbs)
- throws LopsException, DMLRuntimeException, DMLUnsupportedOperationException, IOException, HopsException
+ throws LopsException, DMLRuntimeException, IOException, HopsException
{
ArrayList<ProgramBlock> ret = new ArrayList<ProgramBlock>();
DMLConfig config = ConfigurationManager.getDMLConfig();
@@ -110,11 +108,10 @@ public class ProgramRecompiler
* @param var
* @param ec
* @param force
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static void rFindAndRecompileIndexingHOP( StatementBlock sb, ProgramBlock pb, String var, ExecutionContext ec, boolean force )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if( pb instanceof IfProgramBlock && sb instanceof IfStatementBlock )
{
@@ -222,11 +219,10 @@ public class ProgramRecompiler
* @param parforSB
* @param vars
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static LocalVariableMap getReusableScalarVariables( DMLProgram prog, StatementBlock parforSB, LocalVariableMap vars )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
LocalVariableMap constVars = new LocalVariableMap();
@@ -244,7 +240,7 @@ public class ProgramRecompiler
}
public static void replaceConstantScalarVariables( StatementBlock sb, LocalVariableMap vars )
- throws DMLUnsupportedOperationException, DMLRuntimeException, HopsException
+ throws DMLRuntimeException, HopsException
{
if( sb instanceof IfStatementBlock )
{
@@ -312,11 +308,10 @@ public class ProgramRecompiler
* @param parforSB
* @param var
* @return
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
public static boolean isApplicableForReuseVariable( DMLProgram prog, StatementBlock parforSB, String var )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
boolean ret = false;
@@ -331,11 +326,10 @@ public class ProgramRecompiler
* @param sb
* @param parforSB
* @param var
- * @throws DMLUnsupportedOperationException
* @throws DMLRuntimeException
*/
private static boolean isApplicableForReuseVariable( StatementBlock sb, StatementBlock parforSB, String var )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
boolean ret = false;
@@ -533,10 +527,9 @@ public class ProgramRecompiler
* @param offset
* @return
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
protected static ArrayList<Instruction> createNestedParallelismToInstructionSet(String iterVar, String offset)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//create instruction string
StringBuilder sb = new StringBuilder("CP"+Lop.OPERAND_DELIMITOR+"+"+Lop.OPERAND_DELIMITOR);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java b/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
index beea376..20299e9 100644
--- a/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
+++ b/src/main/java/org/apache/sysml/runtime/functionobjects/Builtin.java
@@ -26,7 +26,6 @@ import org.apache.commons.math3.util.FastMath;
import org.apache.sysml.api.DMLScript;
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.DMLScriptException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
/**
@@ -281,7 +280,7 @@ public class Builtin extends ValueFunction
throw new CloneNotSupportedException();
}
- public boolean checkArity(int _arity) throws DMLUnsupportedOperationException {
+ public boolean checkArity(int _arity) throws DMLRuntimeException {
switch (bFunc) {
case ABS:
case SIN:
@@ -319,7 +318,7 @@ public class Builtin extends ValueFunction
case MIN:
return (_arity == 2);
default:
- throw new DMLUnsupportedOperationException("checkNumberOfOperands(): Unknown opcode: " + bFunc);
+ throw new DMLRuntimeException("checkNumberOfOperands(): Unknown opcode: " + bFunc);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
index 8ecb2e1..a84b912 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/CPInstructionParser.java
@@ -25,7 +25,6 @@ import org.apache.sysml.lops.DataGen;
import org.apache.sysml.lops.UnaryCP;
import org.apache.sysml.lops.LopProperties.ExecType;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.instructions.cp.AggregateBinaryCPInstruction;
import org.apache.sysml.runtime.instructions.cp.AggregateTernaryCPInstruction;
import org.apache.sysml.runtime.instructions.cp.AggregateUnaryCPInstruction;
@@ -257,7 +256,7 @@ public class CPInstructionParser extends InstructionParser
}
public static CPInstruction parseSingleInstruction (String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if ( str == null || str.isEmpty() )
return null;
@@ -272,7 +271,7 @@ public class CPInstructionParser extends InstructionParser
}
public static CPInstruction parseSingleInstruction ( CPINSTRUCTION_TYPE cptype, String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
ExecType execType = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java b/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
index 3b28762..97f792d 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/Instruction.java
@@ -26,7 +26,6 @@ import org.apache.sysml.api.monitoring.Location;
import org.apache.sysml.lops.Lop;
import org.apache.sysml.parser.DataIdentifier;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.controlprogram.context.ExecutionContext;
@@ -197,11 +196,10 @@ public abstract class Instruction
*
* @param ec
* @return
- * @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
+ * @throws DMLRuntimeException
*/
public Instruction preprocessInstruction(ExecutionContext ec)
- throws DMLRuntimeException, DMLUnsupportedOperationException
+ throws DMLRuntimeException
{
//update debug status
ec.updateDebugState( this );
@@ -215,10 +213,9 @@ public abstract class Instruction
*
* @param ec
* @throws DMLRuntimeException
- * @throws DMLUnsupportedOperationException
*/
public abstract void processInstruction(ExecutionContext ec)
- throws DMLRuntimeException, DMLUnsupportedOperationException;
+ throws DMLRuntimeException;
/**
* This method should be used for any tear down after executing this instruction.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
index e00cde3..5ae3124 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionParser.java
@@ -21,7 +21,6 @@ package org.apache.sysml.runtime.instructions;
import org.apache.sysml.lops.LopProperties.ExecType;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.instructions.cp.CPInstruction.CPINSTRUCTION_TYPE;
import org.apache.sysml.runtime.instructions.mr.MRInstruction.MRINSTRUCTION_TYPE;
import org.apache.sysml.runtime.instructions.spark.SPInstruction.SPINSTRUCTION_TYPE;
@@ -30,7 +29,7 @@ import org.apache.sysml.runtime.instructions.spark.SPInstruction.SPINSTRUCTION_T
public class InstructionParser
{
public static Instruction parseSingleInstruction ( String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if ( str == null || str.isEmpty() )
return null;
@@ -59,7 +58,7 @@ public class InstructionParser
}
public static Instruction[] parseMixedInstructions ( String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if ( str == null || str.isEmpty() )
return null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java b/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
index 675a7a0..c8d406e 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/InstructionUtils.java
@@ -40,7 +40,6 @@ import org.apache.sysml.lops.WeightedSquaredLossR;
import org.apache.sysml.lops.WeightedUnaryMM;
import org.apache.sysml.lops.WeightedUnaryMMR;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.functionobjects.And;
import org.apache.sysml.runtime.functionobjects.Builtin;
import org.apache.sysml.runtime.functionobjects.Builtin.BuiltinFunctionCode;
@@ -229,11 +228,8 @@ public class InstructionUtils
*
* @param str
* @return
- * @throws DMLUnsupportedOperationException
*/
- public static MRINSTRUCTION_TYPE getMRType( String str )
- throws DMLUnsupportedOperationException
- {
+ public static MRINSTRUCTION_TYPE getMRType( String str ) {
String opcode = getOpCode(str);
MRINSTRUCTION_TYPE mrtype = MRInstructionParser.String2MRInstructionType.get( opcode );
return mrtype;
@@ -243,11 +239,8 @@ public class InstructionUtils
*
* @param str
* @return
- * @throws DMLUnsupportedOperationException
*/
- public static SPINSTRUCTION_TYPE getSPType( String str )
- throws DMLUnsupportedOperationException
- {
+ public static SPINSTRUCTION_TYPE getSPType( String str ) {
String opcode = getOpCode(str);
SPINSTRUCTION_TYPE sptype = SPInstructionParser.String2SPInstructionType.get( opcode );
return sptype;
@@ -257,11 +250,8 @@ public class InstructionUtils
*
* @param str
* @return
- * @throws DMLUnsupportedOperationException
*/
- public static CPINSTRUCTION_TYPE getCPType( String str )
- throws DMLUnsupportedOperationException
- {
+ public static CPINSTRUCTION_TYPE getCPType( String str ) {
String opcode = getOpCode(str);
CPINSTRUCTION_TYPE cptype = CPInstructionParser.String2CPInstructionType.get( opcode );
return cptype;
@@ -272,14 +262,12 @@ public class InstructionUtils
* @param opcode
* @return
*/
- public static boolean isBuiltinFunction ( String opcode )
- {
+ public static boolean isBuiltinFunction( String opcode ) {
Builtin.BuiltinFunctionCode bfc = Builtin.String2BuiltinFunctionCode.get(opcode);
return (bfc != null);
}
- public static boolean isOperand(String str)
- {
+ public static boolean isOperand(String str) {
//note: split required for empty tokens
String[] parts = str.split(Instruction.DATATYPE_PREFIX);
return (parts.length > 1);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/6c89c3a7/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java b/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
index 993f0b1..894e7e9 100644
--- a/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
+++ b/src/main/java/org/apache/sysml/runtime/instructions/MRInstructionParser.java
@@ -36,7 +36,6 @@ import org.apache.sysml.lops.WeightedSquaredLossR;
import org.apache.sysml.lops.WeightedUnaryMM;
import org.apache.sysml.lops.WeightedUnaryMMR;
import org.apache.sysml.runtime.DMLRuntimeException;
-import org.apache.sysml.runtime.DMLUnsupportedOperationException;
import org.apache.sysml.runtime.instructions.mr.AggregateBinaryInstruction;
import org.apache.sysml.runtime.instructions.mr.AggregateInstruction;
import org.apache.sysml.runtime.instructions.mr.AggregateUnaryInstruction;
@@ -297,7 +296,7 @@ public class MRInstructionParser extends InstructionParser
public static MRInstruction parseSingleInstruction (String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if ( str == null || str.isEmpty() )
return null;
@@ -307,7 +306,7 @@ public class MRInstructionParser extends InstructionParser
}
public static MRInstruction parseSingleInstruction (MRINSTRUCTION_TYPE mrtype, String str )
- throws DMLUnsupportedOperationException, DMLRuntimeException
+ throws DMLRuntimeException
{
if ( str == null || str.isEmpty() )
return null;
@@ -451,7 +450,7 @@ public class MRInstructionParser extends InstructionParser
}
}
- public static MRInstruction[] parseMixedInstructions ( String str ) throws DMLUnsupportedOperationException, DMLRuntimeException {
+ public static MRInstruction[] parseMixedInstructions ( String str ) throws DMLRuntimeException {
if ( str == null || str.isEmpty() )
return null;
@@ -464,7 +463,7 @@ public class MRInstructionParser extends InstructionParser
return mrinst;
}
- public static AggregateInstruction[] parseAggregateInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static AggregateInstruction[] parseAggregateInstructions(String str) throws DMLRuntimeException
{
AggregateInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -480,7 +479,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static ReblockInstruction[] parseReblockInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static ReblockInstruction[] parseReblockInstructions(String str) throws DMLRuntimeException
{
ReblockInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -496,7 +495,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static CSVReblockInstruction[] parseCSVReblockInstructions(String str) throws DMLRuntimeException
{
CSVReblockInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -512,7 +511,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static CSVWriteInstruction[] parseCSVWriteInstructions(String str) throws DMLRuntimeException
{
CSVWriteInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -528,7 +527,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static AggregateBinaryInstruction[] parseAggregateBinaryInstructions(String str) throws DMLRuntimeException
{
AggregateBinaryInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -544,7 +543,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static DataGenMRInstruction[] parseDataGenInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static DataGenMRInstruction[] parseDataGenInstructions(String str) throws DMLRuntimeException
{
DataGenMRInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -560,7 +559,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static MRInstruction[] parseCombineInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static MRInstruction[] parseCombineInstructions(String str) throws DMLRuntimeException
{
MRInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -582,7 +581,7 @@ public class MRInstructionParser extends InstructionParser
return inst;
}
- public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str) throws DMLUnsupportedOperationException, DMLRuntimeException
+ public static CM_N_COVInstruction[] parseCM_N_COVInstructions(String str) throws DMLRuntimeException
{
CM_N_COVInstruction[] inst=null;
if(str!=null && !str.isEmpty())
@@ -599,7 +598,7 @@ public class MRInstructionParser extends InstructionParser
}
public static GroupedAggregateInstruction[] parseGroupedAggInstructions(String str)
- throws DMLUnsupportedOperationException, DMLRuntimeException{
+ throws DMLRuntimeException{
GroupedAggregateInstruction[] inst=null;
if(str!=null && !str.isEmpty())
{