[
https://issues.apache.org/jira/browse/PHOENIX-6633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17771030#comment-17771030
]
ASF GitHub Bot commented on PHOENIX-6633:
-----------------------------------------
richardantal commented on code in PR #108:
URL:
https://github.com/apache/phoenix-connectors/pull/108#discussion_r1342490759
##########
phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/writer/PhoenixDataSourceWriteOptions.java:
##########
@@ -28,20 +28,20 @@
class PhoenixDataSourceWriteOptions implements Serializable {
private final String tableName;
- private final String zkUrl;
+ private final String jdbcUrl;
private final String tenantId;
private final String scn;
private final StructType schema;
private final boolean skipNormalizingIdentifier;
private final Properties overriddenProps;
- private PhoenixDataSourceWriteOptions(String tableName, String zkUrl,
String scn,
+ private PhoenixDataSourceWriteOptions(String tableName, String jdbcUrl,
String scn,
String tenantId, StructType schema,
boolean skipNormalizingIdentifier,
Properties overriddenProps) {
if (tableName == null) {
throw new NullPointerException();
}
- if (zkUrl == null) {
+ if (jdbcUrl == null) {
Review Comment:
Why don't you throw IllegalArgumentException if the schema or the
overriddenPropsos null?
Like it is done int the phoenix5-spark connector
##########
phoenix5-spark/src/main/java/org/apache/phoenix/spark/datasource/v2/PhoenixDataSource.java:
##########
@@ -42,6 +45,7 @@ public class PhoenixDataSource implements DataSourceV2,
ReadSupport, WriteSupp
private static final Logger logger =
LoggerFactory.getLogger(PhoenixDataSource.class);
public static final String SKIP_NORMALIZING_IDENTIFIER =
"skipNormalizingIdentifier";
public static final String ZOOKEEPER_URL = "zkUrl";
Review Comment:
You added a Deprecated tag to the ZOOKEEPER_URL in
phoenix5-spark3/src/main/java/org/apache/phoenix/spark/sql/connector/PhoenixDataSource.java
why not here too?
> Use standard JDBC URL in Spark Connector and make it optional
> -------------------------------------------------------------
>
> Key: PHOENIX-6633
> URL: https://issues.apache.org/jira/browse/PHOENIX-6633
> Project: Phoenix
> Issue Type: New Feature
> Reporter: Istvan Toth
> Assignee: Istvan Toth
> Priority: Major
>
> We require explicitly specifying the ZK URL for the Phoenix-Spark connector.
> Since having hbase-site.xml on the classpath is required by Phoenix anyway,
> we could use the quorum from hbase-site.xml as default, which would make life
> easier for users.
> Phoenix already handles this, we just need to remove the check, and adopt the
> JDBC URL not to specify the ZK quorum if missing.
> The current zkUrl code also acts as an aritificial limitation on using the
> new zookeeperless Hbase registries from Spark.
> We need to deprecate zkUrl, and add a new jdbcUrl property, which is simply
> passed to Phoenix without further processing.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)