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

Lefty Leverenz commented on HIVE-9119:
--------------------------------------

Doc review of patch 1 (config params):  Looks good overall, just a few quibbles 
and questions.

{code}
+    
HIVE_ZOOKEEPER_CONNECTION_MAX_RETRIES("hive.zookeeper.connection.max.retries", 
3,
+        "Max number of times to retry when connecting to the zookeeper 
server."),
+    
HIVE_ZOOKEEPR_CONNECTION_BASESLEEPTIME("hive.zookeeper.connection.basesleeptime",
 1000,
+        "Initial amount of time to wait between retries when connecting to the 
zookeeper server."),
{code}

#  Please use camel case for "ZooKeeper server" in both descriptions.
#  What are the units for *hive.zookeeper.connection.basesleeptime*?  A 
TimeValidator could be used here -- see comment on HIVE-6679 for an example.
#  Is the omission of an "E" for ZOOKEEPR deliberate in 
HIVE_ZOOKEEPR_CONNECTION_BASESLEEPTIME?  It occurs once later in the code, also 
without the E.
#  Just curious:  What's initial about the basesleeptime?

Reference:
*  [ZooKeeper website uses camel case | http://zookeeper.apache.org]
*  [HIVE-6679 comment -- TimeValidator example | 
https://issues.apache.org/jira/browse/HIVE-6679?focusedCommentId=14248013&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14248013]
*  Another example of TimeValidator, with milliseconds:
{code}
    
HIVE_LOCALIZE_RESOURCE_WAIT_INTERVAL("hive.localize.resource.wait.interval", 
"5000ms",
        new TimeValidator(TimeUnit.MILLISECONDS),
{code}

> ZooKeeperHiveLockManager does not use zookeeper in the proper way
> -----------------------------------------------------------------
>
>                 Key: HIVE-9119
>                 URL: https://issues.apache.org/jira/browse/HIVE-9119
>             Project: Hive
>          Issue Type: Improvement
>          Components: Locking
>    Affects Versions: 0.13.0, 0.14.0, 0.13.1
>            Reporter: Na Yang
>            Assignee: Na Yang
>         Attachments: HIVE-9119.1.patch
>
>
> ZooKeeperHiveLockManager does not use zookeeper in the proper way. 
> Currently a new zookeeper client instance is created for each 
> getlock/releaselock query which sometimes causes the number of open 
> connections between
> HiveServer2 and ZooKeeper exceed the max connection number that zookeeper 
> server allows. 
> To use zookeeper as a distributed lock, there is no need to create a new 
> zookeeper instance for every getlock try. A single zookeeper instance could 
> be reused and shared by ZooKeeperHiveLockManagers.   



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

Reply via email to