gsi...@cloudera.com has uploaded this change for review. ( http://gerrit.cloudera.org:8080/20706
Change subject: IMPALA-12470 (PART-3): delete temporary jar file in GenericJdbcDatabaseAccessor close() function ...................................................................... IMPALA-12470 (PART-3): delete temporary jar file in GenericJdbcDatabaseAccessor close() function The earlier change had a bug where we are deleting the temporary jdbc jar file too early from the /tmp directory before it can be loaded. The GenericJdbcDatabaseAccessor class loader works by OnDemand loading. Hence move the delete file logic to the GenericJdbcDatabaseAccessor close() function instead. Testing: 1. Make sure the Impala cluster has been started. 2. Copy the jar files of JDBC drivers and the data source library into HDFS. ${IMPALA_HOME}/testdata/bin/copy-ext-data-sources.sh Verify that the mysql-jdbc.jar is present in the hdfs path: hadoop fs -ls /test-warehouse/data-sources/jdbc-drivers 3. Create an `alltypes` table in the mysql database. ${IMPALA_HOME}/testdata/bin/load-ext-data-sources.sh 4. Create mysql data source tables (alltypes_jdbc_datasource and alltypes_jdbc_datasource_2). ${IMPALA_HOME}/bin/impala-shell.sh -f\ ${IMPALA_HOME}/testdata/bin/create-ext-data-source-table.sql 5. Make sure that the mysql jar file is not present in the classpath grep 'mysql' /home/gsingh/Impala/fe/target/build-classpath.txt \ /home/gsingh/Impala/fe/target/test-classpath.txt \ /home/gsingh/Impala/java/executor-deps/target/build-executor-\ deps-classpath.txt | wc -l returns 0 6. Run the impala-shell query: use functional; select count(*) from alltypes_jdbc_mysql_datasource; executes successfully and returns the row count. Change-Id: I1becc01a9d93a99be8f47dfe99258dea3a8abeb3 --- M java/ext-data-source/jdbc/src/main/java/org/apache/impala/extdatasource/jdbc/dao/GenericJdbcDatabaseAccessor.java 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/20706/1 -- To view, visit http://gerrit.cloudera.org:8080/20706 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I1becc01a9d93a99be8f47dfe99258dea3a8abeb3 Gerrit-Change-Number: 20706 Gerrit-PatchSet: 1 Gerrit-Owner: Anonymous Coward <gsi...@cloudera.com>