spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject git commit: updated java code blocks in spark SQL guide such that ctx will refer to ...
Date Sun, 01 Jun 2014 02:44:23 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-1.0 46825cd1c -> 3d79166d9


updated java code blocks in spark SQL guide such that ctx will refer to ...

...a JavaSparkContext and sqlCtx will refer to a JavaSQLContext

Author: Yadid Ayzenberg <yadid@media.mit.edu>

Closes #932 from yadid/master and squashes the following commits:

f92fb3a [Yadid Ayzenberg] updated java code blocks in spark SQL guide such that ctx will refer
to a JavaSparkContext and sqlCtx will refer to a JavaSQLContext

(cherry picked from commit 366c0c4c30465be1a298a5c750b6dbbf022c2323)
Signed-off-by: Reynold Xin <rxin@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/3d79166d
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/3d79166d
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/3d79166d

Branch: refs/heads/branch-1.0
Commit: 3d79166d9fde654a94bdf887672f1af02d75cc25
Parents: 46825cd
Author: Yadid Ayzenberg <yadid@media.mit.edu>
Authored: Sat May 31 19:44:13 2014 -0700
Committer: Reynold Xin <rxin@apache.org>
Committed: Sat May 31 19:44:20 2014 -0700

----------------------------------------------------------------------
 docs/sql-programming-guide.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/3d79166d/docs/sql-programming-guide.md
----------------------------------------------------------------------
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md
index a506457..4623bb4 100644
--- a/docs/sql-programming-guide.md
+++ b/docs/sql-programming-guide.md
@@ -170,7 +170,9 @@ A schema can be applied to an existing RDD by calling `applySchema` and
providin
 for the JavaBean.
 
 {% highlight java %}
-JavaSQLContext ctx = new org.apache.spark.sql.api.java.JavaSQLContext(sc)
+
+JavaSparkContext ctx = ...; // An existing JavaSparkContext.
+JavaSQLContext sqlCtx = new org.apache.spark.sql.api.java.JavaSQLContext(ctx)
 
 // Load a text file and convert each line to a JavaBean.
 JavaRDD<Person> people = ctx.textFile("examples/src/main/resources/people.txt").map(


Mime
View raw message