Skip to content
Snippets Groups Projects
Commit 366c0c4c authored by Yadid Ayzenberg's avatar Yadid Ayzenberg Committed by Reynold Xin
Browse files

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
parent 5e98967b
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment