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-27590 Change Iterable to List in SnapshotFileCache #4995

Merged
merged 3 commits into from
Feb 9, 2023

Conversation

petersomogyi
Copy link
Contributor

No description provided.

@Apache-HBase

This comment was marked as outdated.

@Apache9
Copy link
Contributor

Apache9 commented Jan 25, 2023

S3 is not the only HFile storage we support, so I think we should also consider the performance impact on HDFS, at least. And better start a discussion thread on the dev list to gain more feedbacks.

@Apache-HBase

This comment was marked as outdated.

@petersomogyi
Copy link
Contributor Author

S3 is not the only HFile storage we support, so I think we should also consider the performance impact on HDFS, at least. And better start a discussion thread on the dev list to gain more feedbacks.

Let me do a quick test on HDFS if it impacts the performance and after I'll send a mail to the dev list.

@Apache-HBase

This comment was marked as outdated.

Copy link
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

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

LGTM

agreed with the point that Duo said about other storage, and thanks for testing HDFS and mentioned the performance difference.

let's see how the discussion goes.

Copy link
Contributor

@jojochuang jojochuang left a comment

Choose a reason for hiding this comment

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

Oh i see. It's because guava's Iteratorable APIs are lazy:

https://guava.dev/releases/21.0/api/docs/com/google/common/collect/Iterables.html

Performance notes: Unless otherwise noted, all of the iterables produced in this class are lazy, which means that their iterators only advance the backing iteration when absolutely necessary.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache9
Copy link
Contributor

Apache9 commented Jan 27, 2023

So the actual problem here is lazy evaluation which will delay the actual io operation under lock?

Let me take a look at the PR about why lazy evaluation produce bad result here...

@Apache9
Copy link
Contributor

Apache9 commented Jan 28, 2023

As replied on the dev mailing list, I do not think we need to do a big refactoring, just change the way we call SnapshotFileCache.getUnreferencedFiles is enough, where we convert the Iterable to List and use the List to call SnapshotFileCache.getUnreferencedFiles.

Thanks.

@petersomogyi
Copy link
Contributor Author

As replied on the dev mailing list, I do not think we need to do a big refactoring, just change the way we call SnapshotFileCache.getUnreferencedFiles is enough, where we convert the Iterable to List and use the List to call SnapshotFileCache.getUnreferencedFiles.

Thanks.

Thanks for the suggestion @Apache9! I've tested with this minor change and the improvement was the same.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@petersomogyi petersomogyi requested a review from Apache9 February 8, 2023 08:26
@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@Apache-HBase

This comment was marked as outdated.

@petersomogyi petersomogyi changed the title HBASE-27590 Change Iterable to List in CleanerChore HBASE-27590 Change Iterable to List in SnapshotFileCache Feb 8, 2023
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 21s 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 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 mvninstall 3m 20s master passed
+1 💚 compile 2m 22s master passed
+1 💚 checkstyle 0m 36s master passed
+1 💚 spotless 0m 42s branch has no errors when running spotless:check.
+1 💚 spotbugs 1m 25s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 19s the patch passed
+1 💚 compile 2m 19s the patch passed
+1 💚 javac 2m 19s the patch passed
+1 💚 checkstyle 0m 32s the patch passed
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 hadoopcheck 12m 21s Patch does not cause any errors with Hadoop 3.2.4 3.3.4.
+1 💚 spotless 0m 40s patch has no errors when running spotless:check.
+1 💚 spotbugs 1m 34s the patch passed
_ Other Tests _
+1 💚 asflicense 0m 10s The patch does not generate ASF License warnings.
37m 3s
Subsystem Report/Notes
Docker ClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4995
Optional Tests dupname asflicense javac spotbugs hadoopcheck hbaseanti spotless checkstyle compile
uname Linux c47ae7d64385 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 6a34aa8
Default Java Eclipse Adoptium-11.0.17+8
Max. process+thread count 85 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/console
versions git=2.34.1 maven=3.8.6 spotbugs=4.7.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 21s 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 _
+1 💚 mvninstall 2m 48s master passed
+1 💚 compile 0m 40s master passed
+1 💚 shadedjars 4m 16s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 24s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 2m 46s the patch passed
+1 💚 compile 0m 39s the patch passed
+1 💚 javac 0m 38s the patch passed
+1 💚 shadedjars 4m 17s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 23s the patch passed
_ Other Tests _
+1 💚 unit 205m 29s hbase-server in the patch passed.
226m 17s
Subsystem Report/Notes
Docker ClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #4995
Optional Tests javac javadoc unit shadedjars compile
uname Linux 617338fc808f 5.4.0-137-generic #154-Ubuntu SMP Thu Jan 5 17:03:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 6a34aa8
Default Java Temurin-1.8.0_352-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/testReport/
Max. process+thread count 2637 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/console
versions git=2.34.1 maven=3.8.6
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 1s 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 _
+1 💚 mvninstall 3m 18s master passed
+1 💚 compile 0m 51s master passed
+1 💚 shadedjars 4m 24s branch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 25s master passed
_ Patch Compile Tests _
+1 💚 mvninstall 3m 21s the patch passed
+1 💚 compile 0m 47s the patch passed
+1 💚 javac 0m 47s the patch passed
+1 💚 shadedjars 4m 23s patch has no errors when building our shaded downstream artifacts.
+1 💚 javadoc 0m 24s the patch passed
_ Other Tests _
-1 ❌ unit 211m 11s hbase-server in the patch failed.
234m 26s
Subsystem Report/Notes
Docker ClientAPI=1.42 ServerAPI=1.42 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4995
Optional Tests javac javadoc unit shadedjars compile
uname Linux a7ec2888340d 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 6a34aa8
Default Java Eclipse Adoptium-11.0.17+8
unit https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/artifact/yetus-jdk11-hadoop3-check/output/patch-unit-hbase-server.txt
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/testReport/
Max. process+thread count 2487 (vs. ulimit of 30000)
modules C: hbase-server U: hbase-server
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4995/5/console
versions git=2.34.1 maven=3.8.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@petersomogyi
Copy link
Contributor Author

@Apache9 Please take a look. Thanks.

@petersomogyi petersomogyi merged commit d2c5af1 into apache:master Feb 9, 2023
@petersomogyi petersomogyi deleted the HBASE-27590 branch February 9, 2023 10:20
petersomogyi added a commit that referenced this pull request Feb 9, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit d2c5af1)
petersomogyi added a commit that referenced this pull request Feb 9, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit d2c5af1)
petersomogyi added a commit that referenced this pull request Feb 13, 2023
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit d2c5af1)
vinayakphegde pushed a commit to vinayakphegde/hbase that referenced this pull request Apr 4, 2024
Signed-off-by: Duo Zhang <zhangduo@apache.org>
(cherry picked from commit d2c5af1)
(cherry picked from commit 6c5c65a)
Change-Id: I6f2eed8181fa56024c8d18899d8f6668ec6a36a8
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.

5 participants