Skip to content

HBASE-29215 View block cache as JSON failing for BucketCache implementation#6851

Merged
wchevreuil merged 1 commit intoapache:masterfrom
chandrasekhar-188k:br_HBASE-29215
Mar 26, 2025
Merged

HBASE-29215 View block cache as JSON failing for BucketCache implementation#6851
wchevreuil merged 1 commit intoapache:masterfrom
chandrasekhar-188k:br_HBASE-29215

Conversation

@chandrasekhar-188k
Copy link
Contributor

No description provided.

Copy link
Contributor

@wchevreuil wchevreuil left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this, @chandrasekhar-188k! Just want to confirm on the issue here, is it that GSON fails to serialize fields that are not java primitves/wrappers? Does it try to serialize even the private fields?

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@chandrasekhar-188k
Copy link
Contributor Author

Thanks for submitting this, @chandrasekhar-188k! Just want to confirm on the issue here, is it that GSON fails to serialize fields that are not java primitves/wrappers? Does it try to serialize even the private fields?

GSON tries to serialize all the fields of the class except the ones marked as static/transient. So the non static/non transient private fields also gets serialized.
currently the issue is with serialization of non-primitive types (like custom classes). Gson uses Java reflection to access and manipulate the fields of objects, even if they are private, enabling it to serialize and deserialize the object's data.

@wchevreuil
Copy link
Contributor

Thanks for submitting this, @chandrasekhar-188k! Just want to confirm on the issue here, is it that GSON fails to serialize fields that are not java primitves/wrappers? Does it try to serialize even the private fields?

GSON tries to serialize all the fields of the class except the ones marked as static/transient. So the non static/non transient private fields also gets serialized. currently the issue is with serialization of non-primitive types (like custom classes). Gson uses Java reflection to access and manipulate the fields of objects, even if they are private, enabling it to serialize and deserialize the object's data.

Thanks for confirming. For the regionCachedSize field, I think it would be nice to have it serialized in the json. Would you think this is doable? Could be worked as a separate jira.

@chandrasekhar-188k
Copy link
Contributor Author

Thanks for submitting this, @chandrasekhar-188k! Just want to confirm on the issue here, is it that GSON fails to serialize fields that are not java primitves/wrappers? Does it try to serialize even the private fields?

GSON tries to serialize all the fields of the class except the ones marked as static/transient. So the non static/non transient private fields also gets serialized. currently the issue is with serialization of non-primitive types (like custom classes). Gson uses Java reflection to access and manipulate the fields of objects, even if they are private, enabling it to serialize and deserialize the object's data.

Thanks for confirming. For the regionCachedSize field, I think it would be nice to have it serialized in the json. Would you think this is doable? Could be worked as a separate jira.

yes, its good to have regionCachedSize field serialized, I have updated the PR for this change.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 47s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ master Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for branch
+1 💚 mvninstall 4m 31s master passed
+1 💚 compile 4m 47s master passed
+1 💚 checkstyle 1m 3s master passed
+1 💚 spotbugs 2m 50s master passed
+1 💚 spotless 1m 8s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 4m 23s the patch passed
+1 💚 compile 4m 39s the patch passed
+1 💚 javac 4m 39s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 58s the patch passed
+1 💚 spotbugs 2m 57s the patch passed
+1 💚 hadoopcheck 16m 26s Patch does not cause any errors with Hadoop 3.3.6 3.4.0.
+1 💚 spotless 1m 2s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 27s The patch does not generate ASF License warnings.
55m 52s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6851/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #6851
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
uname Linux 33429fb80277 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / ff9d94b
Default Java Eclipse Adoptium-17.0.11+9
Max. process+thread count 85 (vs. ulimit of 30000)
modules C: hbase-server hbase-external-blockcache U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6851/2/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 32s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
+0 🆗 mvndep 0m 10s Maven dependency ordering for branch
+1 💚 mvninstall 3m 15s master passed
+1 💚 compile 1m 11s master passed
+1 💚 javadoc 0m 39s master passed
+1 💚 shadedjars 5m 59s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 3m 8s the patch passed
+1 💚 compile 1m 11s the patch passed
+1 💚 javac 1m 11s the patch passed
+1 💚 javadoc 0m 38s the patch passed
+1 💚 shadedjars 5m 55s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 214m 49s hbase-server in the patch passed.
+1 💚 unit 0m 27s hbase-external-blockcache in the patch passed.
242m 46s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6851/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #6851
Optional Tests javac javadoc unit compile shadedjars
uname Linux cba36956ceef 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / ff9d94b
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6851/2/testReport/
Max. process+thread count 5054 (vs. ulimit of 30000)
modules C: hbase-server hbase-external-blockcache U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-6851/2/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@wchevreuil wchevreuil merged commit f4bcb76 into apache:master Mar 26, 2025
1 check passed
wchevreuil pushed a commit that referenced this pull request Mar 26, 2025
…tation (#6851)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
wchevreuil pushed a commit to wchevreuil/hbase that referenced this pull request Mar 26, 2025
…tation (apache#6851)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from f4bcb76)
wchevreuil pushed a commit that referenced this pull request Mar 31, 2025
…tation (#6851)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from f4bcb76)
wchevreuil pushed a commit that referenced this pull request Mar 31, 2025
…tation (#6851)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from f4bcb76)
Change-Id: Id24e36dd8ad3b03131e35bd3b8d7b39df4d8fe06
mokai87 pushed a commit to mokai87/hbase that referenced this pull request Aug 7, 2025
…tation (apache#6851)

Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
(cherry picked from f4bcb76)
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.

3 participants