Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-25451 Upgrade commons-io to 2.8.0 #2825

Merged
merged 2 commits into from
Dec 31, 2020
Merged

Conversation

Apache9
Copy link
Contributor

@Apache9 Apache9 commented Dec 29, 2020

No description provided.

@Apache9 Apache9 self-assigned this Dec 29, 2020
@@ -832,7 +832,7 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc
HBaseFsck.createLockRetryCounterFactory(this.conf).create());
} finally {
if (result != null) {
IOUtils.closeQuietly(result.getSecond());
Closeables.close(result.getSecond(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference about Closeables.close and IOUtils.close?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closeables.close(c, true) will swallow the IOException thrown while IOUtils.close will not.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there are three methods you used: Closeables.closeQuietly, Closeables.close, IOUtils.closeQuietly. Do we have a developer guide doc about what we recommend to use?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closeables.close will still throw IOExceptions on the method signature, so usually it is only suitable to be used in UT, where we are free to change the method signature.
IOUtils.closeQuietly will not throw any exceptions but you need to pass in a consumer to process the IOException(usually just a logging).
Closeables.closeQuietly is for closing Reader and InputStream, where we will not throw any exceptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And in general, I do not have very strong opinion on forcing these rules, developers are free to use these methods, just not use a deprecated one...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOUtils.closeQuietly is also deprecated with a long time -- apache/commons-io@ce2b3e8

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is Closeables#closeQuietly... google/guava#1118

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For IOUtils.closeQuietly, now it provides a version with a consumer parameter to process the IOException which is not deprecated.
For Closeables.closeQuirtly, the version which takes a Closeable as parameter has already been removed for a long time, but the version which takes a InputStream or a Reader is still available and is not deprecated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 1s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 30s Maven dependency ordering for branch
+1 💚 mvninstall 3m 41s master passed
+1 💚 checkstyle 2m 1s master passed
+1 💚 spotbugs 12m 54s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 3m 34s the patch passed
-0 ⚠️ checkstyle 2m 0s root: The patch generated 2 new + 210 unchanged - 0 fixed = 212 total (was 210)
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 17m 41s Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚 spotbugs 13m 25s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 54s The patch does not generate ASF License warnings.
66m 39s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2825
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle xml
uname Linux 6b019c7d4eb2 4.15.0-65-generic #74-Ubuntu SMP Tue Sep 17 17:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
checkstyle https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/artifact/yetus-general-check/output/diff-checkstyle-root.txt
Max. process+thread count 137 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/console
versions git=2.17.1 maven=3.6.3 spotbugs=3.1.12
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 34s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for branch
+1 💚 mvninstall 4m 18s master passed
+1 💚 compile 2m 49s master passed
+1 💚 shadedjars 6m 39s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 7s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for patch
+1 💚 mvninstall 4m 0s the patch passed
+1 💚 compile 2m 47s the patch passed
+1 💚 javac 2m 47s the patch passed
+1 💚 shadedjars 6m 35s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 7s the patch passed
_ Other Tests _
+1 💚 unit 165m 11s root in the patch passed.
206m 8s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2825
Optional Tests javac javadoc unit shadedjars compile
uname Linux 07a51354acd9 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
Default Java AdoptOpenJDK-11.0.6+10
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/testReport/
Max. process+thread count 6566 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 38s Docker mode activated.
-0 ⚠️ yetus 0m 4s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 33s Maven dependency ordering for branch
+1 💚 mvninstall 4m 21s master passed
+1 💚 compile 2m 43s master passed
+1 💚 shadedjars 7m 43s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 52s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 3m 52s the patch passed
+1 💚 compile 2m 46s the patch passed
+1 💚 javac 2m 46s the patch passed
+1 💚 shadedjars 7m 58s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 40s the patch passed
_ Other Tests _
-1 ❌ unit 312m 22s root in the patch failed.
353m 50s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2825
Optional Tests javac javadoc unit shadedjars compile
uname Linux 7eca89699286 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
Default Java AdoptOpenJDK-1.8.0_232-b09
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/testReport/
Max. process+thread count 4019 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 10s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 1s No case conflicting files found.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+0 🆗 mvndep 0m 28s Maven dependency ordering for branch
+1 💚 mvninstall 4m 0s master passed
+1 💚 checkstyle 2m 20s master passed
+1 💚 spotbugs 13m 47s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 18s Maven dependency ordering for patch
+1 💚 mvninstall 3m 49s the patch passed
+1 💚 checkstyle 2m 18s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 xml 0m 1s The patch has no ill-formed XML file.
+1 💚 hadoopcheck 19m 15s Patch does not cause any errors with Hadoop 3.1.2 3.2.1 3.3.0.
+1 💚 spotbugs 14m 18s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 46s The patch does not generate ASF License warnings.
71m 7s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #2825
Optional Tests dupname asflicense spotbugs hadoopcheck hbaseanti checkstyle xml
uname Linux bc7caa3935ad 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
Max. process+thread count 122 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/console
versions git=2.17.1 maven=3.6.3 spotbugs=3.1.12
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 31s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 32s Maven dependency ordering for branch
+1 💚 mvninstall 4m 20s master passed
+1 💚 compile 2m 53s master passed
+1 💚 shadedjars 6m 56s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 34s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 4m 10s the patch passed
+1 💚 compile 2m 52s the patch passed
+1 💚 javac 2m 52s the patch passed
+1 💚 shadedjars 7m 29s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 4m 48s the patch passed
_ Other Tests _
+1 💚 unit 182m 29s root in the patch passed.
225m 0s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #2825
Optional Tests javac javadoc unit shadedjars compile
uname Linux 3f6516a1bdfe 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
Default Java AdoptOpenJDK-11.0.6+10
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/testReport/
Max. process+thread count 6570 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

💔 -1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 30s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 22s Maven dependency ordering for branch
+1 💚 mvninstall 3m 32s master passed
+1 💚 compile 2m 20s master passed
+1 💚 shadedjars 6m 29s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 38s master passed
_ Patch Compile Tests _
+0 🆗 mvndep 0m 21s Maven dependency ordering for patch
+1 💚 mvninstall 3m 37s the patch passed
+1 💚 compile 2m 25s the patch passed
+1 💚 javac 2m 25s the patch passed
+1 💚 shadedjars 6m 31s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 3m 26s the patch passed
_ Other Tests _
-1 ❌ unit 343m 58s root in the patch failed.
380m 3s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #2825
Optional Tests javac javadoc unit shadedjars compile
uname Linux a190affa5197 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / d963342
Default Java AdoptOpenJDK-1.8.0_232-b09
unit https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/artifact/yetus-jdk8-hadoop3-check/output/patch-unit-root.txt
Test Results https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/testReport/
Max. process+thread count 6516 (vs. ulimit of 30000)
modules C: hbase-client hbase-server hbase-examples . U: .
Console output https://ci-hadoop.apache.org/job/HBase/job/HBase-PreCommit-GitHub-PR/job/PR-2825/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@infraio infraio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@@ -832,7 +832,7 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc
HBaseFsck.createLockRetryCounterFactory(this.conf).create());
} finally {
if (result != null) {
IOUtils.closeQuietly(result.getSecond());
Closeables.close(result.getSecond(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IOUtils.closeQuietly is also deprecated with a long time -- apache/commons-io@ce2b3e8

@@ -832,7 +832,7 @@ private void finishActiveMasterInitialization(MonitoredTask status) throws IOExc
HBaseFsck.createLockRetryCounterFactory(this.conf).create());
} finally {
if (result != null) {
IOUtils.closeQuietly(result.getSecond());
Closeables.close(result.getSecond(), true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As is Closeables#closeQuietly... google/guava#1118

@Apache9 Apache9 merged commit fbf00f9 into apache:master Dec 31, 2020
Apache9 added a commit that referenced this pull request Dec 31, 2020
Signed-off-by: Guanghao Zhang <zghao@apache.org>
Signed-off-by: stack <stack@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants