dantongdong commented on a change in pull request #2546:
URL: https://github.com/apache/hive/pull/2546#discussion_r680161971
##########
File path:
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/dataconnector/jdbc/RedshiftConnectorProvider.java
##########
@@ -0,0 +1,101 @@
+package org.apache.hadoop.hive.metastore.dataconnector.jdbc;
+
+import org.apache.hadoop.hive.metastore.ColumnType;
+import org.apache.hadoop.hive.metastore.api.DataConnector;
+import org.apache.hadoop.hive.metastore.api.MetaException;
+import org.apache.hadoop.hive.metastore.api.Table;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+public class RedshiftConnectorProvider extends AbstractJDBCConnectorProvider {
+ private static Logger LOG =
LoggerFactory.getLogger(RedshiftConnectorProvider.class);
+
+ private static final String DRIVER_CLASS =
"com.amazon.redshift.jdbc42.Driver".intern();
+
+ public RedshiftConnectorProvider(String dbName, DataConnector dataConn) {
+ super(dbName, dataConn, DRIVER_CLASS);
+ }
+
+ @Override protected ResultSet fetchTableMetadata(String tableName) throws
MetaException {
Review comment:
It seems like fetchTableMetadata and fetchTableNames method can be
utilized across all the database type we currently support(except for MySQL).
Do you think may be better to move the implementation of those two methods to
AbstractJDBCConnectorProvider so that the other database types can benefit from
it? There is a helper method named fetchTablesViaDBMetaData in
AbstractJDBCConnectorProvider that may be helpful.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]