hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-14737) Clear cachedMaxVersions when HColumnDescriptor#setValue(VERSIONS, value) is called
Date Tue, 24 Nov 2015 07:13:11 GMT

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

Hudson commented on HBASE-14737:
--------------------------------

FAILURE: Integrated in HBase-Trunk_matrix #494 (See [https://builds.apache.org/job/HBase-Trunk_matrix/494/])
HBASE-14737 Clear cachedMaxVersions when (tedyu: rev 9a91f5ac818b078526962e5c64183a2541a064b4)
* hbase-client/src/main/java/org/apache/hadoop/hbase/HColumnDescriptor.java
* hbase-server/src/test/java/org/apache/hadoop/hbase/TestHColumnDescriptorDefaultVersions.java


> Clear cachedMaxVersions when HColumnDescriptor#setValue(VERSIONS, value) is called
> ----------------------------------------------------------------------------------
>
>                 Key: HBASE-14737
>                 URL: https://issues.apache.org/jira/browse/HBASE-14737
>             Project: HBase
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: Pankaj Kumar
>             Fix For: 2.0.0, 1.2.0, 1.3.0
>
>         Attachments: HBASE-14737.patch
>
>
> HColumnDescriptor caches the value of VERSIONS in a cachedMaxVersions member variable.
This member variable should be reset or cleared when setValue(HConstants.VERSIONS, value)
is called, like this:
> {code}
>   static final bytes[] VERSIONS_BYTES = Bytes.toBytes(HConstants.VERSIONS);
>   public HColumnDescriptor setValue(byte[] key, byte[] value) {
>     if (Bytes.compare(HConstants.VERSIONS_BYTES, key) == 0) {
>         cachedMaxVersions = UNINITIALIZED;
>     }
>     values.put(new ImmutableBytesWritable(key),
>       new ImmutableBytesWritable(value));
>     return this;
>   }
> {code}
> Otherwise, you continue getting back cachedMaxVersions instead of the updated value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message