Wenzhe Zhou has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/20941 )
Change subject: IMPALA-12381: Set JDBC related properties in JDBC data source ...................................................................... IMPALA-12381: Set JDBC related properties in JDBC data source Currently JDBC related properties are specified in initString when creating JDBC external data source table. It's more convenient to set JDBC related properties in data source object as data source properties in following sample so that users don't need to specify those properties for each table produced by same data source. CREATE DATA SOURCE JdbcDataSource LOCATION '/test-warehouse/data-sources/jdbc-data-source.jar' CLASS 'org.apache.impala.extdatasource.jdbc.JdbcDataSource' API_VERSION 'V1' DSPROPERTIES ( 'DATABSE.TYPE'='POSTGRES', 'JDBC.URL'='jdbc:postgresql://localhost:5432/functional', 'JDBC.DRIVER'='org.postgresql.Driver', 'DBCP.USERNAME'='hiveuser', 'DBCP.PASSWORD'='password'); This patch extends the data source creation syntax to allow user to set JDBC and DBCP related properties when creating JDBC data source. The additional properties are saved in HMS as one property of DataConnector in JSON string format. Those properties will be applied to each table produced by the data source. Also update the output of 'SHOW DATA SOURCES' command to display the additional properties. Testing: - Added new analysis test cases and end-to-end test cases for creating data source with additional properties. - Passed core-test Change-Id: I0a0b5d9d7b06825842828c3722c2bcdb4eacccc8 --- M be/src/service/client-request-state.cc M be/src/service/client-request-state.h M common/thrift/CatalogObjects.thrift M common/thrift/Frontend.thrift M fe/src/compat-hive-3/java/org/apache/impala/compat/MetastoreShim.java M fe/src/main/cup/sql-parser.cup M fe/src/main/java/org/apache/impala/analysis/CreateDataSrcStmt.java M fe/src/main/java/org/apache/impala/analysis/CreateTableDataSrcStmt.java M fe/src/main/java/org/apache/impala/catalog/DataSource.java M fe/src/main/java/org/apache/impala/catalog/DataSourceTable.java M fe/src/main/java/org/apache/impala/catalog/FeDataSource.java M fe/src/main/java/org/apache/impala/catalog/local/LocalDataSourceTable.java R fe/src/main/java/org/apache/impala/extdatasource/jdbc/conf/JdbcStorageConfig.java M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/service/Frontend.java M fe/src/main/java/org/apache/impala/service/JniFrontend.java A fe/src/main/java/org/apache/impala/util/JsonUtil.java M fe/src/main/jflex/sql-scanner.flex M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java M testdata/workloads/functional-query/queries/QueryTest/data-source-tables.test M testdata/workloads/functional-query/queries/QueryTest/impala-ext-jdbc-tables.test M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source-with-keystore.test M testdata/workloads/functional-query/queries/QueryTest/jdbc-data-source.test M testdata/workloads/functional-query/queries/QueryTest/mysql-ext-jdbc-tables.test M testdata/workloads/functional-query/queries/QueryTest/show-data-sources.test 25 files changed, 415 insertions(+), 84 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/20941/3 -- To view, visit http://gerrit.cloudera.org:8080/20941 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I0a0b5d9d7b06825842828c3722c2bcdb4eacccc8 Gerrit-Change-Number: 20941 Gerrit-PatchSet: 3 Gerrit-Owner: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Abhishek Rawat <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Yifan Zhang <[email protected]> Gerrit-Reviewer: gaurav singh <[email protected]>
