Skip to content

Commit 366c0c4

Browse files
Yadid Ayzenbergrxin
authored andcommitted
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
1 parent 5e98967 commit 366c0c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/sql-programming-guide.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ A schema can be applied to an existing RDD by calling `applySchema` and providin
170170
for the JavaBean.
171171

172172
{% highlight java %}
173-
JavaSQLContext ctx = new org.apache.spark.sql.api.java.JavaSQLContext(sc)
173+
174+
JavaSparkContext ctx = ...; // An existing JavaSparkContext.
175+
JavaSQLContext sqlCtx = new org.apache.spark.sql.api.java.JavaSQLContext(ctx)
174176

175177
// Load a text file and convert each line to a JavaBean.
176178
JavaRDD<Person> people = ctx.textFile("examples/src/main/resources/people.txt").map(

0 commit comments

Comments
 (0)