mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
IMPALA-12470 (PART-2): delete temporary file in
/tmp after class loaded This patch fixes the bug added in the previous patch for IMPALA-12470. It adds the prefix "file://" to the unix standard path string to create the corresponding valid hadoop.fs.Path object. For example: "/tmp" is converted to "file:///tmp". Testing: 1. Deleted all the jar files in the /tmp directory. 2. Ran the local jdbc ext data sources tests: - impala-py.test tests/query_test/test_ext_data_sources.py - impala-py.test tests/custom_cluster/test_ext_data_sources.py 3. Upon completion of the tests successfully, Verified that there were no .jar files in the /tmp directory. Change-Id: Iab7cc66383bc62f209987dd3fb42fc3fc6604726 Reviewed-on: http://gerrit.cloudera.org:8080/20654 Reviewed-by: Wenzhe Zhou <wzhou@cloudera.com> Tested-by: Wenzhe Zhou <wzhou@cloudera.com>
This commit is contained in:
@@ -194,7 +194,7 @@ public class DataSourceScanNode extends ScanNode {
|
||||
DataSource.debugString(table_.getDataSource())), e);
|
||||
} finally {
|
||||
// Delete the jar file once its loaded
|
||||
Path localJarPath = new Path(localPath);
|
||||
Path localJarPath = new Path("file://" + localPath);
|
||||
FileSystemUtil.deleteIfExists(localJarPath);
|
||||
}
|
||||
if (prepareStatus.getStatus_code() != TErrorCode.OK) {
|
||||
|
||||
@@ -251,7 +251,7 @@ public class GenericJdbcDatabaseAccessor implements DatabaseAccessor {
|
||||
getClass().getClassLoader());
|
||||
basicDataSource.setDriverClassLoader(driverLoader);
|
||||
// Delete the jar file once its loaded
|
||||
Path localJarPath = new Path(driverLocalPath);
|
||||
Path localJarPath = new Path("file://" + driverLocalPath);
|
||||
FileSystemUtil.deleteIfExists(localJarPath);
|
||||
return basicDataSource;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user