Skip to content

Commit

Permalink
Fixing more api.java vs java.api documentation inconsistencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaiera committed Oct 10, 2016
1 parent 73169c3 commit 3676ce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ To read data from ES, create a dedicated `RDD` and specify the query as an argum

```java
import org.apache.spark.api.java.JavaSparkContext;
import org.elasticsearch.spark.rdd.java.api.JavaEsSpark;
import org.elasticsearch.spark.rdd.api.java.JavaEsSpark;

SparkConf conf = ...
JavaSparkContext jsc = new JavaSparkContext(conf);
Expand All @@ -301,7 +301,7 @@ DataFrame playlist = df.filter(df.col("category").equalTo("pikes").and(df.col("y

Use `JavaEsSpark` to index any `RDD` to Elasticsearch:
```java
import org.elasticsearch.spark.java.api.JavaEsSpark;
import org.elasticsearch.spark.rdd.api.java.JavaEsSpark;

SparkConf conf = ...
JavaSparkContext jsc = new JavaSparkContext(conf);
Expand All @@ -316,7 +316,7 @@ JavaEsSpark.saveToEs(javaRDD, "spark/docs");
#### Spark SQL

```java
import org.elasticsearch.spark.sql.java.api.JavaEsSparkSQL;
import org.elasticsearch.spark.sql.api.java.JavaEsSparkSQL;

DataFrame df = sqlContext.read.json("examples/people.json")
JavaEsSparkSQL.saveToES(df, "spark/docs")
Expand Down

0 comments on commit 3676ce0

Please sign in to comment.