nrg4878 commented on a change in pull request #2037:
URL: https://github.com/apache/hive/pull/2037#discussion_r601477518
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/dataconnector/create/CreateDataConnectorOperation.java
##########
@@ -0,0 +1,71 @@
+/*
Review comment:
1) We check for null/empty values for URL. We error out in those cases.
Other than that, any non-empty value is accepted. I dont think we should check
for correctness of the URL or even can for that matter.
a) The URL is meant to be a freeform value against dozens of datasource
types (mysql, postgres, hive, AWS Glue, Redshift etc). For each such source
type, there could be dozens of variations of the url (includes properties and
other params specific to the source). So I dont think we can meaningfully
detect incorrect URLs.
For example, MySQL though the URL might look fine syntactically, we cannot
confirm dbName1 or dbName2 exist without actually attempting to connect to the
DB.
jdbc:mysql://<hostname>:3306/<dbName1>
jdbc:mysql://<hostname>:3306/<dbName2>
b) The format for the URLs could be changing overtime as well. It is
unnecessary burden for maintaining new formats in hive. We want to be able to
plugin a new datasource type by simply adding a provider.
c) To be able to validate the URL, we have to establish the connection to
the datasource at the time of creation. We are trying to delay making that
connection as long as possible. When actual show tables is called. We avoid
using up extra resources and leak connections.
d) Users can do "create connector" .. followed by "alter connector set url".
So any incorrect URLS can be modified using alter. Also in this case, we would
be checking the URL twice. Better to have the onus of configuring it correctly
on the end user.
2) Passwords can be secured using jceks files as described in the "Securing
Password" section of the doc below.
https://cwiki.apache.org/confluence/display/Hive/JDBC+Storage+Handler
So users have an option of using non-CTVs
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]