[
https://issues.apache.org/jira/browse/ATLAS-2298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16312788#comment-16312788
]
Yao Li commented on ATLAS-2298:
-------------------------------
1) I notice in the javadoc that JDBCConnectorErrorCode contains an extra /**
Fixed this. Thank you for pointing it out.
2) I notice public class ConnectionCheckedException extends
JDBCConnectorCheckedExceptionBase. From the naming, it is not obvious that
ConnectionCheckedException has anything to do with JDBC from the name.
3) The same for ExecutionCheckedException.
4) to ease readability in 2 and 3 I suggest removing the checked from the names
- as the runtime already indicated those exceptions are unchecked.
- renaming JDBCConnectorCheckedExceptionBase to JDBCConnectorException
- renaming ConnectionCheckedException to ConnectionJDBCConnectorException
- renaming ExecutionCheckedException to ExecutionJDBCConnectorException
5) In JDBCConnectorRuntimeException getReportedCaughtException() returns a
Throwable - should this method be getReportedThrowable
6) In JDBCConnectorRuntimeException getReportedSystemAction() - is this system
action reported? I suggest removing the "reported" from the name. Same for
"getReportedUserAction()" and "getReportedHTTPCode()"
>From 2) to 6) these codes I want to keep consistent with Mandy’s OCF and OMRS
>Connector’s code. After she has the new patch available I will check out the
>code and update the code, if the name are still the same, we can discuss these
>again.
7) Maybe rename GaianDBJDBCConnector to GaianJDBCConnector for readability
I will set it as a small discuss during the workshop
8) For setDBUrlCreateFalse(java.lang.String realUserId) set up the proper
database url, create is false.
- I suggest we pass a second boolean flag parameter rather than have 2
methods.
- what does create true and false mean?
- what is the proper database?
- what is the realUserId?
- what does this mean "realUserId - used by the tempory GaianDB db url for
authentication". What is temporary about this and what is real about it?
- Changed it to a method with a Boolean flag parameter
- Create true and false is used in the database url.
When you use “create=true” to connect the database:
• If the database cannot be created, the error appears in the error log
and the connection attempt fails with an SQLException indicating that the
database cannot be found.
• If the database already exists, creates a connection to the existing
database and an SQLWarning is issued.
• JDBC does not remove the database on failure to connect at create time
if failure occurs after the database call occurs. If a database connection URL
used create=true and the connection fails to be created, check for the database
directory. If it exists, remove it and its contents before the next attempt to
create the database.
- Proper here only means that you offer the correct connection
information to form a url. Already change this to “set up the database url”
- Here we use NPA to connect to GaianDB, Nigle has developed the code to
use impersonation, and here the “realUserId” is used to differentiate from
“proxy-user”. Already changed it to “userId”
- It is temporary method to deal with the impersonation. Detailed
information is listed in
Ranger-1850(https://issues.apache.org/jira/browse/RANGER-1850)
9) for ConnectionCheckedException - it says "there may be the odd bug that
surfaces here." I suggest removing this. When should we use
"JDBCConnectorErrorCode" and when should be use " messages defined uniquely for
a ConnectorProvider/Connector implementation"
Fixed it and change to :
ConnectionCheckedException provides a checked exception for reporting errors
found when using JDBC connectors to connect with database.
Typically these errors are either configuration or operational errors that can
be fixed by an administrator
or power user. The JDBCConnectorErrorCode can be used within this exception to
populate it with standard messages. Otherwise messages
defined uniquely for JDBC Connector implementation can be used(such as
exceptions in database Connection).
The aim is to be able to uniquely identify the cause
and remedy for the error.
> OCF JDBC Connector for GaianDB
> ------------------------------
>
> Key: ATLAS-2298
> URL: https://issues.apache.org/jira/browse/ATLAS-2298
> Project: Atlas
> Issue Type: Improvement
> Components: atlas-core
> Reporter: Maryna Strelchuk
> Assignee: Yao Li
> Attachments: JDBC Connector Java Doc.zip, OCF JDBC Connector.pdf
>
>
> This Jira is focused on development of the OCF JDBC Connector for the GaianDB
> which will be used to access data from GaianDB.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)