close input stream and fix import older version jar in the standalone module

This commit is contained in:
Zhen Chen 2015-12-03 16:59:38 -08:00
parent 9a315a7f57
commit 5bfb5adb71
2 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,8 @@ dependencies {
compile externalDependency.avro_mapred
compile externalDependency.joda
compile externalDependency.hive
compile externalDependency.http_client
compile externalDependency.http_core
testCompile externalDependency.testng
}

View File

@ -82,6 +82,7 @@ public class HdfsMetadataEtl extends EtlJob {
InputStream localJarStream = classLoader.getResourceAsStream("jar/schemaFetch.jar");
channelSftp.put(localJarStream, remoteJarFile, ChannelSftp.OVERWRITE);
localJarStream.close();
String localSchemaFile = prop.getProperty(Constant.HDFS_SCHEMA_LOCAL_PATH_KEY);
new File(localSchemaFile).getParentFile().mkdirs();