You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zhihong Yu (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/01/23 06:43:40 UTC

[jira] [Issue Comment Edited] (HBASE-5255) Use singletons for OperationStatus to save memory

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

Zhihong Yu edited comment on HBASE-5255 at 1/23/12 5:42 AM:
------------------------------------------------------------

I like the introduction of singletons.
Since there is no setter for code or exceptionMsg, I think we should make them final.

                
      was (Author: zhihyu@ebaysf.com):
    I like the introduction of singletons.
Currently there is no constraint that OperationStatus.FAILURE cannot have an exceptionMsg which deviates from its OperationStatusCode.

At the moment we can put in javadoc to clarify the usage of these new singletons.
                  
> Use singletons for OperationStatus to save memory
> -------------------------------------------------
>
>                 Key: HBASE-5255
>                 URL: https://issues.apache.org/jira/browse/HBASE-5255
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>    Affects Versions: 0.92.0, 0.90.5
>            Reporter: Benoit Sigoure
>            Assignee: Benoit Sigoure
>            Priority: Minor
>              Labels: performance
>             Fix For: 0.94.0, 0.92.1
>
>         Attachments: HBASE-5255-0.92-Use-singletons-to-remove-unnecessary-memory-allocati.patch, HBASE-5255-trunk-Use-singletons-to-remove-unnecessary-memory-allocati.patch
>
>
> Every single {{Put}} causes the allocation of at least one {{OperationStatus}}, yet {{OperationStatus}} is almost always stateless, so these allocations are unnecessary and could be avoided.  Attached patch adds a few singletons and uses them, with no public API change.  I didn't test the patches, but you get the idea.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira