diff options
author | Yadid Ayzenberg <yadid@media.mit.edu> | 2014-05-31 19:44:13 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-05-31 19:44:20 -0700 |
commit | 3d79166d9fde654a94bdf887672f1af02d75cc25 (patch) | |
tree | 3fb72b571b4647467be2179ecdfaeb0cc634d7ef | |
parent | 46825cd1c4126c52c632a7900bacc0ad0b254d95 (diff) | |
download | spark-3d79166d9fde654a94bdf887672f1af02d75cc25.tar.gz spark-3d79166d9fde654a94bdf887672f1af02d75cc25.tar.bz2 spark-3d79166d9fde654a94bdf887672f1af02d75cc25.zip |
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>
-rw-r--r-- | docs/sql-programming-guide.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/sql-programming-guide.md b/docs/sql-programming-guide.md index a506457eba..4623bb4247 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( |