Repository: spark Updated Branches: refs/heads/master 5e98967b6 -> 366c0c4c3
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 <[email protected]> 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 Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/366c0c4c Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/366c0c4c Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/366c0c4c Branch: refs/heads/master Commit: 366c0c4c30465be1a298a5c750b6dbbf022c2323 Parents: 5e98967 Author: Yadid Ayzenberg <[email protected]> Authored: Sat May 31 19:44:13 2014 -0700 Committer: Reynold Xin <[email protected]> Committed: Sat May 31 19:44:13 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/366c0c4c/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(
