You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jon Poulton (JIRA)" <ji...@apache.org> on 2018/09/26 20:22:00 UTC

[jira] [Commented] (HBASE-21239) REST Client class is not thread safe

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

Jon Poulton commented on HBASE-21239:
-------------------------------------

Happy to fix this one myself. Let me know if you would like me to do so. 

> REST Client class is not thread safe
> ------------------------------------
>
>                 Key: HBASE-21239
>                 URL: https://issues.apache.org/jira/browse/HBASE-21239
>             Project: HBase
>          Issue Type: Bug
>          Components: Client, REST
>    Affects Versions: 3.0.0
>            Reporter: Jon Poulton
>            Priority: Major
>             Fix For: 3.0.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> The REST Client class for HBase is not Thread safe, and the class itself does not have thread safety documented in the Javadoc. Previous versions of the class were thread safe.
> Adhering to the "principal of least surprise" future versions of the Client class should also be thread safe. 
> The class can be found on the master branch, [however the issue |https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java]exists at least as far back as version 2.1. On [line 68|https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java#L68] and [line 69|https://github.com/apache/hbase/blob/master/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java#L69] are two instance variables that can potentially change on a per-request basis, are not synchronized and have no associated Lock. Both variables should be removed and their usage within method should be replaced with variables local to the method. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)