You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/10/20 23:12:21 UTC
[2/2] incubator-systemml git commit: [SYSTEMML-842] Fix javadoc
warnings in api package
[SYSTEMML-842] Fix javadoc warnings in api package
Closes #267.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/e18f0631
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/e18f0631
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/e18f0631
Branch: refs/heads/master
Commit: e18f0631ffa4f5e24768418a0642ac0149109796
Parents: d6a9b91
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Thu Oct 20 16:07:05 2016 -0700
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Thu Oct 20 16:07:05 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/sysml/api/DMLException.java | 13 -
.../java/org/apache/sysml/api/DMLScript.java | 54 +-
.../java/org/apache/sysml/api/MLContext.java | 653 ++++++++++---------
.../org/apache/sysml/api/MLContextProxy.java | 18 -
.../java/org/apache/sysml/api/MLMatrix.java | 19 +-
.../java/org/apache/sysml/api/MLOutput.java | 28 +-
.../org/apache/sysml/api/jmlc/Connection.java | 40 +-
.../apache/sysml/api/jmlc/PreparedScript.java | 42 +-
.../apache/sysml/api/jmlc/ResultVariables.java | 14 +-
.../apache/sysml/api/mlcontext/MLContext.java | 3 +
.../api/mlcontext/MLContextConversionUtil.java | 4 +
.../sysml/api/mlcontext/MLContextUtil.java | 1 +
.../apache/sysml/api/mlcontext/MLResults.java | 550 +++++++++++++++-
.../sysml/api/mlcontext/ScriptExecutor.java | 3 +-
.../api/monitoring/SparkMonitoringUtil.java | 6 +-
15 files changed, 954 insertions(+), 494 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/DMLException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/DMLException.java b/src/main/java/org/apache/sysml/api/DMLException.java
index 907b882..7da5aef 100644
--- a/src/main/java/org/apache/sysml/api/DMLException.java
+++ b/src/main/java/org/apache/sysml/api/DMLException.java
@@ -29,31 +29,18 @@ public class DMLException extends Exception
private static final long serialVersionUID = 1L;
-
- /**
- * @see java.lang.Exception#Exception()
- */
public DMLException() {
super();
}
- /**
- * @see java.lang.Exception#Exception(String)
- */
public DMLException(String message) {
super(message);
}
- /**
- * @see java.lang.Exception#Exception(Throwable)
- */
public DMLException(Throwable cause) {
super(cause);
}
- /**
- * @see java.lang.Exception#Exception(String, Throwable)
- */
public DMLException(String message, Throwable cause) {
super(message, cause);
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/DMLScript.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/DMLScript.java b/src/main/java/org/apache/sysml/api/DMLScript.java
index a9e4a8e..3f4515e 100644
--- a/src/main/java/org/apache/sysml/api/DMLScript.java
+++ b/src/main/java/org/apache/sysml/api/DMLScript.java
@@ -162,7 +162,7 @@ public class DMLScript
* Used to set master UUID on all nodes (in parfor remote_mr, where DMLScript passed)
* in order to simplify cleanup of scratch_space and local working dirs.
*
- * @param uuid
+ * @param uuid master UUID to set on all nodes
*/
public static void setUUID(String uuid)
{
@@ -185,9 +185,9 @@ public class DMLScript
/**
* Default DML script invocation (e.g., via 'hadoop jar SystemML.jar -f Test.dml')
*
- * @param args
- * @throws IOException
- * @throws DMLException
+ * @param args command-line arguments
+ * @throws IOException if an IOException occurs
+ * @throws DMLException if a DMLException occurs
*/
public static void main(String[] args)
throws IOException, DMLException
@@ -212,16 +212,6 @@ public class DMLScript
return executeScript( conf, args );
}
- /**
- * This version of executeScript() is invoked from RJaqlUdf (from BigR).
- *
- * @param conf
- * @param args
- * @param suppress
- * @return
- * @throws DMLException
- * @throws ParseException
- */
public static String executeScript( Configuration conf, String[] args, boolean suppress)
throws DMLException
{
@@ -238,11 +228,11 @@ public class DMLScript
* Single entry point for all public invocation alternatives (e.g.,
* main, executeScript, JaqlUdf etc)
*
- * @param conf
- * @param args
- * @return
- * @throws DMLException
- * @throws ParseException
+ * @param conf Hadoop configuration
+ * @param args arguments
+ * @return true if success, false otherwise
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public static boolean executeScript( Configuration conf, String[] args )
throws DMLException
@@ -391,12 +381,6 @@ public class DMLScript
// private internal utils (argument parsing)
////////
- /**
- *
- * @param hasNamedArgs
- * @param args
- * @throws LanguageException
- */
protected static Map<String,String> createArgumentsMap(boolean hasNamedArgs, String[] args)
throws LanguageException
{
@@ -450,14 +434,6 @@ public class DMLScript
return argMap;
}
- /**
- *
- * @param argname
- * @param script
- * @return
- * @throws IOException
- * @throws LanguageException
- */
protected static String readDMLScript( String argname, String script )
throws IOException, LanguageException
{
@@ -775,12 +751,6 @@ public class DMLScript
}
}
- /**
- * @throws ParseException
- * @throws IOException
- * @throws DMLRuntimeException
- *
- */
public static void initHadoopExecution( DMLConfig config )
throws IOException, ParseException, DMLRuntimeException
{
@@ -865,12 +835,6 @@ public class DMLScript
throw new DMLRuntimeException("Invalid (non-trustworthy) hdfs working directory.");
}
- /**
- *
- * @param config
- * @throws IOException
- * @throws ParseException
- */
public static void cleanupHadoopExecution( DMLConfig config )
throws IOException, ParseException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/MLContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLContext.java b/src/main/java/org/apache/sysml/api/MLContext.java
index 83da62c..aa64c16 100644
--- a/src/main/java/org/apache/sysml/api/MLContext.java
+++ b/src/main/java/org/apache/sysml/api/MLContext.java
@@ -100,27 +100,27 @@ import org.apache.sysml.utils.Statistics;
* <p>
* Typical usage for MLContext is as follows:
* <pre><code>
- * scala> import org.apache.sysml.api.MLContext
+ * scala> import org.apache.sysml.api.MLContext
* </code></pre>
* <p>
* Create input DataFrame from CSV file and potentially perform some feature transformation
* <pre><code>
- * scala> val W = sqlContext.load("com.databricks.spark.csv", Map("path" -> "W.csv", "header" -> "false"))
- * scala> val H = sqlContext.load("com.databricks.spark.csv", Map("path" -> "H.csv", "header" -> "false"))
- * scala> val V = sqlContext.load("com.databricks.spark.csv", Map("path" -> "V.csv", "header" -> "false"))
+ * scala> val W = sqlContext.load("com.databricks.spark.csv", Map("path" -> "W.csv", "header" -> "false"))
+ * scala> val H = sqlContext.load("com.databricks.spark.csv", Map("path" -> "H.csv", "header" -> "false"))
+ * scala> val V = sqlContext.load("com.databricks.spark.csv", Map("path" -> "V.csv", "header" -> "false"))
* </code></pre>
* <p>
* Create MLContext
* <pre><code>
- * scala> val ml = new MLContext(sc)
+ * scala> val ml = new MLContext(sc)
* </code></pre>
* <p>
* Register input and output DataFrame/RDD
* Supported format:
* <ol>
* <li> DataFrame
- * <li> CSV/Text (as JavaRDD<String> or JavaPairRDD<LongWritable, Text>)
- * <li> Binary blocked RDD (JavaPairRDD<MatrixIndexes,MatrixBlock>))
+ * <li> CSV/Text (as JavaRDD<String> or JavaPairRDD<LongWritable, Text>)
+ * <li> Binary blocked RDD (JavaPairRDD<MatrixIndexes,MatrixBlock>))
* </ol>
* Also overloaded to support metadata information such as format, rlen, clen, ...
* Please note the variable names given below in quotes correspond to the variables in DML script.
@@ -128,46 +128,46 @@ import org.apache.sysml.utils.Statistics;
* Currently, only matrix variables are supported through registerInput/registerOutput interface.
* To pass scalar variables, use named/positional arguments (described later) or wrap them into matrix variable.
* <pre><code>
- * scala> ml.registerInput("V", V)
- * scala> ml.registerInput("W", W)
- * scala> ml.registerInput("H", H)
- * scala> ml.registerOutput("H")
- * scala> ml.registerOutput("W")
+ * scala> ml.registerInput("V", V)
+ * scala> ml.registerInput("W", W)
+ * scala> ml.registerInput("H", H)
+ * scala> ml.registerOutput("H")
+ * scala> ml.registerOutput("W")
* </code></pre>
* <p>
* Call script with default arguments:
* <pre><code>
- * scala> val outputs = ml.execute("GNMF.dml")
+ * scala> val outputs = ml.execute("GNMF.dml")
* </code></pre>
* <p>
* Also supported: calling script with positional arguments (args) and named arguments (nargs):
* <pre><code>
- * scala> val args = Array("V.mtx", "W.mtx", "H.mtx", "2000", "1500", "50", "1", "WOut.mtx", "HOut.mtx")
- * scala> val nargs = Map("maxIter"->"1", "V" -> "")
- * scala> val outputs = ml.execute("GNMF.dml", args) # or ml.execute("GNMF_namedArgs.dml", nargs)
+ * scala> val args = Array("V.mtx", "W.mtx", "H.mtx", "2000", "1500", "50", "1", "WOut.mtx", "HOut.mtx")
+ * scala> val nargs = Map("maxIter"->"1", "V" -> "")
+ * scala> val outputs = ml.execute("GNMF.dml", args) # or ml.execute("GNMF_namedArgs.dml", nargs)
* </code></pre>
* <p>
* To run the script again using different (or even same arguments), but using same registered input/outputs:
* <pre><code>
- * scala> val new_outputs = ml.execute("GNMF.dml", new_args)
+ * scala> val new_outputs = ml.execute("GNMF.dml", new_args)
* </code></pre>
* <p>
* However, to register new input/outputs, you need to first reset MLContext
* <pre><code>
- * scala> ml.reset()
- * scala> ml.registerInput("V", newV)
+ * scala> ml.reset()
+ * scala> ml.registerInput("V", newV)
* </code></pre>
* <p>
* Experimental API:
* To monitor performance (only supported for Spark 1.4.0 or higher),
* <pre><code>
- * scala> val ml = new MLContext(sc, true)
+ * scala> val ml = new MLContext(sc, true)
* </code></pre>
* <p>
* If monitoring performance is enabled,
* <pre><code>
- * scala> print(ml.getMonitoringUtil().getExplainOutput())
- * scala> ml.getMonitoringUtil().getRuntimeInfoInHTML("runtime.html")
+ * scala> print(ml.getMonitoringUtil().getExplainOutput())
+ * scala> ml.getMonitoringUtil().getRuntimeInfoInHTML("runtime.html")
* </code></pre>
* <p>
* Note: The execute(...) methods does not support parallel calls from same or different MLContext.
@@ -212,7 +212,7 @@ public class MLContext {
/**
* Experimental API. Not supported in Python MLContext API.
- * @return
+ * @return SparkMonitoringUtil the Spark monitoring util
*/
public SparkMonitoringUtil getMonitoringUtil() {
return _monitorUtils;
@@ -221,8 +221,8 @@ public class MLContext {
/**
* Create an associated MLContext for given spark session.
- * @param sc
- * @throws DMLRuntimeException
+ * @param sc SparkContext
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(SparkContext sc) throws DMLRuntimeException {
initializeSpark(sc, false, false);
@@ -230,8 +230,8 @@ public class MLContext {
/**
* Create an associated MLContext for given spark session.
- * @param sc
- * @throws DMLRuntimeException
+ * @param sc JavaSparkContext
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(JavaSparkContext sc) throws DMLRuntimeException {
initializeSpark(sc.sc(), false, false);
@@ -239,8 +239,8 @@ public class MLContext {
/**
* Allow users to provide custom named-value configuration.
- * @param paramName
- * @param paramVal
+ * @param paramName parameter name
+ * @param paramVal parameter value
*/
public void setConfig(String paramName, String paramVal) {
_additionalConfigs.put(paramName, paramVal);
@@ -253,14 +253,14 @@ public class MLContext {
/**
* Register DataFrame as input. DataFrame is assumed to be in row format and each cell can be converted into double
* through Double.parseDouble(cell.toString()). This is suitable for passing dense matrices. For sparse matrices,
- * consider passing through text format (using JavaRDD<String>, format="text")
+ * consider passing through text format (using JavaRDD<String>, format="text")
* <p>
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param df
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param df the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, DataFrame df) throws DMLRuntimeException {
registerInput(varName, df, false);
@@ -273,9 +273,9 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param df
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param df the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerFrameInput(String varName, DataFrame df) throws DMLRuntimeException {
registerFrameInput(varName, df, false);
@@ -286,10 +286,10 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param df
+ * @param varName variable name
+ * @param df the DataFrame
* @param containsID false if the DataFrame has an column ID which denotes the row ID.
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, DataFrame df, boolean containsID) throws DMLRuntimeException {
int blksz = ConfigurationManager.getBlocksize();
@@ -303,10 +303,10 @@ public class MLContext {
* Register DataFrame as input. DataFrame is assumed to be in row format and each cell can be converted into
* SystemML frame row. Each column could be of type, Double, Float, Long, Integer, String or Boolean.
* <p>
- * @param varName
- * @param df
+ * @param varName variable name
+ * @param df the DataFrame
* @param containsID false if the DataFrame has an column ID which denotes the row ID.
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerFrameInput(String varName, DataFrame df, boolean containsID) throws DMLRuntimeException {
int blksz = ConfigurationManager.getBlocksize();
@@ -317,9 +317,9 @@ public class MLContext {
/**
* Experimental API. Not supported in Python MLContext API.
- * @param varName
- * @param df
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param df the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, MLMatrix df) throws DMLRuntimeException {
registerInput(varName, MLMatrix.getRDDLazily(df), df.mc);
@@ -333,14 +333,14 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param hasHeader
- * @param delim
- * @param fill
- * @param fillValue
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the RDD
+ * @param format the format
+ * @param hasHeader is there a header
+ * @param delim the delimiter
+ * @param fill if true, fill, otherwise don't fill
+ * @param fillValue the fill value
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rdd, String format, boolean hasHeader,
String delim, boolean fill, double fillValue) throws DMLRuntimeException {
@@ -353,14 +353,14 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param hasHeader
- * @param delim
- * @param fill
- * @param fillValue
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the RDD
+ * @param format the format
+ * @param hasHeader is there a header
+ * @param delim the delimiter
+ * @param fill if true, fill, otherwise don't fill
+ * @param fillValue the fill value
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, RDD<String> rdd, String format, boolean hasHeader,
String delim, boolean fill, double fillValue) throws DMLRuntimeException {
@@ -373,17 +373,17 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param hasHeader
- * @param delim
- * @param fill
- * @param fillValue
- * @param rlen
- * @param clen
- * @param nnz
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the RDD
+ * @param format the format
+ * @param hasHeader is there a header
+ * @param delim the delimiter
+ * @param fill if true, fill, otherwise don't fill
+ * @param fillValue the fill value
+ * @param rlen rows
+ * @param clen columns
+ * @param nnz non-zeros
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, RDD<String> rdd, String format, boolean hasHeader,
String delim, boolean fill, double fillValue, long rlen, long clen, long nnz) throws DMLRuntimeException {
@@ -396,17 +396,17 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param hasHeader
- * @param delim
- * @param fill
- * @param fillValue
- * @param rlen
- * @param clen
- * @param nnz
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaRDD
+ * @param format the format
+ * @param hasHeader is there a header
+ * @param delim the delimiter
+ * @param fill if true, fill, otherwise don't fill
+ * @param fillValue the fill value
+ * @param rlen rows
+ * @param clen columns
+ * @param nnz non-zeros
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rdd, String format, boolean hasHeader,
String delim, boolean fill, double fillValue, long rlen, long clen, long nnz) throws DMLRuntimeException {
@@ -420,10 +420,10 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the RDD
+ * @param format the format
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, RDD<String> rdd, String format) throws DMLRuntimeException {
registerInput(varName, rdd.toJavaRDD().mapToPair(new ConvertStringToLongTextPair()), format, -1, -1, -1, null);
@@ -435,10 +435,10 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaRDD
+ * @param format the format
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rdd, String format) throws DMLRuntimeException {
registerInput(varName, rdd.mapToPair(new ConvertStringToLongTextPair()), format, -1, -1, -1, null);
@@ -450,12 +450,12 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param rlen
- * @param clen
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaRDD
+ * @param format the format
+ * @param rlen rows
+ * @param clen columns
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rdd, String format, long rlen, long clen) throws DMLRuntimeException {
registerInput(varName, rdd.mapToPair(new ConvertStringToLongTextPair()), format, rlen, clen, -1, null);
@@ -467,12 +467,12 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param rlen
- * @param clen
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the RDD
+ * @param format the format
+ * @param rlen rows
+ * @param clen columns
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, RDD<String> rdd, String format, long rlen, long clen) throws DMLRuntimeException {
registerInput(varName, rdd.toJavaRDD().mapToPair(new ConvertStringToLongTextPair()), format, rlen, clen, -1, null);
@@ -484,13 +484,13 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param rlen
- * @param clen
- * @param nnz
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaRDD
+ * @param format the format
+ * @param rlen rows
+ * @param clen columns
+ * @param nnz non-zeros
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rdd, String format, long rlen, long clen, long nnz) throws DMLRuntimeException {
registerInput(varName, rdd.mapToPair(new ConvertStringToLongTextPair()), format, rlen, clen, nnz, null);
@@ -502,13 +502,13 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param rlen
- * @param clen
- * @param nnz
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaRDD
+ * @param format the format
+ * @param rlen rows
+ * @param clen columns
+ * @param nnz non-zeros
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, RDD<String> rdd, String format, long rlen, long clen, long nnz) throws DMLRuntimeException {
registerInput(varName, rdd.toJavaRDD().mapToPair(new ConvertStringToLongTextPair()), format, rlen, clen, nnz, null);
@@ -564,15 +564,14 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param format
- * @param rlen
- * @param clen
- * @param props
- * @schema schema
- * List of column types.
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rddIn the JavaPairRDD
+ * @param format the format
+ * @param rlen rows
+ * @param clen columns
+ * @param props properties
+ * @param schema List of column types
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaRDD<String> rddIn, String format, long rlen, long clen, FileFormatProperties props,
List<ValueType> schema) throws DMLRuntimeException {
@@ -649,11 +648,11 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param rlen
- * @param clen
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaPairRDD
+ * @param rlen rows
+ * @param clen columns
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, long rlen, long clen) throws DMLRuntimeException {
//TODO replace default blocksize
@@ -666,13 +665,13 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaPairRDD
+ * @param rlen rows
+ * @param clen columns
+ * @param brlen block rows
+ * @param bclen block columns
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, long rlen, long clen, int brlen, int bclen) throws DMLRuntimeException {
registerInput(varName, rdd, rlen, clen, brlen, bclen, -1);
@@ -685,14 +684,14 @@ public class MLContext {
* Marks the variable in the DML script as input variable.
* Note that this expects a "varName = read(...)" statement in the DML script which through non-MLContext invocation
* would have been created by reading a HDFS file.
- * @param varName
- * @param rdd
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @param nnz
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @param rdd the JavaPairRDD
+ * @param rlen rows
+ * @param clen columns
+ * @param brlen block rows
+ * @param bclen block columns
+ * @param nnz non-zeros
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerInput(String varName, JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, long rlen, long clen, int brlen, int bclen, long nnz) throws DMLRuntimeException {
if(rlen == -1 || clen == -1) {
@@ -746,8 +745,8 @@ public class MLContext {
* Marks the variable in the DML script as output variable.
* Note that this expects a "write(varName, ...)" statement in the DML script which through non-MLContext invocation
* would have written the matrix to HDFS.
- * @param varName
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void registerOutput(String varName) throws DMLRuntimeException {
if(!(DMLScript.rtplatform == RUNTIME_PLATFORM.SPARK || DMLScript.rtplatform == RUNTIME_PLATFORM.HYBRID_SPARK)) {
@@ -765,12 +764,13 @@ public class MLContext {
/**
* Execute DML script by passing named arguments using specified config file.
* @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
- * @param namedArgs
- * @param parsePyDML
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param namedArgs named arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, Map<String, String> namedArgs, boolean parsePyDML, String configFilePath) throws IOException, DMLException, ParseException {
String [] args = new String[namedArgs.size()];
@@ -788,11 +788,12 @@ public class MLContext {
/**
* Execute DML script by passing named arguments using specified config file.
* @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
- * @param namedArgs
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param namedArgs named arguments
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, Map<String, String> namedArgs, String configFilePath) throws IOException, DMLException, ParseException {
String [] args = new String[namedArgs.size()];
@@ -811,10 +812,11 @@ public class MLContext {
/**
* Execute DML script by passing named arguments with default configuration.
* @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
- * @param namedArgs
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param namedArgs named arguments
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, Map<String, String> namedArgs) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, namedArgs, false, null);
@@ -822,12 +824,12 @@ public class MLContext {
/**
* Execute DML script by passing named arguments.
- * @param dmlScriptFilePath
- * @param namedArgs
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param namedArgs named arguments
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, scala.collection.immutable.Map<String, String> namedArgs) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, new HashMap<String, String>(scala.collection.JavaConversions.mapAsJavaMap(namedArgs)));
@@ -835,13 +837,13 @@ public class MLContext {
/**
* Experimental: Execute PyDML script by passing named arguments if parsePyDML=true.
- * @param dmlScriptFilePath
- * @param namedArgs
- * @param parsePyDML
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param namedArgs named arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, Map<String, String> namedArgs, boolean parsePyDML) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, namedArgs, parsePyDML, null);
@@ -849,13 +851,13 @@ public class MLContext {
/**
* Experimental: Execute PyDML script by passing named arguments if parsePyDML=true.
- * @param dmlScriptFilePath
- * @param namedArgs
- * @param parsePyDML
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param namedArgs named arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, scala.collection.immutable.Map<String, String> namedArgs, boolean parsePyDML) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, new HashMap<String, String>(scala.collection.JavaConversions.mapAsJavaMap(namedArgs)), parsePyDML);
@@ -863,12 +865,13 @@ public class MLContext {
/**
* Execute DML script by passing positional arguments using specified config file
- * @param dmlScriptFilePath
- * @param args
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, String [] args, String configFilePath) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, args, false, configFilePath);
@@ -879,12 +882,13 @@ public class MLContext {
* This method is implemented for compatibility with Python MLContext.
* Java/Scala users should use 'MLOutput execute(String dmlScriptFilePath, String [] args, String configFilePath)' instead as
* equivalent scala collections (Seq/ArrayBuffer) is not implemented.
- * @param dmlScriptFilePath
- * @param args
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> args, String configFilePath) throws IOException, DMLException, ParseException {
String [] argsArr = new String[args.size()];
@@ -894,11 +898,12 @@ public class MLContext {
/**
* Execute DML script by passing positional arguments using default configuration
- * @param dmlScriptFilePath
- * @param args
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, String [] args) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, args, false, null);
@@ -909,11 +914,12 @@ public class MLContext {
* This method is implemented for compatibility with Python MLContext.
* Java/Scala users should use 'MLOutput execute(String dmlScriptFilePath, String [] args)' instead as
* equivalent scala collections (Seq/ArrayBuffer) is not implemented.
- * @param dmlScriptFilePath
- * @param args
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> args) throws IOException, DMLException, ParseException {
String [] argsArr = new String[args.size()];
@@ -926,13 +932,13 @@ public class MLContext {
* This method is implemented for compatibility with Python MLContext.
* Java/Scala users should use 'MLOutput execute(String dmlScriptFilePath, String [] args, boolean parsePyDML)' instead as
* equivalent scala collections (Seq/ArrayBuffer) is not implemented.
- * @param dmlScriptFilePath
- * @param args
- * @param parsePyDML
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> args, boolean parsePyDML) throws IOException, DMLException, ParseException {
String [] argsArr = new String[args.size()];
@@ -945,14 +951,14 @@ public class MLContext {
* This method is implemented for compatibility with Python MLContext.
* Java/Scala users should use 'MLOutput execute(String dmlScriptFilePath, String [] args, boolean parsePyDML, String configFilePath)' instead as
* equivalent scala collections (Seq/ArrayBuffer) is not implemented.
- * @param dmlScriptFilePath
- * @param args
- * @param parsePyDML
- * @param configFilePath
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> args, boolean parsePyDML, String configFilePath) throws IOException, DMLException, ParseException {
String [] argsArr = new String[args.size()];
@@ -967,13 +973,14 @@ public class MLContext {
*/
/**
* Execute DML script by passing positional arguments using specified config file
- * @param dmlScriptFilePath
- * @param argsName
- * @param argsValues
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param argsName argument names
+ * @param argsValues argument values
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> argsName,
ArrayList<String> argsValues, String configFilePath)
@@ -992,12 +999,13 @@ public class MLContext {
}
/**
* Execute DML script by passing positional arguments using specified config file
- * @param dmlScriptFilePath
- * @param argsName
- * @param argsValues
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param argsName argument names
+ * @param argsValues argument values
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, ArrayList<String> argsName,
ArrayList<String> argsValues)
@@ -1007,14 +1015,14 @@ public class MLContext {
/**
* Experimental: Execute DML script by passing positional arguments if parsePyDML=true, using specified config file.
- * @param dmlScriptFilePath
- * @param args
- * @param parsePyDML
- * @param configFilePath
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, String [] args, boolean parsePyDML, String configFilePath) throws IOException, DMLException, ParseException {
return compileAndExecuteScript(dmlScriptFilePath, args, false, parsePyDML, configFilePath);
@@ -1022,13 +1030,13 @@ public class MLContext {
/**
* Experimental: Execute DML script by passing positional arguments if parsePyDML=true, using default configuration.
- * @param dmlScriptFilePath
- * @param args
- * @param parsePyDML
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param args arguments
+ * @param parsePyDML true if pydml, false otherwise
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, String [] args, boolean parsePyDML) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, args, parsePyDML, null);
@@ -1036,11 +1044,12 @@ public class MLContext {
/**
* Execute DML script without any arguments using specified config path
- * @param dmlScriptFilePath
- * @param configFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, String configFilePath) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, false, configFilePath);
@@ -1048,10 +1057,11 @@ public class MLContext {
/**
* Execute DML script without any arguments using default configuration.
- * @param dmlScriptFilePath
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, false, null);
@@ -1059,13 +1069,13 @@ public class MLContext {
/**
* Experimental: Execute DML script without any arguments if parsePyDML=true, using specified config path.
- * @param dmlScriptFilePath
- * @param parsePyDML
- * @param configFilePath
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param parsePyDML true if pydml, false otherwise
+ * @param configFilePath path to config file
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, boolean parsePyDML, String configFilePath) throws IOException, DMLException, ParseException {
return compileAndExecuteScript(dmlScriptFilePath, null, false, parsePyDML, configFilePath);
@@ -1073,12 +1083,12 @@ public class MLContext {
/**
* Experimental: Execute DML script without any arguments if parsePyDML=true, using default configuration.
- * @param dmlScriptFilePath
- * @param parsePyDML
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath the dml script can be in local filesystem or in HDFS
+ * @param parsePyDML true if pydml, false otherwise
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput execute(String dmlScriptFilePath, boolean parsePyDML) throws IOException, DMLException, ParseException {
return execute(dmlScriptFilePath, parsePyDML, null);
@@ -1092,7 +1102,7 @@ public class MLContext {
* This is required if ml.execute(..) has been called earlier and you want to call a new DML script.
* Note: By default this doesnot clean up configuration set using setConfig method.
* To clean the configuration as along with registered input/outputs, please use reset(true);
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLException occurs
*/
public void reset()
throws DMLRuntimeException
@@ -1117,9 +1127,9 @@ public class MLContext {
/**
* Used internally
- * @param source
- * @param target
- * @throws LanguageException
+ * @param source the expression
+ * @param target the target
+ * @throws LanguageException if LanguageException occurs
*/
void setAppropriateVarsForRead(Expression source, String target)
throws LanguageException
@@ -1199,8 +1209,8 @@ public class MLContext {
/**
* Used internally
- * @param tmp
- * @return
+ * @param tmp list of instructions
+ * @return list of instructions
*/
ArrayList<Instruction> performCleanupAfterRecompilation(ArrayList<Instruction> tmp) {
String [] outputs = (_outVarnames != null) ? _outVarnames.toArray(new String[0]) : new String[0];
@@ -1214,9 +1224,9 @@ public class MLContext {
/**
* Experimental api:
* Setting monitorPerformance to true adds additional overhead of storing state. So, use it only if necessary.
- * @param sc
- * @param monitorPerformance
- * @throws DMLRuntimeException
+ * @param sc SparkContext
+ * @param monitorPerformance if true, monitor performance, otherwise false
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(SparkContext sc, boolean monitorPerformance) throws DMLRuntimeException {
initializeSpark(sc, monitorPerformance, false);
@@ -1225,9 +1235,9 @@ public class MLContext {
/**
* Experimental api:
* Setting monitorPerformance to true adds additional overhead of storing state. So, use it only if necessary.
- * @param sc
- * @param monitorPerformance
- * @throws DMLRuntimeException
+ * @param sc JavaSparkContext
+ * @param monitorPerformance if true, monitor performance, otherwise false
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(JavaSparkContext sc, boolean monitorPerformance) throws DMLRuntimeException {
initializeSpark(sc.sc(), monitorPerformance, false);
@@ -1236,10 +1246,10 @@ public class MLContext {
/**
* Experimental api:
* Setting monitorPerformance to true adds additional overhead of storing state. So, use it only if necessary.
- * @param sc
- * @param monitorPerformance
- * @param setForcedSparkExecType
- * @throws DMLRuntimeException
+ * @param sc SparkContext
+ * @param monitorPerformance if true, monitor performance, otherwise false
+ * @param setForcedSparkExecType set forced spark exec type
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(SparkContext sc, boolean monitorPerformance, boolean setForcedSparkExecType) throws DMLRuntimeException {
initializeSpark(sc, monitorPerformance, setForcedSparkExecType);
@@ -1248,10 +1258,10 @@ public class MLContext {
/**
* Experimental api:
* Setting monitorPerformance to true adds additional overhead of storing state. So, use it only if necessary.
- * @param sc
- * @param monitorPerformance
- * @param setForcedSparkExecType
- * @throws DMLRuntimeException
+ * @param sc JavaSparkContext
+ * @param monitorPerformance if true, monitor performance, otherwise false
+ * @param setForcedSparkExecType set forced spark exec type
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MLContext(JavaSparkContext sc, boolean monitorPerformance, boolean setForcedSparkExecType) throws DMLRuntimeException {
initializeSpark(sc.sc(), monitorPerformance, setForcedSparkExecType);
@@ -1354,11 +1364,11 @@ public class MLContext {
/**
* Execute a script stored in a string.
*
- * @param dmlScript
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScript the script
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLOutput executeScript(String dmlScript)
throws IOException, DMLException {
@@ -1375,7 +1385,6 @@ public class MLContext {
return executeScript(dmlScript, false, configFilePath);
}
-
public MLOutput executeScript(String dmlScript, boolean isPyDML, String configFilePath)
throws IOException, DMLException {
return compileAndExecuteScript(dmlScript, null, false, false, isPyDML, configFilePath);
@@ -1472,13 +1481,13 @@ public class MLContext {
* All the execute() methods call this, which after setting appropriate input/output variables
* calls _compileAndExecuteScript
* We have explicitly synchronized this function because MLContext/SystemML does not yet support multi-threading.
- * @param dmlScriptFilePath
- * @param args
- * @param isNamedArgument
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath script file path
+ * @param args arguments
+ * @param isNamedArgument is named argument
+ * @return output as MLOutput
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
private synchronized MLOutput compileAndExecuteScript(String dmlScriptFilePath, String [] args, boolean isFile, boolean isNamedArgument, boolean isPyDML, String configFilePath) throws IOException, DMLException {
try {
@@ -1543,18 +1552,18 @@ public class MLContext {
* This runs the DML script and returns the ExecutionContext for the caller to extract the output variables.
* The caller (which is compileAndExecuteScript) is expected to set inputSymbolTable with appropriate matrix representation (RDD, MatrixObject).
*
- * @param dmlScriptFilePath
- * @param isFile
- * @param argVals
- * @param parsePyDML
- * @param inputs
- * @param outputs
- * @param inputSymbolTable
- * @param configFilePath
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param dmlScriptFilePath script file path
+ * @param isFile true if file, false otherwise
+ * @param argVals map of args
+ * @param parsePyDML true if pydml, false otherwise
+ * @param inputs the inputs
+ * @param outputs the outputs
+ * @param inputSymbolTable the input symbol table
+ * @param configFilePath path to config file
+ * @return the execution context
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
private ExecutionContext executeUsingSimplifiedCompilationChain(String dmlScriptFilePath, boolean isFile, Map<String, String> argVals, boolean parsePyDML,
String[] inputs, String[] outputs, LocalVariableMap inputSymbolTable, String configFilePath)
@@ -1651,13 +1660,13 @@ public class MLContext {
// TODO: Add additional create to provide sep, missing values, etc. for CSV
/**
* Experimental API: Might be discontinued in future release
- * @param sqlContext
- * @param filePath
- * @param format
- * @return
- * @throws IOException
- * @throws DMLException
- * @throws ParseException
+ * @param sqlContext the SQLContext
+ * @param filePath the file path
+ * @param format the format
+ * @return the MLMatrix
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
+ * @throws ParseException if ParseException occurs
*/
public MLMatrix read(SQLContext sqlContext, String filePath, String format) throws IOException, DMLException, ParseException {
this.reset();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/MLContextProxy.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLContextProxy.java b/src/main/java/org/apache/sysml/api/MLContextProxy.java
index 351ea09..11ccb61 100644
--- a/src/main/java/org/apache/sysml/api/MLContextProxy.java
+++ b/src/main/java/org/apache/sysml/api/MLContextProxy.java
@@ -40,26 +40,14 @@ public class MLContextProxy
private static boolean _active = false;
- /**
- *
- * @param flag
- */
public static void setActive(boolean flag) {
_active = flag;
}
- /**
- *
- * @return
- */
public static boolean isActive() {
return _active;
}
- /**
- *
- * @param tmp
- */
public static ArrayList<Instruction> performCleanupAfterRecompilation(ArrayList<Instruction> tmp)
{
if(org.apache.sysml.api.MLContext.getActiveMLContext() != null) {
@@ -70,12 +58,6 @@ public class MLContextProxy
return tmp;
}
- /**
- *
- * @param source
- * @param targetname
- * @throws LanguageException
- */
public static void setAppropriateVarsForRead(Expression source, String targetname)
throws LanguageException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/MLMatrix.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLMatrix.java b/src/main/java/org/apache/sysml/api/MLMatrix.java
index 06fedc9..9da1801 100644
--- a/src/main/java/org/apache/sysml/api/MLMatrix.java
+++ b/src/main/java/org/apache/sysml/api/MLMatrix.java
@@ -115,6 +115,11 @@ public class MLMatrix extends DataFrame {
/**
* Convenient method to write a MLMatrix.
+ *
+ * @param filePath the file path
+ * @param format the format
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
*/
public void write(String filePath, String format) throws IOException, DMLException {
ml.reset();
@@ -145,10 +150,9 @@ public class MLMatrix extends DataFrame {
/**
* Gets or computes the number of rows.
- * @return
- * @throws ParseException
- * @throws DMLException
- * @throws IOException
+ * @return the number of rows
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
*/
public long numRows() throws IOException, DMLException {
if(mc.rowsKnown()) {
@@ -161,10 +165,9 @@ public class MLMatrix extends DataFrame {
/**
* Gets or computes the number of columns.
- * @return
- * @throws ParseException
- * @throws DMLException
- * @throws IOException
+ * @return the number of columns
+ * @throws IOException if IOException occurs
+ * @throws DMLException if DMLException occurs
*/
public long numCols() throws IOException, DMLException {
if(mc.colsKnown()) {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/MLOutput.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLOutput.java b/src/main/java/org/apache/sysml/api/MLOutput.java
index 5612392..f760e2b 100644
--- a/src/main/java/org/apache/sysml/api/MLOutput.java
+++ b/src/main/java/org/apache/sysml/api/MLOutput.java
@@ -86,10 +86,10 @@ public class MLOutput {
/**
* Note, the output DataFrame has an additional column ID.
* An easy way to get DataFrame without ID is by df.drop("__INDEX")
- * @param sqlContext
- * @param varName
- * @return
- * @throws DMLRuntimeException
+ * @param sqlContext the SQLContext
+ * @param varName the variable name
+ * @return the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public DataFrame getDF(SQLContext sqlContext, String varName) throws DMLRuntimeException {
if(sqlContext == null) {
@@ -104,12 +104,12 @@ public class MLOutput {
}
/**
- *
- * @param sqlContext
- * @param varName
+ * Obtain the DataFrame
+ * @param sqlContext the SQLContext
+ * @param varName the variable name
* @param outputVector if true, returns DataFrame with two column: ID and org.apache.spark.mllib.linalg.Vector
- * @return
- * @throws DMLRuntimeException
+ * @return the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public DataFrame getDF(SQLContext sqlContext, String varName, boolean outputVector) throws DMLRuntimeException {
if(sqlContext == null) {
@@ -131,11 +131,11 @@ public class MLOutput {
/**
* This methods improves the performance of MLPipeline wrappers.
- * @param sqlContext
- * @param varName
- * @param range range is inclusive
- * @return
- * @throws DMLRuntimeException
+ * @param sqlContext the SQLContext
+ * @param varName the variable name
+ * @param mc the matrix characteristics
+ * @return the DataFrame
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public DataFrame getDF(SQLContext sqlContext, String varName, MatrixCharacteristics mc)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/jmlc/Connection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/jmlc/Connection.java b/src/main/java/org/apache/sysml/api/jmlc/Connection.java
index e29d3c3..6e4951c 100644
--- a/src/main/java/org/apache/sysml/api/jmlc/Connection.java
+++ b/src/main/java/org/apache/sysml/api/jmlc/Connection.java
@@ -87,7 +87,7 @@ import org.apache.wink.json4j.JSONObject;
* <ul>
* <li>JMLC JUnit test cases (org.apache.sysml.test.integration.functions.jmlc)</li>
* <li><a target="_blank" href="http://apache.github.io/incubator-systemml/jmlc.html">JMLC section
- * of SystemML online documentation</li>
+ * of SystemML online documentation</a></li>
* </ul>
*/
public class Connection implements Closeable
@@ -135,7 +135,7 @@ public class Connection implements Closeable
* @param outputs string array of output variables to register
* @param parsePyDML {@code true} if PyDML, {@code false} if DML
* @return PreparedScript object representing the precompiled script
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public PreparedScript prepareScript( String script, String[] inputs, String[] outputs, boolean parsePyDML)
throws DMLException
@@ -152,7 +152,7 @@ public class Connection implements Closeable
* @param outputs string array of output variables to register
* @param parsePyDML {@code true} if PyDML, {@code false} if DML
* @return PreparedScript object representing the precompiled script
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public PreparedScript prepareScript( String script, Map<String, String> args, String[] inputs, String[] outputs, boolean parsePyDML)
throws DMLException
@@ -218,7 +218,7 @@ public class Connection implements Closeable
*
* @param fname the filename of the script
* @return string content of the script file
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String readScript(String fname)
throws IOException
@@ -263,7 +263,7 @@ public class Connection implements Closeable
*
* @param fname the filename of the input matrix
* @return matrix as a two-dimensional double array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public double[][] readDoubleMatrix(String fname)
throws IOException
@@ -305,7 +305,7 @@ public class Connection implements Closeable
* @param bclen number of columns per block
* @param nnz number of non-zero values, -1 indicates unknown
* @return matrix as a two-dimensional double array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public double[][] readDoubleMatrix(String fname, InputInfo iinfo, long rows, long cols, int brlen, int bclen, long nnz)
throws IOException
@@ -328,7 +328,7 @@ public class Connection implements Closeable
* @param input string matrix in textcell format
* @param meta string representing SystemML matrix metadata in JSON format
* @return matrix as a two-dimensional double array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public double[][] convertToDoubleMatrix(String input, String meta)
throws IOException
@@ -364,7 +364,7 @@ public class Connection implements Closeable
* @param rows number of rows in the matrix
* @param cols number of columns in the matrix
* @return matrix as a two-dimensional double array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public double[][] convertToDoubleMatrix(String input, int rows, int cols)
throws IOException
@@ -383,7 +383,7 @@ public class Connection implements Closeable
* @param rows number of rows in the matrix
* @param cols number of columns in the matrix
* @return matrix as a two-dimensional double array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public double[][] convertToDoubleMatrix(InputStream input, int rows, int cols)
throws IOException
@@ -415,7 +415,7 @@ public class Connection implements Closeable
*
* @param fname the filename of the input frame
* @return frame as a two-dimensional string array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String[][] readStringFrame(String fname)
throws IOException
@@ -448,7 +448,7 @@ public class Connection implements Closeable
* @param rows number of rows in the frame
* @param cols number of columns in the frame
* @return frame as a two-dimensional string array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String[][] readStringFrame(String fname, InputInfo iinfo, long rows, long cols)
throws IOException
@@ -471,7 +471,7 @@ public class Connection implements Closeable
* @param input string frame in textcell format
* @param meta string representing SystemML frame metadata in JSON format
* @return frame as a two-dimensional string array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String[][] convertToStringFrame(String input, String meta)
throws IOException
@@ -507,7 +507,7 @@ public class Connection implements Closeable
* @param rows number of rows in the frame
* @param cols number of columns in the frame
* @return frame as a two-dimensional string array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String[][] convertToStringFrame(String input, int rows, int cols)
throws IOException
@@ -526,7 +526,7 @@ public class Connection implements Closeable
* @param rows number of rows in the frame
* @param cols number of columns in the frame
* @return frame as a two-dimensional string array
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public String[][] convertToStringFrame(InputStream input, int rows, int cols)
throws IOException
@@ -560,7 +560,7 @@ public class Connection implements Closeable
*
* @param metapath hdfs file path to meta data directory
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromFile(String metapath) throws IOException {
return readTransformMetaDataFromFile(null, metapath, TfUtils.TXMTD_SEP);
@@ -574,7 +574,7 @@ public class Connection implements Closeable
* @param spec transform specification as json string
* @param metapath hdfs file path to meta data directory
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromFile(String spec, String metapath) throws IOException {
return readTransformMetaDataFromFile(spec, metapath, TfUtils.TXMTD_SEP);
@@ -588,7 +588,7 @@ public class Connection implements Closeable
* @param metapath hdfs file path to meta data directory
* @param colDelim separator for processing column names in the meta data file 'column.names'
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromFile(String spec, String metapath, String colDelim) throws IOException {
return TfMetaUtils.readTransformMetaDataFromFile(spec, metapath, colDelim);
@@ -601,7 +601,7 @@ public class Connection implements Closeable
*
* @param metapath resource path to meta data directory
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromPath(String metapath) throws IOException {
return readTransformMetaDataFromPath(null, metapath, TfUtils.TXMTD_SEP);
@@ -615,7 +615,7 @@ public class Connection implements Closeable
* @param spec transform specification as json string
* @param metapath resource path to meta data directory
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromPath(String spec, String metapath) throws IOException {
return readTransformMetaDataFromPath(spec, metapath, TfUtils.TXMTD_SEP);
@@ -629,7 +629,7 @@ public class Connection implements Closeable
* @param metapath resource path to meta data directory
* @param colDelim separator for processing column names in the meta data file 'column.names'
* @return FrameBlock object representing transform metadata
- * @throws IOException
+ * @throws IOException if IOException occurs
*/
public FrameBlock readTransformMetaDataFromPath(String spec, String metapath, String colDelim) throws IOException {
return TfMetaUtils.readTransformMetaDataFromPath(spec, metapath, colDelim);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java b/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
index 4fcef44..5e0c879 100644
--- a/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
+++ b/src/main/java/org/apache/sysml/api/jmlc/PreparedScript.java
@@ -91,7 +91,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param scalar boolean value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, boolean scalar) throws DMLException {
setScalar(varname, scalar, false);
@@ -103,7 +103,7 @@ public class PreparedScript
* @param varname input variable name
* @param scalar boolean value
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, boolean scalar, boolean reuse) throws DMLException {
setScalar(varname, new BooleanObject(varname, scalar), reuse);
@@ -114,7 +114,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param scalar long value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, long scalar) throws DMLException {
setScalar(varname, scalar, false);
@@ -126,7 +126,7 @@ public class PreparedScript
* @param varname input variable name
* @param scalar long value
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, long scalar, boolean reuse) throws DMLException {
setScalar(varname, new IntObject(varname, scalar), reuse);
@@ -136,7 +136,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param scalar double value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, double scalar) throws DMLException {
setScalar(varname, scalar, false);
@@ -148,7 +148,7 @@ public class PreparedScript
* @param varname input variable name
* @param scalar double value
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, double scalar, boolean reuse) throws DMLException {
setScalar(varname, new DoubleObject(varname, scalar), reuse);
@@ -159,7 +159,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param scalar string value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, String scalar) throws DMLException {
setScalar(varname, scalar, false);
@@ -171,7 +171,7 @@ public class PreparedScript
* @param varname input variable name
* @param scalar string value
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, String scalar, boolean reuse) throws DMLException {
setScalar(varname, new StringObject(varname, scalar), reuse);
@@ -185,7 +185,7 @@ public class PreparedScript
* @param varname input variable name
* @param scalar scalar object
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setScalar(String varname, ScalarObject scalar, boolean reuse)
throws DMLException
@@ -201,7 +201,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param matrix two-dimensional double array matrix representation
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setMatrix(String varname, double[][] matrix) throws DMLException {
setMatrix(varname, matrix, false);
@@ -213,7 +213,7 @@ public class PreparedScript
* @param varname input variable name
* @param matrix two-dimensional double array matrix representation
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setMatrix(String varname, double[][] matrix, boolean reuse) throws DMLException {
setMatrix(varname, DataConverter.convertToMatrixBlock(matrix), reuse);
@@ -227,7 +227,7 @@ public class PreparedScript
* @param varname input variable name
* @param matrix matrix represented as a MatrixBlock
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setMatrix(String varname, MatrixBlock matrix, boolean reuse)
throws DMLException
@@ -257,7 +257,7 @@ public class PreparedScript
*
* @param varname input variable name
* @param frame two-dimensional string array frame representation
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame) throws DMLException {
setFrame(varname, frame, false);
@@ -269,7 +269,7 @@ public class PreparedScript
* @param varname input variable name
* @param frame two-dimensional string array frame representation
* @param schema list representing the types of the frame columns
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame, List<ValueType> schema) throws DMLException {
setFrame(varname, frame, schema, false);
@@ -282,7 +282,7 @@ public class PreparedScript
* @param frame two-dimensional string array frame representation
* @param schema list representing the types of the frame columns
* @param colnames frame column names
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame, List<ValueType> schema, List<String> colnames) throws DMLException {
setFrame(varname, frame, schema, colnames, false);
@@ -294,7 +294,7 @@ public class PreparedScript
* @param varname input variable name
* @param frame two-dimensional string array frame representation
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame, boolean reuse) throws DMLException {
setFrame(varname, DataConverter.convertToFrameBlock(frame), reuse);
@@ -307,7 +307,7 @@ public class PreparedScript
* @param frame two-dimensional string array frame representation
* @param schema list representing the types of the frame columns
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame, List<ValueType> schema, boolean reuse) throws DMLException {
setFrame(varname, DataConverter.convertToFrameBlock(frame, schema.toArray(new ValueType[0])), reuse);
@@ -321,7 +321,7 @@ public class PreparedScript
* @param schema list representing the types of the frame columns
* @param colnames frame column names
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, String[][] frame, List<ValueType> schema, List<String> colnames, boolean reuse) throws DMLException {
setFrame(varname, DataConverter.convertToFrameBlock( frame,
@@ -336,7 +336,7 @@ public class PreparedScript
* @param varname input variable name
* @param frame frame represented as a FrameBlock
* @param reuse if {@code true}, preserve value over multiple {@code executeScript} calls
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public void setFrame(String varname, FrameBlock frame, boolean reuse)
throws DMLException
@@ -372,7 +372,7 @@ public class PreparedScript
* result variables according to bound and registered outputs.
*
* @return ResultVariables object encapsulating output results
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public ResultVariables executeScript()
throws DMLException
@@ -407,7 +407,7 @@ public class PreparedScript
* Explain the DML/PyDML program and view result as a string.
*
* @return string results of explain
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public String explain() throws DMLException {
return Explain.explain(_prog);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/jmlc/ResultVariables.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/jmlc/ResultVariables.java b/src/main/java/org/apache/sysml/api/jmlc/ResultVariables.java
index 4b36af7..c3454cd 100644
--- a/src/main/java/org/apache/sysml/api/jmlc/ResultVariables.java
+++ b/src/main/java/org/apache/sysml/api/jmlc/ResultVariables.java
@@ -72,7 +72,7 @@ public class ResultVariables
*
* @param varname output variable name
* @return matrix as a two-dimensional double array
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public double[][] getMatrix(String varname)
throws DMLException
@@ -101,7 +101,7 @@ public class ResultVariables
*
* @param varname output variable name
* @return frame as a two-dimensional string array
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public String[][] getFrame(String varname)
throws DMLException
@@ -130,7 +130,7 @@ public class ResultVariables
* @param varname
* output variable name
* @return double value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public double getDouble(String varname) throws DMLException {
ScalarObject sObj = getScalarObject(varname);
@@ -143,7 +143,7 @@ public class ResultVariables
* @param varname
* output variable name
* @return boolean value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public boolean getBoolean(String varname) throws DMLException {
ScalarObject sObj = getScalarObject(varname);
@@ -156,7 +156,7 @@ public class ResultVariables
* @param varname
* output variable name
* @return long value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public long getLong(String varname) throws DMLException {
ScalarObject sObj = getScalarObject(varname);
@@ -169,7 +169,7 @@ public class ResultVariables
* @param varname
* output variable name
* @return string value
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public String getString(String varname) throws DMLException {
ScalarObject sObj = getScalarObject(varname);
@@ -182,7 +182,7 @@ public class ResultVariables
* @param varname
* output variable name
* @return ScalarObject
- * @throws DMLException
+ * @throws DMLException if DMLException occurs
*/
public ScalarObject getScalarObject(String varname) throws DMLException {
if (!_out.containsKey(varname))
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java b/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
index 2741c68..ec157ad 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
@@ -253,6 +253,7 @@ public class MLContext {
*
* @param script
* The DML or PYDML Script object to execute.
+ * @return the results as a MLResults object
*/
public MLResults execute(Script script) {
ScriptExecutor scriptExecutor = new ScriptExecutor(sparkMonitoringUtil);
@@ -272,6 +273,7 @@ public class MLContext {
* the DML or PYDML Script object
* @param scriptExecutor
* the ScriptExecutor that defines the script execution pathway
+ * @return the results as a MLResults object
*/
public MLResults execute(Script script, ScriptExecutor scriptExecutor) {
try {
@@ -481,6 +483,7 @@ public class MLContext {
/**
* Used internally by MLContextProxy.
*
+ * @return InternalProxy object used by MLContextProxy
*/
public InternalProxy getInternalProxy() {
return internalProxy;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/mlcontext/MLContextConversionUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/MLContextConversionUtil.java b/src/main/java/org/apache/sysml/api/mlcontext/MLContextConversionUtil.java
index e633098..6e3a19a 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextConversionUtil.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextConversionUtil.java
@@ -865,6 +865,7 @@ public class MLContextConversionUtil {
*
* @param frameObject
* the {@code FrameObject}
+ * @param delimiter the delimiter
* @return the {@code FrameObject} converted to a {@code JavaRDD<String>}
*/
public static JavaRDD<String> frameObjectToJavaRDDStringCSV(FrameObject frameObject, String delimiter) {
@@ -991,6 +992,7 @@ public class MLContextConversionUtil {
*
* @param frameObject
* the {@code FrameObject}
+ * @param delimiter the delimiter
* @return the {@code FrameObject} converted to a {@code RDD<String>}
*/
public static RDD<String> frameObjectToRDDStringCSV(FrameObject frameObject, String delimiter) {
@@ -1080,6 +1082,7 @@ public class MLContextConversionUtil {
*
* @param frameObject
* the {@code FrameObject}
+ * @param delimiter the delimiter
* @return the {@code FrameObject} converted to a {@code List<String>}
*/
public static List<String> frameObjectToListStringCSV(FrameObject frameObject, String delimiter) {
@@ -1223,6 +1226,7 @@ public class MLContextConversionUtil {
* the {@code MatrixObject}
* @param sparkExecutionContext
* the Spark execution context
+ * @param isVectorDF is the DataFrame a vector DataFrame?
* @return the {@code MatrixObject} converted to a {@code DataFrame}
*/
public static DataFrame matrixObjectToDataFrame(MatrixObject matrixObject,
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/e18f0631/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
index 96fde52..f77b90c 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
@@ -748,6 +748,7 @@ public final class MLContextUtil {
* the title to display for the inputs
* @param map
* the map of inputs
+ * @param symbolTable the symbol table
* @return the script inputs represented as a String
*/
public static String displayInputs(String name, Map<String, Object> map, LocalVariableMap symbolTable) {