You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2013/12/26 07:31:19 UTC
[02/28] git commit: The rest of the Python side of those bindings.
The rest of the Python side of those bindings.
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/bf491bb3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/bf491bb3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/bf491bb3
Branch: refs/heads/master
Commit: bf491bb3c0a9008caa4ac112672a4760b3d1c7b8
Parents: 95915f8
Author: Tor Myklebust <tm...@gmail.com>
Authored: Thu Dec 19 01:29:51 2013 -0500
Committer: Tor Myklebust <tm...@gmail.com>
Committed: Thu Dec 19 01:29:51 2013 -0500
----------------------------------------------------------------------
python/pyspark/__init__.py | 3 ++-
python/pyspark/java_gateway.py | 1 +
python/pyspark/serializers.py | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/bf491bb3/python/pyspark/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyspark/__init__.py b/python/pyspark/__init__.py
index 1f35f6f..949406c 100644
--- a/python/pyspark/__init__.py
+++ b/python/pyspark/__init__.py
@@ -42,6 +42,7 @@ from pyspark.context import SparkContext
from pyspark.rdd import RDD
from pyspark.files import SparkFiles
from pyspark.storagelevel import StorageLevel
+from pyspark.mllib import train_linear_regression_model
-__all__ = ["SparkContext", "RDD", "SparkFiles", "StorageLevel"]
+__all__ = ["SparkContext", "RDD", "SparkFiles", "StorageLevel", "train_linear_regression_model"]
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/bf491bb3/python/pyspark/java_gateway.py
----------------------------------------------------------------------
diff --git a/python/pyspark/java_gateway.py b/python/pyspark/java_gateway.py
index e615c1e..2941984 100644
--- a/python/pyspark/java_gateway.py
+++ b/python/pyspark/java_gateway.py
@@ -62,5 +62,6 @@ def launch_gateway():
# Import the classes used by PySpark
java_import(gateway.jvm, "org.apache.spark.api.java.*")
java_import(gateway.jvm, "org.apache.spark.api.python.*")
+ java_import(gateway.jvm, "org.apache.spark.mllib.api.*")
java_import(gateway.jvm, "scala.Tuple2")
return gateway
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/bf491bb3/python/pyspark/serializers.py
----------------------------------------------------------------------
diff --git a/python/pyspark/serializers.py b/python/pyspark/serializers.py
index 811fa6f..2a500ab 100644
--- a/python/pyspark/serializers.py
+++ b/python/pyspark/serializers.py
@@ -308,4 +308,4 @@ def write_int(value, stream):
def write_with_length(obj, stream):
write_int(len(obj), stream)
- stream.write(obj)
\ No newline at end of file
+ stream.write(obj)