Skip to content

Commit

Permalink
Merge pull request #30 from wucheng/master
Browse files Browse the repository at this point in the history
去掉对ioutis.closeQuietly的依赖, 避免部分hadoop-common保重不存在该方法
  • Loading branch information
wucheng committed Apr 1, 2024
2 parents 42ac793 + 32b8ead commit f1b2882
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
Binary file removed jar/chdfs_hadoop_plugin_network-3.3.jar
Binary file not shown.
Binary file added jar/chdfs_hadoop_plugin_network-3.4.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion jar/jar.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MD5 (chdfs_hadoop_plugin_network-3.3.jar) = 8e83f99a6ed83d9be05847e84c18e9db
MD5 (chdfs_hadoop_plugin_network-3.4.jar) = 2b34c83d938ece720657693a930839c3
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.qcloud</groupId>
<artifactId>chdfs_hadoop_plugin_network</artifactId>
<version>3.3</version>
<version>3.4</version>
<packaging>jar</packaging>

<name>chdfs_hadoop_plugin_network</name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.qcloud.chdfs.fs;

import com.qcloud.chdfs.permission.RangerAccessType;
import org.apache.commons.io.IOUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.ContentSummary;
import org.apache.hadoop.fs.CreateFlag;
Expand Down Expand Up @@ -333,7 +332,7 @@ private String initPluginNetworkVersion() {
} catch (IOException e) {
log.error("load versionInfo properties failed", e);
} finally {
IOUtils.closeQuietly(in);
utils.closeQuietly(in);
}
return networkVersionId;
}
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/qcloud/chdfs/fs/utils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.qcloud.chdfs.fs;

import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;

public class utils {
public static void closeQuietly(InputStream input) {
closeQuietly((Closeable)input);
}

public static void closeQuietly(Closeable closeable) {
try {
if (closeable != null) {
closeable.close();
}
} catch (IOException ignore) {
}
}
}

0 comments on commit f1b2882

Please sign in to comment.