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 2017/02/17 05:04:49 UTC
incubator-systemml git commit: [SYSTEMML-1271] Increment minimum
Spark version in MLContext
Repository: incubator-systemml
Updated Branches:
refs/heads/master fcfe2d973 -> 03fdf0432
[SYSTEMML-1271] Increment minimum Spark version in MLContext
Increment MLContext minimum Spark version to 2.1.0.
Don't display welcome message if minimum Spark version not supported.
Closes #392.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/03fdf043
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/03fdf043
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/03fdf043
Branch: refs/heads/master
Commit: 03fdf0432e78ef16a3839b57034b3f37c4fff5c0
Parents: fcfe2d9
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Thu Feb 16 21:00:52 2017 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Thu Feb 16 21:00:52 2017 -0800
----------------------------------------------------------------------
src/main/java/org/apache/sysml/api/mlcontext/MLContext.java | 5 +++--
src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java | 3 ++-
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/03fdf043/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 48f013e..2a554d8 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContext.java
@@ -58,7 +58,7 @@ public class MLContext {
/**
* Minimum Spark version supported by SystemML.
*/
- public static final String SYSTEMML_MINIMUM_SPARK_VERSION = "1.4.0";
+ public static final String SYSTEMML_MINIMUM_SPARK_VERSION = "2.1.0";
/**
* SparkContext object.
@@ -211,12 +211,13 @@ public class MLContext {
*/
private void initMLContext(SparkContext sc, boolean monitorPerformance) {
+ MLContextUtil.verifySparkVersionSupported(sc);
+
if (activeMLContext == null) {
System.out.println(MLContextUtil.welcomeMessage());
}
this.sc = sc;
- MLContextUtil.verifySparkVersionSupported(sc);
// by default, run in hybrid Spark mode for optimal performance
DMLScript.rtplatform = RUNTIME_PLATFORM.HYBRID_SPARK;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/03fdf043/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 9553acb..c44843e 100644
--- a/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
+++ b/src/main/java/org/apache/sysml/api/mlcontext/MLContextUtil.java
@@ -169,7 +169,7 @@ public final class MLContextUtil {
public static void verifySparkVersionSupported(SparkContext sc) {
if (!MLContextUtil.isSparkVersionSupported(sc.version())) {
throw new MLContextException(
- "SystemML requires Spark " + MLContext.SYSTEMML_MINIMUM_SPARK_VERSION + " or greater");
+ "This version of SystemML requires Spark " + MLContext.SYSTEMML_MINIMUM_SPARK_VERSION + " or greater.");
}
}
@@ -502,6 +502,7 @@ public final class MLContextUtil {
FrameBlock frameBlock = (FrameBlock) value;
return MLContextConversionUtil.frameBlockToFrameObject(name, frameBlock, (FrameMetadata) metadata);
} else if (value instanceof Dataset<?>) {
+ @SuppressWarnings("unchecked")
Dataset<Row> dataFrame = (Dataset<Row>) value;
if (hasMatrixMetadata) {