rejeb commented on code in PR #139:
URL: 
https://github.com/apache/phoenix-connectors/pull/139#discussion_r1736634460


##########
phoenix5-spark/README.md:
##########
@@ -89,7 +147,7 @@ public class PhoenixSparkRead {
 ### Save DataFrames to Phoenix using DataSourceV2
 
 The `save` is method on DataFrame allows passing in a data source type. You 
can use
-`phoenix` for DataSourceV2 and must also pass in a `table` and `zkUrl` 
parameter to
+`phoenix` for DataSourceV2 and must also pass in a `table` and `jdbcUrl` 
parameter to

Review Comment:
   Done.



##########
phoenix5-spark/README.md:
##########
@@ -141,32 +201,32 @@ public class PhoenixSparkWriteFromInputTable {
     
     public static void main() throws Exception {
         SparkConf sparkConf = new 
SparkConf().setMaster("local").setAppName("phoenix-test")
-          .set("spark.hadoopRDD.ignoreEmptySplits", "false");
-        JavaSparkContext jsc = new JavaSparkContext(sparkConf);
-        SQLContext sqlContext = new SQLContext(jsc);
+            .set("spark.hadoopRDD.ignoreEmptySplits", "false");
+        SparkSessinon spark = 
SparkSession.builder().config(sparkConf).getOrCreate();
         
         // Load INPUT_TABLE
-        Dataset<Row> df = sqlContext
+        Dataset<Row> df = spark
             .read()
             .format("phoenix")
             .option("table", "INPUT_TABLE")
+            .option("jdbcUrl", "jdbc:phoenix:zkHost:zkport")
             .load();
         
         // Save to OUTPUT_TABLE
         df.write()
           .format("phoenix")
           .mode(SaveMode.Overwrite)
           .option("table", "OUTPUT_TABLE")
+          .option("jdbcUrl", "jdbc:phoenix:zkHost:zkport")
           .save();
-        jsc.stop();
     }
 }
 ```
 
 ### Save from an external RDD with a schema to a Phoenix table
 
 Just like the previous example, you can pass in the data source type as 
`phoenix` and specify the `table` and
-`zkUrl` parameters indicating which table and server to persist the DataFrame 
to.
+`jdbcUrl` parameters indicating which table and server to persist the 
DataFrame to.

Review Comment:
   Done



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to