[ 
https://issues.apache.org/jira/browse/HBASE-30533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18142559#comment-18142559
 ] 

Hudson commented on HBASE-30533:
--------------------------------

Results for branch branch-3
        [build #637 on 
builds.a.o|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/637/]: 
(/) *{color:green}+1 overall{color}*
----
details (if available):

(/) {color:green}+1 general checks{color}
-- For more information [see general 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/637/General_20Nightly_20Build_20Report/]








(/) {color:green}+1 jdk17 hadoop3 checks{color}
-- For more information [see jdk17 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/637/JDK17_20Nightly_20Build_20Report_20_28Hadoop3_29/]


(/) {color:green}+1 jdk21 hadoop3 checks{color}
-- For more information [see jdk21 
report|https://ci-hbase.apache.org/job/HBase%20Nightly/job/branch-3/637/JDK21_20Nightly_20Build_20Report_20_28Hadoop3_29/]


> TestMemcachedBlockCache.testCache fails after HBASE-30521
> ---------------------------------------------------------
>
>                 Key: HBASE-30533
>                 URL: https://issues.apache.org/jira/browse/HBASE-30533
>             Project: HBase
>          Issue Type: Bug
>          Components: BlockCache
>            Reporter: Xiao Liu
>            Assignee: Xiao Liu
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 4.0.0-alpha-1, 2.7.0, 3.1.0, 3.0.1, 2.6.8
>
>
> {\{TestMemcachedBlockCache.testCache}} consistently fails on the nightly 
> builds of all branches that HBASE-30521 went in to, e.g. [master 
> #1520|https://ci-hbase.apache.org/job/HBase%20Nightly/job/master/1520/]:
> {noformat}
> java.lang.IllegalStateException: Not a JSON Object: null
>         at 
> org.apache.hbase.thirdparty.com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:164)
>         at 
> org.apache.hadoop.hbase.io.hfile.CacheTestUtils.testConvertToJSON(CacheTestUtils.java:391)
>         at 
> org.apache.hadoop.hbase.io.hfile.TestMemcachedBlockCache.testCache(TestMemcachedBlockCache.java:134)
> {noformat}
> The test creates the cache as an anonymous subclass of 
> \{{MemcachedBlockCache}}. Gson excludes anonymous and local classes, so 
> \{{BlockCacheUtil.toJSON}} returns \{{"null"}} for it. This went unnoticed 
> because \{{CacheTestUtils.testConvertToJSON}} only checked that the returned 
> string was not null, until HBASE-30521 started parsing it as a JSON object. 
> The PR build of HBASE-30521 did not catch it since only the hbase-server 
> tests were run.
> Turn the anonymous subclass into an inner class so the cache is serialized 
> like a real \{{MemcachedBlockCache}}.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to